mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: syzbot <syzbot+ed3ada41c4eb1c4ab78e@syzkaller.appspotmail.com>,
	 Wolfram Sang <wsa+renesas@sang-engineering.com>,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	 linux-usb@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	linux-i2c@vger.kernel.org
Subject: Re: [syzbot] [usb?] WARNING in ec168_ctrl_msg/usb_submit_urb
Date: Mon, 19 Oct 2026 14:05:40 +0200	[thread overview]
Message-ID: <atYHEIRoE_I-EenD@zenone.zhora.eu> (raw)
In-Reply-To: <0a758fb7-6c71-4e59-a9df-0d2a71649f1e@rowland.harvard.edu>

Hi,

On Sun, Oct 18, 2026 at 12:30:24PM -0400, Alan Stern wrote:
> On Sun, Oct 18, 2026 at 09:18:28AM -0700, syzbot wrote:
> > Hello,
> > 
> > syzbot found the following issue on:
> > 
> > HEAD commit:    4056b3c9d3c9 Merge tag 'nios2_update_for_v7.4' of git://gi..
> > git tree:       upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=11370ce1580000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=7d1b274ca9837366
> > dashboard link: https://syzkaller.appspot.com/bug?extid=ed3ada41c4eb1c4ab78e
> > compiler:       Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=114faaea580000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=154faaea580000
> > 
> > Downloadable assets:
> > disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-4056b3c9.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/811a43c89106/vmlinux-4056b3c9.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/2bb4f3abea76/bzImage-4056b3c9.xz
> > 
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+ed3ada41c4eb1c4ab78e@syzkaller.appspotmail.com
> 
> This looks like another example of a 0-length I2C-over-USB read.  It 
> would be nice if we could rule out these things at all at once, instead 
> of going after them piecemeal.
> 
> Alternatively, this WARN() in the USB core could be reduced to something 
> less severe in the case of length-0 control reads.  We haven't been 
> seeing very many instances of it apart from I2C, and those have only 
> occurred during fuzzing.

I am about to send a patch for it, we just need to disallow size
'0' read messages:

@@ -115,7 +115,7 @@ static int ec168_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 	while (i < num) {
 		if (num > i + 1 && (msg[i+1].flags & I2C_M_RD)) {
 			if (msg[i].addr == ec168_ec100_config.demod_address) {
-				if (msg[i].len < 1) {
+				if (msg[i].len < 1 || msg[i+1].len < 1) {
 					i = -EOPNOTSUPP;
 					break;
 				}

Thanks,
Andi

      reply	other threads:[~2026-10-19 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 16:18 syzbot
2026-10-18 16:30 ` Alan Stern
2026-10-19 12:05   ` Andi Shyti [this message]

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=atYHEIRoE_I-EenD@zenone.zhora.eu \
    --to=andi.shyti@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=syzbot+ed3ada41c4eb1c4ab78e@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=wsa+renesas@sang-engineering.com \
    /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

all inboxes | Powered by JetHome®