lkml.org 
[lkml]   [2019]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[[Patch V2]] usb: asix: cleanup the buffer in asix_read_cmd
Date
This is for fixing KMSAN: uninit-value in asix_mdio_write
comes from syzbot.

Reported-by: syzbot+7dc7c28d4577bbe55b10@syzkaller.appspotmail.com

Tested by:

https://groups.google.com/d/msg/syzkaller-bugs/3H_n05x_sPU/07UIX_TUEgAJ

Signed-off-by: Phong Tran <tranmanphong@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..f3eeb7875a4d 100644
--- a/drivers/net/usb/asix_common.c
+++ b/drivers/net/usb/asix_common.c
@@ -22,6 +22,8 @@ int asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
else
fn = usbnet_read_cmd_nopm;

+ memset(data, 0, size);
+
ret = fn(dev, cmd, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
value, index, data, size);

--
2.20.1
\
 
 \ /
  Last update: 2019-11-10 15:08    [W:0.081 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site