syzbot


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

Status: fixed on 2019/10/15 23:40
Subsystems: media usb
[Documentation on labels]
Reported-by: syzbot+8a8f48672560c8ca59dd@syzkaller.appspotmail.com
Fix commit: c268e7adea52 media: dvb-frontends: use ida for pll number
First crash: 1982d, last: 1922d
Discussions (12)
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 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.19 001/128] ALSA: hda: Flush interrupts on disabling 128 (128) 2019/09/22 18:54
KASAN: global-out-of-bounds Read in dvb_pll_attach 4 (6) 2019/08/14 11:32
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
[PATCHv2] libertas: add terminating entry to fw_table 1 (1) 2019/07/23 13:52
KASAN: global-out-of-bounds Read in dvb_pll_attach 1 (2) 2019/07/19 07:52
[PATCH] libertas: add terminating entry to fw_table 2 (2) 2019/07/11 15:54
Last patch testing requests (4)
Created Duration User Patch Repo Result
2019/07/19 07:33 17m bnvandana@gmail.com patch https://github.com/google/kasan.git usb-fuzzer OK
2019/07/17 11:51 18m andreyknvl@google.com patch https://github.com/google/kasan.git usb-fuzzer OK
2019/07/16 22:12 18m bnvandana@gmail.com patch https://github.com/google/kasan.git usb-fuzzer OK
2019/07/16 20:08 20m bnvandana@gmail.com https://github.com/vandanabn/linux e9f92f267f0c6824dd129d688ac7d1e69a6d6e32 OK

Sample crash report:
usb 1-1: DVB: registering adapter 0 frontend 0 (Toshiba TC90522 ISDB-T module)...
dvbdev: dvb_create_media_entity: media entity 'Toshiba TC90522 ISDB-T module' registered.
==================================================================
BUG: KASAN: global-out-of-bounds in dvb_pll_attach+0x6c5/0x830 drivers/media/dvb-frontends/dvb-pll.c:798
Read of size 4 at addr ffffffff89a6d920 by task kworker/1:1/22

CPU: 1 PID: 22 Comm: kworker/1:1 Not tainted 5.3.0-rc7+ #0
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:618
 dvb_pll_attach+0x6c5/0x830 drivers/media/dvb-frontends/dvb-pll.c:798
 dvb_pll_probe+0xfe/0x174 drivers/media/dvb-frontends/dvb-pll.c:877
 i2c_device_probe+0x762/0xa60 drivers/i2c/i2c-core-base.c:391
 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
 i2c_new_client_device+0x57f/0x9b0 drivers/i2c/i2c-core-base.c:779
 i2c_new_device+0x19/0x50 drivers/i2c/i2c-core-base.c:822
 dvb_module_probe+0xf9/0x220 drivers/media/dvb-core/dvbdev.c:985
 friio_tuner_attach+0x125/0x1d0 drivers/media/usb/dvb-usb-v2/gl861.c:536
 dvb_usbv2_adapter_frontend_init drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:675 [inline]
 dvb_usbv2_adapter_init drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:804 [inline]
 dvb_usbv2_init drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:865 [inline]
 dvb_usbv2_probe.cold+0x24dc/0x2567 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:980
 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:
 id+0x100/0x120

Memory state around the buggy address:
 ffffffff89a6d800: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffff89a6d880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffff89a6d900: 00 00 00 00 fa fa fa fa 04 fa fa fa fa fa fa fa
                               ^
 ffffffff89a6d980: 04 fa fa fa fa fa fa fa 04 fa fa fa fa fa fa fa
 ffffffff89a6da00: 04 fa fa fa fa fa fa fa 04 fa fa fa fa fa fa fa
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/08 06:38 https://github.com/google/kasan.git usb-fuzzer f0df5c1be1e9 a60cb4cd .config console log report syz C ci2-upstream-usb
2019/07/10 15:50 https://github.com/google/kasan.git usb-fuzzer 7829a896a587 f62e1e85 .config console log report syz C ci2-upstream-usb
* Struck through repros no longer work on HEAD.