KASAN: global-out-of-bounds Read in hdpvr_probe

16 views
Skip to first unread message

syzbot

unread,
May 2, 2019, 8:36:07 AM5/2/19
to andre...@google.com, hver...@xs4all.nl, linux-...@vger.kernel.org, linux...@vger.kernel.org, linu...@vger.kernel.org, mch...@kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 43151d6c 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=15459742a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=4183eeef650d1234
dashboard link: https://syzkaller.appspot.com/bug?extid=aac8d0d7205f112045d2
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=166fc362a00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13006514a00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+aac8d0...@syzkaller.appspotmail.com

usb 1-1: config 0 interface 237 altsetting 0 bulk endpoint 0x81 has invalid
maxpacket 0
usb 1-1: New USB device found, idVendor=2040, idProduct=4982,
bcdDevice=d3.8f
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 1-1: config 0 descriptor??
hdpvr 1-1:0.237: firmware version 0x1e dated <
=�?M�W �����&�?�'e � �]�ʭ"Bm[5�f
ir-kbd-i2c 0-0071: IR for HDPVR is known to cause problems during
recording, use enable_hdpvr modparam to enable
==================================================================
BUG: KASAN: global-out-of-bounds in hdpvr_probe.cold+0x11e8/0x127d
drivers/media/usb/hdpvr/hdpvr-core.c:375
Read of size 4 at addr ffffffff92f30080 by task kworker/0:1/12

CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.1.0-rc3-319004-g43151d6 #6
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: usb_hub_wq hub_event
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0xe8/0x16e lib/dump_stack.c:113
print_address_description+0x6c/0x236 mm/kasan/report.c:187
kasan_report.cold+0x1a/0x3c mm/kasan/report.c:317
hdpvr_probe.cold+0x11e8/0x127d drivers/media/usb/hdpvr/hdpvr-core.c:375
usb_probe_interface+0x31d/0x820 drivers/usb/core/driver.c:361
really_probe+0x2da/0xb10 drivers/base/dd.c:509
driver_probe_device+0x21d/0x350 drivers/base/dd.c:671
__device_attach_driver+0x1d8/0x290 drivers/base/dd.c:778
bus_for_each_drv+0x163/0x1e0 drivers/base/bus.c:454
__device_attach+0x223/0x3a0 drivers/base/dd.c:844
bus_probe_device+0x1f1/0x2a0 drivers/base/bus.c:514
device_add+0xad2/0x16e0 drivers/base/core.c:2106
usb_set_configuration+0xdf7/0x1740 drivers/usb/core/message.c:2023
generic_probe+0xa2/0xda drivers/usb/core/generic.c:210
usb_probe_device+0xc0/0x150 drivers/usb/core/driver.c:266
really_probe+0x2da/0xb10 drivers/base/dd.c:509
driver_probe_device+0x21d/0x350 drivers/base/dd.c:671
__device_attach_driver+0x1d8/0x290 drivers/base/dd.c:778
bus_for_each_drv+0x163/0x1e0 drivers/base/bus.c:454
__device_attach+0x223/0x3a0 drivers/base/dd.c:844
bus_probe_device+0x1f1/0x2a0 drivers/base/bus.c:514
device_add+0xad2/0x16e0 drivers/base/core.c:2106
usb_new_device.cold+0x537/0xccf drivers/usb/core/hub.c:2534
hub_port_connect drivers/usb/core/hub.c:5089 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5204 [inline]
port_event drivers/usb/core/hub.c:5350 [inline]
hub_event+0x138e/0x3b00 drivers/usb/core/hub.c:5432
process_one_work+0x90f/0x1580 kernel/workqueue.c:2269
process_scheduled_works kernel/workqueue.c:2331 [inline]
worker_thread+0x7b0/0xe20 kernel/workqueue.c:2417
kthread+0x313/0x420 kernel/kthread.c:253
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352

The buggy address belongs to the variable:
video_nr+0x20/0x1be0

Memory state around the buggy address:
ffffffff92f2ff80: fa fa fa fa 04 fa fa fa fa fa fa fa 04 fa fa fa
ffffffff92f30000: fa fa fa fa 04 fa fa fa fa fa fa fa 00 00 00 00
> ffffffff92f30080: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
^
ffffffff92f30100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffffff92f30180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages