lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191110140716.11996-1-tranmanphong@gmail.com>
Date:   Sun, 10 Nov 2019 21:07:16 +0700
From:   Phong Tran <tranmanphong@...il.com>
To:     davem@...emloft.net
Cc:     glider@...gle.com, gregkh@...uxfoundation.org,
        hslester96@...il.com, kstewart@...uxfoundation.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
        netdev@...r.kernel.org,
        syzbot+7dc7c28d4577bbe55b10@...kaller.appspotmail.com,
        syzkaller-bugs@...glegroups.com, tglx@...utronix.de,
        tranmanphong@...il.com
Subject: [[Patch V2]] usb: asix: cleanup the buffer in asix_read_cmd

This is for fixing KMSAN: uninit-value in asix_mdio_write
comes from syzbot.

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

Tested by:

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

Signed-off-by: Phong Tran <tranmanphong@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ