From: syzbot <syzbot+b8080cbc8d286a5fa23a@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] KMSAN: kernel-infoleak in iowarrior_read
Date: Thu, 12 Sep 2024 11:47:07 -0700 [thread overview]
Message-ID: <000000000000917bac0621f0888e@google.com> (raw)
In-Reply-To: <0000000000001fdbd80621e28ae3@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: KMSAN: kernel-infoleak in iowarrior_read
Author: djahchankoike@gmail.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@gmail.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
next prev parent reply other threads:[~2024-09-12 18:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 2:05 [syzbot] [usb?] KMSAN: kernel-infoleak in iowarrior_read syzbot
2024-09-12 14:16 ` [syzbot] " syzbot
2024-09-12 14:21 ` Jeongjun Park
2024-09-12 15:47 ` syzbot
2024-09-12 18:47 ` syzbot [this message]
2024-09-14 20:31 ` Jeongjun Park
2024-09-15 1:54 ` syzbot
2024-09-14 20:32 ` Jeongjun Park
2024-09-15 2:09 ` syzbot
2024-09-15 18:13 ` Jeongjun Park
2024-09-15 18:41 ` syzbot
2024-09-15 18:19 ` Jeongjun Park
2024-09-15 19:05 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=000000000000917bac0621f0888e@google.com \
--to=syzbot+b8080cbc8d286a5fa23a@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.