* [PATCH net] net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
@ 2024-06-19 13:28 Oliver Neukum
2024-06-19 14:16 ` Petko Manolov
2024-06-20 14:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Oliver Neukum @ 2024-06-19 13:28 UTC (permalink / raw)
To: petkan, davem, edumazet, kuba, pabeni, linux-usb, netdev,
linux-kernel
Cc: Oliver Neukum, syzbot+5186630949e3c55f0799
This functions retrieves values by passing a pointer. As the function
that retrieves them can fail before touching the pointers, the variables
must be initialized.
Reported-by: syzbot+5186630949e3c55f0799@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/net/usb/rtl8150.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
index 97afd7335d86..01a3b2417a54 100644
--- a/drivers/net/usb/rtl8150.c
+++ b/drivers/net/usb/rtl8150.c
@@ -778,7 +778,8 @@ static int rtl8150_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *ecmd)
{
rtl8150_t *dev = netdev_priv(netdev);
- short lpa, bmcr;
+ short lpa = 0;
+ short bmcr = 0;
u32 supported;
supported = (SUPPORTED_10baseT_Half |
--
2.45.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
2024-06-19 13:28 [PATCH net] net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings Oliver Neukum
@ 2024-06-19 14:16 ` Petko Manolov
2024-06-20 14:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Petko Manolov @ 2024-06-19 14:16 UTC (permalink / raw)
To: Oliver Neukum
Cc: davem, edumazet, kuba, pabeni, linux-usb, netdev, linux-kernel,
syzbot+5186630949e3c55f0799
On 24-06-19 15:28:03, Oliver Neukum wrote:
> This functions retrieves values by passing a pointer. As the function that
> retrieves them can fail before touching the pointers, the variables must be
> initialized.
ACK.
Petko
> Reported-by: syzbot+5186630949e3c55f0799@syzkaller.appspotmail.com
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
> drivers/net/usb/rtl8150.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
> index 97afd7335d86..01a3b2417a54 100644
> --- a/drivers/net/usb/rtl8150.c
> +++ b/drivers/net/usb/rtl8150.c
> @@ -778,7 +778,8 @@ static int rtl8150_get_link_ksettings(struct net_device *netdev,
> struct ethtool_link_ksettings *ecmd)
> {
> rtl8150_t *dev = netdev_priv(netdev);
> - short lpa, bmcr;
> + short lpa = 0;
> + short bmcr = 0;
> u32 supported;
>
> supported = (SUPPORTED_10baseT_Half |
> --
> 2.45.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
2024-06-19 13:28 [PATCH net] net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings Oliver Neukum
2024-06-19 14:16 ` Petko Manolov
@ 2024-06-20 14:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-06-20 14:20 UTC (permalink / raw)
To: Oliver Neukum
Cc: petkan, davem, edumazet, kuba, pabeni, linux-usb, netdev,
linux-kernel, syzbot+5186630949e3c55f0799
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 19 Jun 2024 15:28:03 +0200 you wrote:
> This functions retrieves values by passing a pointer. As the function
> that retrieves them can fail before touching the pointers, the variables
> must be initialized.
>
> Reported-by: syzbot+5186630949e3c55f0799@syzkaller.appspotmail.com
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
>
> [...]
Here is the summary with links:
- [net] net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
https://git.kernel.org/netdev/net/c/fba383985354
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-20 14:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 13:28 [PATCH net] net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings Oliver Neukum
2024-06-19 14:16 ` Petko Manolov
2024-06-20 14:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox