From: Alan Stern <stern@rowland.harvard.edu>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
syzbot <syzbot+1b2449b7b5dc240d107a@syzkaller.appspotmail.com>,
LKML <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>,
Oliver Neukum <oneukum@suse.com>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: KASAN: use-after-free Read in device_release_driver_internal
Date: Thu, 8 Aug 2019 09:59:59 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.44L0.1908080958380.1652-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <CAAeHK+yPJR2kZ5Mkry+bGFVuedF9F76=5GdKkF1eLkr9FWyvqA@mail.gmail.com>
On Thu, 8 Aug 2019, Andrey Konovalov wrote:
> On Thu, Aug 8, 2019 at 2:44 PM Dmitry Vyukov <dvyukov@google.com> wrote:
> >
> > On Thu, Aug 8, 2019 at 2:28 PM Andrey Konovalov <andreyknvl@google.com> wrote:
> > >
> > > On Wed, Aug 7, 2019 at 8:31 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> > > >
> > > > On Wed, 7 Aug 2019, syzbot wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > syzbot has tested the proposed patch and the reproducer did not trigger
> > > > > crash:
> > > > >
> > > > > Reported-and-tested-by:
> > > > > syzbot+1b2449b7b5dc240d107a@syzkaller.appspotmail.com
> > > > >
> > > > > Tested on:
> > > > >
> > > > > commit: 6a3599ce usb-fuzzer: main usb gadget fuzzer driver
> > > > > git tree: https://github.com/google/kasan.git
> > > > > kernel config: https://syzkaller.appspot.com/x/.config?x=700ca426ab83faae
> > > > > compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> > > > > patch: https://syzkaller.appspot.com/x/patch.diff?x=132eec8c600000
> > > > >
> > > > > Note: testing is done by a robot and is best-effort only.
> > > >
> > > > Andrey, is there any way to get the console output from this test?
> > >
> > > Dmitry, would it be possible to link console log for successful tests as well?
> >
> > Yes. Start by filing a feature request at
> > https://github.com/google/syzkaller/issues
>
> Filed https://github.com/google/syzkaller/issues/1322
>
> Alan, for now I've applied your patch and run the reproducer manually:
>
> [ 90.844643][ T74] usb 1-1: new high-speed USB device number 2
> using dummy_hcd
> [ 91.085789][ T74] usb 1-1: Using ep0 maxpacket: 16
> [ 91.204698][ T74] usb 1-1: config 0 has an invalid interface
> number: 234 but max is 0
> [ 91.209137][ T74] usb 1-1: config 0 has no interface number 0
> [ 91.211599][ T74] usb 1-1: config 0 interface 234 altsetting 0
> endpoint 0x8D has an inva1
> [ 91.216162][ T74] usb 1-1: config 0 interface 234 altsetting 0
> endpoint 0x7 has invalid 4
> [ 91.218211][ T74] usb 1-1: config 0 interface 234 altsetting 0
> bulk endpoint 0x7 has inv4
> [ 91.220131][ T74] usb 1-1: config 0 interface 234 altsetting 0
> bulk endpoint 0x8F has in0
> [ 91.222052][ T74] usb 1-1: New USB device found, idVendor=0421,
> idProduct=0486, bcdDevic7
> [ 91.223851][ T74] usb 1-1: New USB device strings: Mfr=0,
> Product=0, SerialNumber=0
> [ 91.233180][ T74] usb 1-1: config 0 descriptor??
> [ 91.270222][ T74] rndis_wlan 1-1:0.234: Refcount before probe: 3
> [ 91.275464][ T74] rndis_wlan 1-1:0.234: invalid descriptor buffer length
> [ 91.277558][ T74] usb 1-1: bad CDC descriptors
> [ 91.279716][ T74] rndis_wlan 1-1:0.234: Refcount after probe: 3
> [ 91.281378][ T74] rndis_host 1-1:0.234: Refcount before probe: 3
> [ 91.283303][ T74] rndis_host 1-1:0.234: invalid descriptor buffer length
> [ 91.284724][ T74] usb 1-1: bad CDC descriptors
> [ 91.286004][ T74] rndis_host 1-1:0.234: Refcount after probe: 3
> [ 91.287318][ T74] cdc_acm 1-1:0.234: Refcount before probe: 3
> [ 91.288513][ T74] cdc_acm 1-1:0.234: invalid descriptor buffer length
> [ 91.289835][ T74] cdc_acm 1-1:0.234: No union descriptor, testing
> for castrated device
> [ 91.291555][ T74] cdc_acm 1-1:0.234: Refcount after probe: 3
> [ 91.292766][ T74] cdc_acm: probe of 1-1:0.234 failed with error -12
> [ 92.001549][ T96] usb 1-1: USB disconnect, device number 2
Ah, that looks right, thank you. The patch worked correctly -- good
work Oliver!
Alan Stern
next prev parent reply other threads:[~2019-08-08 14:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 14:28 KASAN: use-after-free Read in device_release_driver_internal syzbot
2019-08-01 16:01 ` Andrey Konovalov
2019-08-01 18:47 ` Alan Stern
2019-08-06 12:36 ` Oliver Neukum
2019-08-06 12:50 ` Andrey Konovalov
2019-08-07 13:38 ` Oliver Neukum
2019-08-07 13:44 ` Andrey Konovalov
2019-08-07 13:44 ` Andrey Konovalov
2019-08-07 13:45 ` Andrey Konovalov
2019-08-07 14:13 ` syzbot
2019-08-07 13:56 ` syzbot
2019-08-07 17:40 ` Alan Stern
2019-08-07 17:51 ` syzbot
2019-08-07 18:05 ` Alan Stern
2019-08-07 18:23 ` syzbot
2019-08-07 18:31 ` Alan Stern
2019-08-08 12:27 ` Andrey Konovalov
2019-08-08 12:43 ` Dmitry Vyukov
2019-08-08 13:03 ` Andrey Konovalov
2019-08-08 13:59 ` Alan Stern [this message]
2019-08-13 12:42 ` Andrey Konovalov
2019-08-13 13:22 ` Oliver Neukum
2019-08-13 13:24 ` Andrey Konovalov
2019-08-13 15:16 ` Greg KH
2019-08-13 13:59 ` Andrey Konovalov
2019-08-06 14:19 ` Alan Stern
2019-08-06 14:25 ` Oliver Neukum
2019-08-06 15:33 ` Oliver Neukum
2019-08-07 13: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.1908080958380.1652-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=andreyknvl@google.com \
--cc=dvyukov@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=syzbot+1b2449b7b5dc240d107a@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).