[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAeHK+wJ_26rFeeQkfELO5nXn57-1Wo4iodLJNY=9iTeaduHyA@mail.gmail.com>
Date: Wed, 7 Aug 2019 15:46:40 +0200
From: Andrey Konovalov <andreyknvl@...gle.com>
To: Oliver Neukum <oneukum@...e.com>
Cc: Alan Stern <stern@...land.harvard.edu>,
syzkaller-bugs <syzkaller-bugs@...glegroups.com>,
syzbot <syzbot+1b2449b7b5dc240d107a@...kaller.appspotmail.com>,
LKML <linux-kernel@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>
Subject: Re: KASAN: use-after-free Read in device_release_driver_internal
On Tue, Aug 6, 2019 at 5:34 PM Oliver Neukum <oneukum@...e.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
>
Powered by blists - more mailing lists