syzbot


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

Status: auto-obsoleted due to no activity on 2023/01/18 21:51
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+cf1553a86d1962a0c79f@syzkaller.appspotmail.com
First crash: 941d, last: 940d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] KASAN: global-out-of-bounds Read in usb_match_device 1 (2) 2021/10/09 11:18
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/01/18 12:32 19m retest repro https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing OK log
2022/09/05 04:27 16m retest repro https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing error OK

Sample crash report:
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: syz
usb 1-1: Manufacturer: syz
usb 1-1: SerialNumber: syz
usb 1-1: config 0 descriptor??
==================================================================
BUG: KASAN: global-out-of-bounds in usb_match_device+0x4dc/0x550 drivers/usb/core/driver.c:641
Read of size 2 at addr ffffffff87bdfd50 by task kworker/0:1/7

CPU: 0 PID: 7 Comm: kworker/0:1 Not tainted 5.15.0-rc3-syzkaller #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:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_address_description.constprop.0.cold+0xf/0x309 mm/kasan/report.c:256
 __kasan_report mm/kasan/report.c:442 [inline]
 kasan_report.cold+0x83/0xdf mm/kasan/report.c:459
 usb_match_device+0x4dc/0x550 drivers/usb/core/driver.c:641
 usb_match_one_id drivers/usb/core/driver.c:722 [inline]
 usb_match_id.part.0+0x10d/0x1b0 drivers/usb/core/driver.c:816
 usb_match_id+0x23/0x40 drivers/usb/core/driver.c:806
 ehset_prepare_port_for_testing+0x4a/0xf0 drivers/usb/misc/ehset.c:43
 ehset_probe+0x271/0x460 drivers/usb/misc/ehset.c:82
 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396
 call_driver_probe drivers/base/dd.c:517 [inline]
 really_probe+0x245/0xcc0 drivers/base/dd.c:596
 __driver_probe_device+0x338/0x4d0 drivers/base/dd.c:751
 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:781
 __device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:898
 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
 __device_attach+0x228/0x4a0 drivers/base/dd.c:969
 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
 device_add+0xc35/0x21b0 drivers/base/core.c:3359
 usb_set_configuration+0x113f/0x1910 drivers/usb/core/message.c:2170
 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238
 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:517 [inline]
 really_probe+0x245/0xcc0 drivers/base/dd.c:596
 __driver_probe_device+0x338/0x4d0 drivers/base/dd.c:751
 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:781
 __device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:898
 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
 __device_attach+0x228/0x4a0 drivers/base/dd.c:969
 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
 device_add+0xc35/0x21b0 drivers/base/core.c:3359
 usb_new_device.cold+0x63f/0x108e drivers/usb/core/hub.c:2563
 hub_port_connect drivers/usb/core/hub.c:5348 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5488 [inline]
 port_event drivers/usb/core/hub.c:5634 [inline]
 hub_event+0x2357/0x4330 drivers/usb/core/hub.c:5716
 process_one_work+0x9bf/0x1620 kernel/workqueue.c:2297
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444
 kthread+0x3c2/0x4a0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the variable:
 platform_bus+0x530/0x560

Memory state around the buggy address:
 ffffffff87bdfc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffff87bdfc80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffff87bdfd00: 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
                                                 ^
 ffffffff87bdfd80: 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9
 ffffffff87bdfe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (17):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/05 11:34 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 89e84f946479 ce697b49 .config console log report syz C ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/07 04:44 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f3351eca1fb1 62ee0987 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/07 02:37 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f3351eca1fb1 62ee0987 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/06 23:55 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f3351eca1fb1 62ee0987 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/06 23:05 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f3351eca1fb1 62ee0987 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/06 22:04 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f3351eca1fb1 62ee0987 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/06 17:04 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f3351eca1fb1 0a63fd36 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/06 15:49 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f3351eca1fb1 0a63fd36 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/06 14:13 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f3351eca1fb1 0a63fd36 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/05 22:34 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 89e84f946479 8a6b1a8d .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/05 19:15 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 89e84f946479 8a6b1a8d .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/05 18:55 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 89e84f946479 8a6b1a8d .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/05 16:07 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 89e84f946479 8a6b1a8d .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/05 16:04 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 89e84f946479 8a6b1a8d .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/05 11:53 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 89e84f946479 ce697b49 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/05 11:13 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 89e84f946479 ce697b49 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
2021/10/05 11:07 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 89e84f946479 ce697b49 .config console log report info ci2-upstream-usb KASAN: global-out-of-bounds Read in usb_match_device
* Struck through repros no longer work on HEAD.