Re: KASAN: use-after-free Read in adu_disconnect
From: Johan Hovold
Date: Fri Sep 20 2019 - 10:39:01 EST
On Fri, Aug 09, 2019 at 01:24:04PM -0700, syzbot wrote:
> syzbot has found a reproducer for the following crash on:
>
> HEAD commit: e96407b4 usb-fuzzer: main usb gadget fuzzer driver
> git tree: https://github.com/google/kasan.git usb-fuzzer
> console output: https://syzkaller.appspot.com/x/log.txt?x=13871a4a600000
> kernel config: https://syzkaller.appspot.com/x/.config?x=cfa2c18fb6a8068e
> dashboard link: https://syzkaller.appspot.com/bug?extid=0243cb250a51eeefb8cc
> compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c4c8e2600000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11d80d2c600000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+0243cb250a51eeefb8cc@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> usb 1-1: USB disconnect, device number 4
> ==================================================================
> BUG: KASAN: use-after-free in atomic64_read
> include/asm-generic/atomic-instrumented.h:836 [inline]
> BUG: KASAN: use-after-free in atomic_long_read
> include/asm-generic/atomic-long.h:28 [inline]
> BUG: KASAN: use-after-free in __mutex_unlock_slowpath+0x96/0x670
> kernel/locking/mutex.c:1211
> Read of size 8 at addr ffff8881d1d0aa00 by task kworker/0:1/12
Let's resend and retest using the latest usb-fuzzer kernel, which
includes the fix for a couple char dev races that we were now hitting:
#syz test: https://github.com/google/kasan.git e0bd8d79
I'll fix the failure to stop I/O at disconnect separately.
Johan