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-next>] [day] [month] [year] [list]
Message-Id: <20200823082042.20816-1-himadrispandya@gmail.com>
Date:   Sun, 23 Aug 2020 13:50:42 +0530
From:   Himadri Pandya <himadrispandya@...il.com>
To:     davem@...emloft.net, kuba@...nel.org
Cc:     linux-kernel-mentees@...ts.linuxfoundation.org,
        gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        syzkaller-bugs@...glegroups.com,
        Himadri Pandya <himadrispandya@...il.com>
Subject: [PATCH] net: usb: Fix uninit-was-stored issue in asix_read_cmd()

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@...kaller.appspotmail.com

Signed-off-by: Himadri Pandya <himadrispandya@...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..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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ