Re: KASAN: use-after-free Read in uvc_probe

From: Oliver Neukum
Date: Mon Feb 10 2020 - 09:13:35 EST


Am Montag, den 13.01.2020, 04:24 -0800 schrieb syzbot:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit: ae179410 usb: gadget: add raw-gadget interface
> git tree: https://github.com/google/kasan.git usb-fuzzer
> console output: https://syzkaller.appspot.com/x/log.txt?x=132223fee00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=ad1d751a3a72ae57
> dashboard link: https://syzkaller.appspot.com/bug?extid=9a48339b077c5a80b869
> compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16857325e00000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=142e069ee00000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+9a48339b077c5a80b869@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> usb 1-1: New USB device found, idVendor=0bd3, idProduct=0555,
> bcdDevice=69.6a
> usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
> usb 1-1: config 0 descriptor??
> usb 1-1: string descriptor 0 read error: -71
> uvcvideo: Found UVC 0.00 device <unnamed> (0bd3:0555)
> ==================================================================
> BUG: KASAN: use-after-free in uvc_register_terms
> drivers/media/usb/uvc/uvc_driver.c:2038 [inline]
> BUG: KASAN: use-after-free in uvc_register_chains
> drivers/media/usb/uvc/uvc_driver.c:2070 [inline]
> BUG: KASAN: use-after-free in uvc_probe.cold+0x2193/0x29de
> drivers/media/usb/uvc/uvc_driver.c:2201
> Read of size 2 at addr ffff8881d4f1bc2e by task kworker/1:2/94

#syz test: https://github.com/google/kasan.git ae179410