From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+3f89ec3d1d0842e95d50@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [usb?] WARNING in usbnet_status_start
Date: Wed, 9 Jul 2025 10:13:17 +0800 [thread overview]
Message-ID: <20250709021318.3100-1-hdanton@sina.com> (raw)
In-Reply-To: <686d5a9f.050a0220.1ffab7.0017.GAE@google.com>
> Date: Tue, 08 Jul 2025 10:51:27 -0700
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: d1b07cc0868f arm64: dts: s32g: Add USB device tree informa..
> git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
> console output: https://syzkaller.appspot.com/x/log.txt?x=1554d582580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=28729dff5d03ad1
> dashboard link: https://syzkaller.appspot.com/bug?extid=3f89ec3d1d0842e95d50
> compiler: gcc (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11680a8c580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14c9abd4580000
#syz test
--- x/drivers/net/usb/usbnet.c
+++ y/drivers/net/usb/usbnet.c
@@ -231,6 +231,8 @@ static int init_status (struct usbnet *d
if (!dev->driver_info->status)
return 0;
+ if (!dev->status)
+ return -EINVAL;
pipe = usb_rcvintpipe (dev->udev,
dev->status->desc.bEndpointAddress
& USB_ENDPOINT_NUMBER_MASK);
@@ -254,6 +256,8 @@ static int init_status (struct usbnet *d
"status ep%din, %d bytes period %d\n",
usb_pipeendpoint(pipe), maxp, period);
}
+ } else {
+ return -ENOMEM;
}
return 0;
}
@@ -1812,7 +1816,7 @@ usbnet_probe (struct usb_interface *udev
if (status == 0 && !usb_check_bulk_endpoints(udev, ep_addrs))
status = -EINVAL;
}
- if (status >= 0 && dev->status)
+ if (status >= 0)
status = init_status (dev, udev);
if (status < 0)
goto out3;
--
next prev parent reply other threads:[~2025-07-09 2:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 17:51 syzbot
2025-07-08 22:35 ` Hillf Danton
2025-07-08 22:57 ` syzbot
2025-07-09 0:41 ` Hillf Danton
2025-07-09 0:56 ` syzbot
2025-07-09 2:13 ` Hillf Danton [this message]
2025-07-09 2:45 ` syzbot
2025-07-10 17:38 ` Oliver Neukum
2025-07-10 20:10 ` 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=20250709021318.3100-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+3f89ec3d1d0842e95d50@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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®