From: Alan Stern <stern@rowland.harvard.edu>
To: syzbot <syzbot+10e5f68920f13587ab12@syzkaller.appspotmail.com>
Cc: andreyknvl@google.com, <gregkh@linuxfoundation.org>,
<gustavo@embeddedor.com>, <ingrassia@epigenesys.com>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
<syzkaller-bugs@googlegroups.com>
Subject: Re: WARNING in usbhid_raw_request/usb_submit_urb (2)
Date: Fri, 3 Jan 2020 11:35:22 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.44L0.2001031133050.1560-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <00000000000043a9a3059ae3c8ef@google.com>
On Sun, 29 Dec 2019, syzbot wrote:
> syzbot has found a reproducer for the following crash on:
>
> HEAD commit: ecdf2214 usb: gadget: add raw-gadget interface
> git tree: https://github.com/google/kasan.git usb-fuzzer
> console output: https://syzkaller.appspot.com/x/log.txt?x=17416885e00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=b06a019075333661
> dashboard link: https://syzkaller.appspot.com/bug?extid=10e5f68920f13587ab12
> compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13598885e00000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+10e5f68920f13587ab12@syzkaller.appspotmail.com
>
> ------------[ cut here ]------------
> usb 1-1: BOGUS urb xfer, pipe 2 != type 2
> WARNING: CPU: 0 PID: 2388 at drivers/usb/core/urb.c:478
> usb_submit_urb+0x1188/0x13b0 drivers/usb/core/urb.c:478
That's a strange diagnostic. Let's see what's really going on.
Alan Stern
#syz test: https://github.com/google/kasan.git ecdf2214
Index: usb-devel/drivers/usb/core/urb.c
===================================================================
--- usb-devel.orig/drivers/usb/core/urb.c
+++ usb-devel/drivers/usb/core/urb.c
@@ -204,10 +204,14 @@ int usb_urb_ep_type_check(const struct u
const struct usb_host_endpoint *ep;
ep = usb_pipe_endpoint(urb->dev, urb->pipe);
- if (!ep)
+ if (!ep) {
+ dev_info(&urb->dev->dev, "Pipe 0x%x, no ep\n", urb->pipe);
return -EINVAL;
- if (usb_pipetype(urb->pipe) != pipetypes[usb_endpoint_type(&ep->desc)])
+ }
+ if (usb_pipetype(urb->pipe) != pipetypes[usb_endpoint_type(&ep->desc)]) {
+ dev_info(&urb->dev->dev, "Pipe/ep type mismatch\n");
return -EINVAL;
+ }
return 0;
}
EXPORT_SYMBOL_GPL(usb_urb_ep_type_check);
next prev parent reply other threads:[~2020-01-03 16:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 14:54 WARNING in usbhid_raw_request/usb_submit_urb (2) syzbot
2019-12-30 3:53 ` syzbot
2020-01-03 16:35 ` Alan Stern [this message]
2020-01-03 16:57 ` syzbot
2020-01-03 17:01 ` Alan Stern
2020-01-07 14:28 ` Andrey Konovalov
2020-01-07 19:09 ` Alan Stern
2020-01-07 19:28 ` syzbot
2020-01-07 20:43 ` Alan Stern
2020-01-07 21:13 ` syzbot
2020-01-07 21:25 ` Alan Stern
2020-01-07 22:19 ` syzbot
2020-01-08 18:18 ` Alan Stern
2020-01-08 18:43 ` syzbot
2020-01-09 16:46 ` Alan Stern
2020-01-10 16:46 ` Andrey Konovalov
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=Pine.LNX.4.44L0.2001031133050.1560-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=andreyknvl@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo@embeddedor.com \
--cc=ingrassia@epigenesys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=syzbot+10e5f68920f13587ab12@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;
as well as URLs for NNTP newsgroup(s).