public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+76916a45d2294b551fd9@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Forwarded: Re: [syzbot] [sound?] [usb?] KASAN: slab-out-of-bounds Write in copy_to_urb
Date: Wed, 05 Nov 2025 23:26:53 -0800	[thread overview]
Message-ID: <690c4dbd.050a0220.baf87.0081.GAE@google.com> (raw)
In-Reply-To: <6903e7f7.050a0220.3344a1.044c.GAE@google.com>

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

***

Subject: Re: [syzbot] [sound?] [usb?] KASAN: slab-out-of-bounds Write in copy_to_urb
Author: lizhi.xu@windriver.com

#syz test

diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 54d01dfd820f..a4c0ea685b8a 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1606,6 +1606,9 @@ static int prepare_playback_urb(struct snd_usb_substream *subs,
 				    subs->cur_audiofmt->dsd_bitrev)) {
 			fill_playback_urb_dsd_bitrev(subs, urb, bytes);
 		} else {
+			if (bytes > ctx->buffer_size)
+				return -EPIPE;
+
 			/* usual PCM */
 			if (!subs->tx_length_quirk)
 				copy_to_urb(subs, urb, 0, stride, bytes);

  parent reply	other threads:[~2025-11-06  7:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 22:34 [syzbot] [ext4?] WARNING in ext4_xattr_inode_update_ref (2) syzbot
2025-10-31  1:53 ` Lizhi Xu
2025-10-31  2:15   ` syzbot
2025-11-03  7:46 ` Lizhi Xu
2025-11-03  8:15   ` syzbot
2025-11-03  8:23 ` Forwarded: " syzbot
2025-11-06  7:26 ` syzbot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-11-05 15:20 [syzbot] [sound?] [usb?] KASAN: slab-out-of-bounds Write in copy_to_urb syzbot
2025-11-06  7:50 ` Forwarded: " 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=690c4dbd.050a0220.baf87.0081.GAE@google.com \
    --to=syzbot+76916a45d2294b551fd9@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox