Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Andrey Konovalov <andreyknvl@google.com>
To: Oliver Neukum <oneukum@suse.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	syzbot <syzbot+1b2449b7b5dc240d107a@syzkaller.appspotmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: KASAN: use-after-free Read in device_release_driver_internal
Date: Wed, 7 Aug 2019 15:46:40 +0200
Message-ID: <CAAeHK+wJ_26rFeeQkfELO5nXn57-1Wo4iodLJNY=9iTeaduHyA@mail.gmail.com> (raw)
In-Reply-To: <1565105624.8136.32.camel@suse.com>

On Tue, Aug 6, 2019 at 5:34 PM Oliver Neukum <oneukum@suse.com> wrote:
>
> Am Dienstag, den 06.08.2019, 10:19 -0400 schrieb Alan Stern:
> > In any case, I don't know if this missing "get" would cause the
> > problem, but it might well.
>
> Hi,
>
> upon further thought, this should be automated. Checking for
> refcount leaks is KASAN's job. In particular, refcounts
> should not
>
> * decrease in probe()
> * increase in disconnect()
> * change in case probe() fails

It's probably a job for some other refcount debugging tool, but yes,
it would be nice to have a detector for this kind of stuff. It will
probably require some annotations in each place we want this kind of
checks to be performed.

>
>         Regards
>                 Oliver
>

      reply index

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 14:28 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
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 [this message]

Reply instructions:

You may reply publically 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='CAAeHK+wJ_26rFeeQkfELO5nXn57-1Wo4iodLJNY=9iTeaduHyA@mail.gmail.com' \
    --to=andreyknvl@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=stern@rowland.harvard.edu \
    --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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org linux-usb@archiver.kernel.org
	public-inbox-index linux-usb


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/ public-inbox