linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Oliver Neukum <oneukum@suse.com>
Cc: USB mailing list <linux-usb@vger.kernel.org>
Subject: Re: [syzbot] [usb?] WARNING in usbnet_start_xmit/usb_submit_urb
Date: Fri, 23 Jun 2023 13:16:56 -0400	[thread overview]
Message-ID: <7330e6c0-eb73-499e-8699-dc1754d90cad@rowland.harvard.edu> (raw)
In-Reply-To: <0f685f2f-06df-4cf2-9387-34f5e3c8b7b7@rowland.harvard.edu>

Oliver:

I just noticed you had posted a patch to fix this same problem:
https://lore.kernel.org/linux-usb/291da1b9-9f71-0f99-45f4-a25a259c8d6d@suse.com/

Do you want to submit your patch or would you prefer that I submit the 
patch below?

Alan Stern

On Fri, Jun 23, 2023 at 11:23:53AM -0400, Alan Stern wrote:
> On Fri, Jun 23, 2023 at 06:32:22AM -0700, syzbot wrote:
> > syzbot has bisected this issue to:
> > 
> > commit 45bf39f8df7f05efb83b302c65ae3b9bc92b7065
> > Author: Alan Stern <stern@rowland.harvard.edu>
> > Date:   Tue Jan 31 20:49:04 2023 +0000
> > 
> >     USB: core: Don't hold device lock while reading the "descriptors" sysfs file
> > 
> > bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=124b5877280000
> > start commit:   692b7dc87ca6 Merge tag 'hyperv-fixes-signed-20230619' of g..
> > git tree:       upstream
> > final oops:     https://syzkaller.appspot.com/x/report.txt?x=114b5877280000
> > console output: https://syzkaller.appspot.com/x/log.txt?x=164b5877280000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=2cbd298d0aff1140
> > dashboard link: https://syzkaller.appspot.com/bug?extid=63ee658b9a100ffadbe2
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1760094b280000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1359cdf3280000
> > 
> > Reported-by: syzbot+63ee658b9a100ffadbe2@syzkaller.appspotmail.com
> > Fixes: 45bf39f8df7f ("USB: core: Don't hold device lock while reading the "descriptors" sysfs file")
> > 
> > For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> 
> The bisection result is wrong, but the issue still needs to be fixed.
> 
> Alan Stern
> 
> #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ v6.4-rc7
> 
> Index: usb-devel/drivers/net/usb/usbnet.c
> ===================================================================
> --- usb-devel.orig/drivers/net/usb/usbnet.c
> +++ usb-devel/drivers/net/usb/usbnet.c
> @@ -1775,6 +1775,9 @@ usbnet_probe (struct usb_interface *udev
>  	} else if (!info->in || !info->out)
>  		status = usbnet_get_endpoints (dev, udev);
>  	else {
> +		u8		ep_addrs[3] = {
> +			info->in + USB_DIR_IN, info->out + USB_DIR_OUT, 0};
> +
>  		dev->in = usb_rcvbulkpipe (xdev, info->in);
>  		dev->out = usb_sndbulkpipe (xdev, info->out);
>  		if (!(info->flags & FLAG_NO_SETINT))
> @@ -1784,6 +1787,8 @@ usbnet_probe (struct usb_interface *udev
>  		else
>  			status = 0;
>  
> +		if (status == 0 && !usb_check_bulk_endpoints(udev, ep_addrs))
> +			status = -EINVAL;
>  	}
>  	if (status >= 0 && dev->status)
>  		status = init_status (dev, udev);

  parent reply	other threads:[~2023-06-23 17:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15  7:28 [syzbot] WARNING in usbnet_start_xmit/usb_submit_urb syzbot
2021-11-15 14:31 ` Oliver Neukum
2021-12-04 10:18   ` Dmitry Vyukov
2021-11-18 17:20 ` Oliver Neukum
2021-11-18 17:34   ` syzbot
2021-11-25 13:37 ` Oliver Neukum
2021-11-25 13:48   ` syzbot
2021-11-25 17:39   ` [PATCH] usbnet: sanity check for endpoint types kernel test robot
2021-12-09 12:03 ` [syzbot] WARNING in usbnet_start_xmit/usb_submit_urb Oliver Neukum
2021-12-09 12:26   ` syzbot
2023-06-23 13:32 ` [syzbot] [usb?] " syzbot
2023-06-23 15:23   ` Alan Stern
2023-06-23 16:07     ` syzbot
2023-06-23 17:16     ` Alan Stern [this message]
2023-07-11 12:42       ` Oliver Neukum
2023-07-11 17:38         ` [PATCH] net: usbnet: Fix " Alan Stern
2023-07-11 20:12           ` Jakub Kicinski
2023-07-12 14:15             ` [PATCH v2] " Alan Stern
2023-07-14  4:00               ` patchwork-bot+netdevbpf

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=7330e6c0-eb73-499e-8699-dc1754d90cad@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.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;
as well as URLs for NNTP newsgroup(s).