Messages in this thread Patch in this message | | | From | Phong Tran <> | Subject | [[Patch V2]] usb: asix: cleanup the buffer in asix_read_cmd | Date | Sun, 10 Nov 2019 21:07:16 +0700 |
| |
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
| |