Re: KASAN: use-after-free Read in usblp_bulk_read
From: Alan Stern
Date: Thu Apr 30 2020 - 11:11:58 EST
On Thu, 30 Apr 2020, Oliver Neukum wrote:
> Am Dienstag, den 21.04.2020, 08:35 -0700 schrieb syzbot:
> > Hello,
> >
> > syzbot found the following crash on:
> >
> > HEAD commit: 0fa84af8 Merge tag 'usb-serial-5.7-rc1' of https://git.ker..
> > git tree: https://github.com/google/kasan.git usb-fuzzer
> > console output: https://syzkaller.appspot.com/x/log.txt?x=126f75d7e00000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=6b9c154b0c23aecf
> > dashboard link: https://syzkaller.appspot.com/bug?extid=be5b5f86a162a6c281e6
> > compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> >
> > Unfortunately, I don't have any reproducer for this crash yet.
> >
> > IMPORTANT: if you fix the bug, please add the following tag to the commit:
> > Reported-by: syzbot+be5b5f86a162a6c281e6@xxxxxxxxxxxxxxxxxxxxxxxxx
> >
> > usblp0: nonzero read bulk status received: -71
>
> OK, we have this report and nobody understands it. If I may summarize:
>
> 1. We do not conclusively know how the URB was submitted
> 2. We are clear about which memory was freed and accessed
> 3. We agree that the URB should have been unlinked
Or should not have been submitted.
> Do we agree on what we agree on?
>
> Theories:
>
> A. There is a race that would allow disconnect() and resume() to run
> concurrently
>
> B. There is a race in usblp which affects 'used'
>
> C. There is a bug in the virtual driver that can make unlinking an URB
> fail
>
> What do you think? How to investigate this further and is it worth it?
> Do we have documentation on what KASAN does?
KASAN is documented. The difficulty is that this race is obviously
hard to trigger, and without the ability to reproduce it we can't run
diagnostics to find the underlying cause.
We can't even ask syzbot to try running tests for us; without a valid
reproducer it won't agree to rerun the original test program.
Alan Stern