syzbot


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

Status: fixed on 2019/10/15 23:40
Subsystems: usb media
[Documentation on labels]
Reported-by: syzbot+aac8d0d7205f112045d2@syzkaller.appspotmail.com
Fix commit: d4a6a9537bc3 media: hdpvr: Add device num check and handling
First crash: 1674d, last: 1560d
Discussions (21)
Title Replies (including bot) Last reply
[PATCH 5.2 000/313] 5.2.19-stable review 324 (324) 2020/06/23 22:07
[PATCH 4.19 000/211] 4.19.77-stable review 227 (227) 2019/11/12 00:25
[PATCH 5.3 000/344] 5.3.4-stable review 360 (360) 2019/11/11 06:01
[PATCH 4.14 000/185] 4.14.147-stable review 191 (191) 2019/10/05 00:10
[PATCH 4.9 000/129] 4.9.195-stable review 135 (135) 2019/10/04 22:56
[PATCH 4.4 00/99] 4.4.195-stable review 105 (105) 2019/10/04 22:55
[PATCH AUTOSEL 5.2 001/185] ALSA: hda: Flush interrupts on disabling 191 (191) 2019/10/02 19:16
[PATCH AUTOSEL 5.3 001/203] ALSA: hda: Flush interrupts on disabling 217 (217) 2019/10/02 14:35
[PATCH AUTOSEL 4.4 01/44] ALSA: hda: Flush interrupts on disabling 44 (44) 2019/09/22 19:01
[PATCH AUTOSEL 4.9 01/60] ALSA: hda: Flush interrupts on disabling 60 (60) 2019/09/22 18:59
[PATCH AUTOSEL 4.14 01/89] ALSA: hda: Flush interrupts on disabling 89 (89) 2019/09/22 18:57
[PATCH AUTOSEL 4.19 001/128] ALSA: hda: Flush interrupts on disabling 128 (128) 2019/09/22 18:54
Reminder: 35 open syzbot bugs in media subsystem 1 (1) 2019/07/24 01:39
Reminder: 67 open syzbot bugs in usb subsystem 1 (1) 2019/07/24 01:35
[PATCH RESEND] media: hdpvr: Add device num check and handling 1 (1) 2019/07/17 14:19
Reminder: 47 open syzbot bugs in usb subsystem 1 (1) 2019/07/09 19:01
[PATCH RESEND] media: hdpvr: Add device num check and handling 1 (1) 2019/07/06 09:23
[Linux-kernel-mentees,PATCH] media: hdpvr: Add device num check and handling 1 (1) 2019/07/01 13:22
Reminder: 28 open syzbot bugs in media subsystem 1 (1) 2019/06/27 03:53
Reminder: 42 open syzbot bugs in usb subsystem 1 (1) 2019/06/25 03:44
KASAN: global-out-of-bounds Read in hdpvr_probe 0 (1) 2019/05/02 12:36
Last patch testing requests (1)
Created Duration User Patch Repo Result
2019/07/01 01:00 40m lnowakow@eng.ucsd.edu patch https://github.com/google/kasan.git usb-fuzzer OK

Sample crash report:
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 1-1: config 0 descriptor??
hdpvr 1-1:0.26: firmware version 0x8 dated u]JXY[T$kMsgA& upP+
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+0x11b3/0x1247 drivers/media/usb/hdpvr/hdpvr-core.c:371
Read of size 4 at addr ffffffff87540ce0 by task kworker/0:1/12

CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.3.0-rc5+ #28
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+0xca/0x13e lib/dump_stack.c:113
 print_address_description+0x6a/0x32c mm/kasan/report.c:351
 __kasan_report.cold+0x1a/0x33 mm/kasan/report.c:482
 kasan_report+0xe/0x12 mm/kasan/common.c:612
 hdpvr_probe.cold+0x11b3/0x1247 drivers/media/usb/hdpvr/hdpvr-core.c:371
 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361
 really_probe+0x281/0x6d0 drivers/base/dd.c:548
 driver_probe_device+0x101/0x1b0 drivers/base/dd.c:721
 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828
 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:454
 __device_attach+0x217/0x360 drivers/base/dd.c:894
 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:514
 device_add+0xae6/0x16f0 drivers/base/core.c:2165
 usb_set_configuration+0xdf6/0x1670 drivers/usb/core/message.c:2023
 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210
 usb_probe_device+0x99/0x100 drivers/usb/core/driver.c:266
 really_probe+0x281/0x6d0 drivers/base/dd.c:548
 driver_probe_device+0x101/0x1b0 drivers/base/dd.c:721
 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828
 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:454
 __device_attach+0x217/0x360 drivers/base/dd.c:894
 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:514
 device_add+0xae6/0x16f0 drivers/base/core.c:2165
 usb_new_device.cold+0x6a4/0xe79 drivers/usb/core/hub.c:2536
 hub_port_connect drivers/usb/core/hub.c:5098 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5213 [inline]
 port_event drivers/usb/core/hub.c:5359 [inline]
 hub_event+0x1b5c/0x3640 drivers/usb/core/hub.c:5441
 process_one_work+0x92b/0x1530 kernel/workqueue.c:2269
 process_scheduled_works kernel/workqueue.c:2331 [inline]
 worker_thread+0x7ab/0xe20 kernel/workqueue.c:2417
 kthread+0x318/0x420 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352

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

Memory state around the buggy address:
 ffffffff87540b80: 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa fa
 ffffffff87540c00: 04 fa fa fa fa fa fa fa 04 fa fa fa fa fa fa fa
>ffffffff87540c80: 04 fa fa fa fa fa fa fa 00 00 00 00 fa fa fa fa
                                                       ^
 ffffffff87540d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffff87540d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/08/23 20:49 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 78ded196 .config console log report syz C ci2-upstream-usb
2019/08/20 22:09 https://github.com/google/kasan.git usb-fuzzer eea39f24f4a5 6b8391d0 .config console log report syz C ci2-upstream-usb
2019/08/15 01:57 https://github.com/google/kasan.git usb-fuzzer d0847550e22d 0d298d6b .config console log report syz C ci2-upstream-usb
2019/08/09 13:23 https://github.com/google/kasan.git usb-fuzzer e96407b49762 ede31a9b .config console log report syz C ci2-upstream-usb
2019/07/23 11:57 https://github.com/google/kasan.git usb-fuzzer 6a3599ceaa39 bb071d58 .config console log report syz C ci2-upstream-usb
2019/07/23 00:30 https://github.com/google/kasan.git usb-fuzzer 6a3599ceaa39 55e0c077 .config console log report syz C ci2-upstream-usb
2019/07/09 21:04 https://github.com/google/kasan.git usb-fuzzer 7829a896a587 f62e1e85 .config console log report syz C ci2-upstream-usb
2019/07/07 05:14 https://github.com/google/kasan.git usb-fuzzer 7829a896a587 f62e1e85 .config console log report syz C ci2-upstream-usb
2019/07/05 13:50 https://github.com/google/kasan.git usb-fuzzer 7829a896a587 429efa16 .config console log report syz C ci2-upstream-usb
2019/07/05 10:36 https://github.com/google/kasan.git usb-fuzzer 7829a896a587 429efa16 .config console log report syz C ci2-upstream-usb
2019/07/04 03:41 https://github.com/google/kasan.git usb-fuzzer 7829a896a587 55565fa0 .config console log report syz C ci2-upstream-usb
2019/07/01 09:24 https://github.com/google/kasan.git usb-fuzzer 7829a896a587 699d6448 .config console log report syz C ci2-upstream-usb
2019/06/28 22:34 https://github.com/google/kasan.git usb-fuzzer 7829a896a587 7509bf36 .config console log report syz C ci2-upstream-usb
2019/06/25 20:24 https://github.com/google/kasan.git usb-fuzzer 9939f56ee6c0 0a8d1a96 .config console log report syz C ci2-upstream-usb
2019/05/01 07:50 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 618456b4 .config console log report syz C ci2-upstream-usb
* Struck through repros no longer work on HEAD.