All of lore.kernel.org
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH] net: usb: Fix uninit-was-stored issue in asix_read_cmd()
@ 2020-08-23  8:20 ` Himadri Pandya
  0 siblings, 0 replies; 29+ messages in thread
From: Himadri Pandya @ 2020-08-23  8:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: linux-usb, syzkaller-bugs, linux-kernel, netdev,
	linux-kernel-mentees, Himadri Pandya

Initialize the buffer before passing it to usb_read_cmd() function(s) to
fix the uninit-was-stored issue in asix_read_cmd().

Fixes: KMSAN: kernel-infoleak in raw_ioctl
Reported by: syzbot+a7e220df5a81d1ab400e@syzkaller.appspotmail.com

Signed-off-by: Himadri Pandya <himadrispandya@gmail.com>
---
 drivers/net/usb/asix_common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
index e39f41efda3e..a67ea1971b78 100644
--- a/drivers/net/usb/asix_common.c
+++ b/drivers/net/usb/asix_common.c
@@ -17,6 +17,8 @@ int asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
 
 	BUG_ON(!dev);
 
+	memset(data, 0, size);
+
 	if (!in_pm)
 		fn = usbnet_read_cmd;
 	else
-- 
2.17.1

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2020-08-25 15:44 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-23  8:20 [Linux-kernel-mentees] [PATCH] net: usb: Fix uninit-was-stored issue in asix_read_cmd() Himadri Pandya
2020-08-23  8:20 ` Himadri Pandya
2020-08-23  9:26 ` [Linux-kernel-mentees] " Dmitry Vyukov via Linux-kernel-mentees
2020-08-23  9:26   ` Dmitry Vyukov
2020-08-23 10:19   ` [Linux-kernel-mentees] " Greg Kroah-Hartman
2020-08-23 10:19     ` Greg Kroah-Hartman
2020-08-23 10:31     ` [Linux-kernel-mentees] " Dmitry Vyukov via Linux-kernel-mentees
2020-08-23 10:31       ` Dmitry Vyukov
2020-08-23 10:56       ` [Linux-kernel-mentees] " Greg Kroah-Hartman
2020-08-23 10:56         ` Greg Kroah-Hartman
2020-08-23 10:58       ` [Linux-kernel-mentees] " Greg Kroah-Hartman
2020-08-23 10:58         ` Greg Kroah-Hartman
2020-08-23 12:38         ` [Linux-kernel-mentees] " Himadri Pandya
2020-08-24  8:55         ` Dmitry Vyukov via Linux-kernel-mentees
2020-08-24  8:55           ` Dmitry Vyukov
2020-08-25  6:51           ` [Linux-kernel-mentees] " Greg Kroah-Hartman
2020-08-25  6:51             ` Greg Kroah-Hartman
2020-08-25  6:54             ` [Linux-kernel-mentees] " Greg Kroah-Hartman
2020-08-25  6:54               ` Greg Kroah-Hartman
2020-08-25 14:39             ` [Linux-kernel-mentees] " Alan Stern
2020-08-25 14:39               ` Alan Stern
2020-08-25 14:44               ` [Linux-kernel-mentees] " Greg Kroah-Hartman
2020-08-25 14:44                 ` Greg Kroah-Hartman
2020-08-25 15:44                 ` [Linux-kernel-mentees] " Greg Kroah-Hartman
2020-08-25 15:44                   ` Greg Kroah-Hartman
2020-08-24 18:16 ` [Linux-kernel-mentees] " Jakub Kicinski
2020-08-24 18:16   ` Jakub Kicinski
2020-08-25  6:36   ` [Linux-kernel-mentees] " Himadri Pandya
2020-08-25  6:36     ` Himadri Pandya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.