linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	syzbot 
	<bot+50d191d34989b5aa28596b0a2cb20c96f3ca4650@syzkaller.appspotmail.com>,
	felipe.balbi@linux.intel.com, krinkin.m.u@gmail.com,
	LKML <linux-kernel@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>,
	syzkaller-bugs@googlegroups.com, Takashi Iwai <tiwai@suse.de>,
	vskrishn@codeaurora.org
Subject: Re: WARNING in usb_submit_urb
Date: Wed, 8 Nov 2017 09:26:31 +0100	[thread overview]
Message-ID: <CACT4Y+b6Hv21Db5=RG3zU5xeJo0HA0CaEeQ7=bUTTmQ1re7ZXg@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1711071252170.1395-100000@iolanthe.rowland.org>

On Tue, Nov 7, 2017 at 6:58 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Tue, 7 Nov 2017, Greg KH wrote:
>
>> On Tue, Nov 07, 2017 at 08:11:13AM -0800, syzbot wrote:
>> > Hello,
>> >
>> > syzkaller hit the following crash on
>> > 36ef71cae353f88fd6e095e2aaa3e5953af1685d
>> > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
>> > compiler: gcc (GCC) 7.1.1 20170620
>> > .config is attached
>> > Raw console output is attached.
>> > C reproducer is attached
>> > syzkaller reproducer is attached. See https://goo.gl/kgGztJ
>> > for information about syzkaller reproducers
>>
>> This is not a crash, you are doing a panic-on-warning, and you send
>> invalid data to the kernel and it warned about it properly and kept on
>> working :)
>>
>> Perhaps maybe not a full WARN_ON() is to be done here?
>
> I don't understand how this could have happened.  The raw log explains
> the problem:
>
>> [   15.138822] usb usb1: BOGUS urb flags, 2 --> 0
>> [   15.139498] ------------[ cut here ]------------
>> [   15.139955] WARNING: CPU: 3 PID: 2986 at drivers/usb/core/urb.c:498 usb_submit_urb+0xeb9/0x10f0
> ...
>> [   15.150280] RIP: 0010:usb_submit_urb+0xeb9/0x10f0
> ...
>> [   15.155166]  proc_do_submiturb+0x1f53/0x3860
>
> The "2 --> 0" means that proc_do_submiturb() tried to submit a control
> URB (2 = PIPE_CONTROL) to an isochronous endpoint (0 = PIPE_ISOCHRONOUS).
> But right near the start of the routine we have:
>
>         switch (uurb->type) {
>         case USBDEVFS_URB_TYPE_CONTROL:
>                 if (!usb_endpoint_xfer_control(&ep->desc))
>                         return -EINVAL;
>
> So how was the warning triggered?

I don't know what happened there, but bot provided a repro for this.

  reply	other threads:[~2017-11-08  8:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 16:11 WARNING in usb_submit_urb syzbot
2017-11-07 16:35 ` Greg KH
2017-11-07 17:58   ` Alan Stern
2017-11-08  8:26     ` Dmitry Vyukov [this message]
2017-11-08 17:06       ` Alan Stern
2017-11-09 12:19     ` Andrey Konovalov
2017-11-09 13:26       ` Oliver Neukum
2017-11-09 15:30         ` Alan Stern
2018-02-02  0:21 ` Eric Biggers

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='CACT4Y+b6Hv21Db5=RG3zU5xeJo0HA0CaEeQ7=bUTTmQ1re7ZXg@mail.gmail.com' \
    --to=dvyukov@google.com \
    --cc=bot+50d191d34989b5aa28596b0a2cb20c96f3ca4650@syzkaller.appspotmail.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krinkin.m.u@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tiwai@suse.de \
    --cc=vskrishn@codeaurora.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;
as well as URLs for NNTP newsgroup(s).