All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: Cesar Miquel <miquel@df.uba.ar>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	rio500-users@lists.sourceforge.net,
	syzbot <syzbot+35f04d136fc975a70da4@syzkaller.appspotmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: KASAN: invalid-free in disconnect_rio
Date: Tue, 30 Apr 2019 15:49:06 +0200	[thread overview]
Message-ID: <1556632146.20085.36.camel@suse.com> (raw)
In-Reply-To: <CAAeHK+w-miwjw78hbUmACgVhr+hbCN31SF+fNeEtdMn7-9=O+A@mail.gmail.com>

On Di, 2019-04-30 at 15:02 +0200, Andrey Konovalov wrote:
> On Tue, Apr 30, 2019 at 2:58 PM Oliver Neukum <oneukum@suse.com> wrote:
> > 
> > On Fr, 2019-04-12 at 04:36 -0700, syzbot wrote:
> > > Hello,
> > > 
> > > syzbot found the following crash on:
> > > 
> > > HEAD commit:    9a33b369 usb-fuzzer: main usb gadget fuzzer driver
> > > git tree:       https://github.com/google/kasan/tree/usb-fuzzer
> > > console output: https://syzkaller.appspot.com/x/log.txt?x=174ce2e3200000
> > > kernel config:  https://syzkaller.appspot.com/x/.config?x=23e37f59d94ddd15
> > > dashboard link: https://syzkaller.appspot.com/bug?extid=35f04d136fc975a70da4
> > > compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> > > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=138150f3200000
> > > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1290c22d200000
> > > 
> > > IMPORTANT: if you fix the bug, please add the following tag to the commit:
> > > Reported-by: syzbot+35f04d136fc975a70da4@syzkaller.appspotmail.com
> > > 
> > > usb 6-1: USB disconnect, device number 2
> > > rio500 3-1:0.110: USB Rio disconnected.
> > > usb 4-1: USB disconnect, device number 2
> > > ==================================================================
> > > usb 1-1: USB disconnect, device number 2
> > > BUG: KASAN: double-free or invalid-free in slab_free mm/slub.c:3003 [inline]
> > > BUG: KASAN: double-free or invalid-free in kfree+0xce/0x290 mm/slub.c:3958
> > > usb 2-1: USB disconnect, device number 2
> > > 
> > 
> > Try as I might, I don't understand this. I can see a memory leak,
> > but not a double free.
> 
> I took a look at this some time ago, and I was under the impression
> that this driver doesn't handle multiple devices being connected at
> the same time well.


You are right. A global variable is used. A fix is being worked on.

	Regards
		Oliver


      reply	other threads:[~2019-04-30 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 11:36 KASAN: invalid-free in disconnect_rio syzbot
2019-04-30 12:58 ` Oliver Neukum
2019-04-30 13:02   ` Andrey Konovalov
2019-04-30 13:49     ` Oliver Neukum [this message]

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=1556632146.20085.36.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=andreyknvl@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=miquel@df.uba.ar \
    --cc=rio500-users@lists.sourceforge.net \
    --cc=syzbot+35f04d136fc975a70da4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.