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: <000000000000917bac0621f0888e@google.com>
Date: Thu, 12 Sep 2024 11:47:07 -0700
From: syzbot <syzbot+b8080cbc8d286a5fa23a@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] KMSAN: kernel-infoleak in iowarrior_read

For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.

***

Subject: KMSAN: kernel-infoleak in iowarrior_read
Author: djahchankoike@...il.com

#syz test

iowarrior_callback may send uninitialized data if memcpy fails
copying data from urb to read_queue, check if memcpy is successful
before waking waiting readers.

Signed-off-by: Diogo Jahchan Koike <djahchankoike@...il.com>
---
 drivers/usb/misc/iowarrior.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 6d28467ce352..6f5cd6251d76 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -201,8 +201,9 @@ static void iowarrior_callback(struct urb *urb)
 
 	/* +1 for serial number */
 	offset = intr_idx * (dev->report_size + 1);
-	memcpy(dev->read_queue + offset, urb->transfer_buffer,
-	       dev->report_size);
+	if (!memcpy(dev->read_queue + offset, urb->transfer_buffer,
+	       dev->report_size))
+		goto exit;
 	*(dev->read_queue + offset + (dev->report_size)) = dev->serial_number++;
 
 	atomic_set(&dev->intr_idx, aux_idx);
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ