syzbot


KASAN: slab-out-of-bounds Read in mon_bin_event

Status: upstream: reported C repro on 2025/07/20 05:22
Bug presence: origin:lts
[Documentation on labels]
Reported-by: syzbot+e2e9330a80dfff0f2fd3@syzkaller.appspotmail.com
First crash: 69d, last: 22d
Bug presence (3)
Date Name Commit Repro Result
2025/07/22 lts (merge base) 58485ff1a74f C [report] KASAN: slab-out-of-bounds Read in mon_bin_event
2025/09/13 lts (merge base) 3594f306da12 C Didn't crash
2025/07/22 upstream (ToT) 89be9a83ccf1 C Didn't crash
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-12 KASAN: slab-out-of-bounds Read in mon_bin_event origin:upstream 17 C 56 33d 82d 0/1 premoderation: reported C repro on 2025/06/29 20:21
upstream KASAN: slab-out-of-bounds Read in mon_bin_event usb 17 C 21 65d 79d 0/29 upstream: reported C repro on 2025/07/02 17:42
android-5-15 KASAN: slab-out-of-bounds Read in mon_bin_event origin:downstream 17 C 3 13d 13d 0/2 upstream: reported C repro on 2025/09/06 17:28
android-5-10 KASAN: slab-out-of-bounds Read in mon_bin_event 17 C 60 25d 80d 0/2 upstream: reported C repro on 2025/07/01 18:26
Last patch testing requests (1)
Created Duration User Patch Repo Result
2025/08/10 08:51 16m retest repro android14-6.1 report log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in mon_copy_to_buff drivers/usb/mon/mon_bin.c:249 [inline]
BUG: KASAN: slab-out-of-bounds in mon_bin_get_data drivers/usb/mon/mon_bin.c:417 [inline]
BUG: KASAN: slab-out-of-bounds in mon_bin_event+0x1320/0x24f0 drivers/usb/mon/mon_bin.c:603
Read of size 3776 at addr ffff8881112e3321 by task kworker/0:4/395

CPU: 0 PID: 395 Comm: kworker/0:4 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106
 print_address_description+0x71/0x210 mm/kasan/report.c:316
 print_report+0x4a/0x60 mm/kasan/report.c:427
 kasan_report+0x122/0x150 mm/kasan/report.c:531
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x280/0x290 mm/kasan/generic.c:189
 memcpy+0x2d/0x70 mm/kasan/shadow.c:65
 mon_copy_to_buff drivers/usb/mon/mon_bin.c:249 [inline]
 mon_bin_get_data drivers/usb/mon/mon_bin.c:417 [inline]
 mon_bin_event+0x1320/0x24f0 drivers/usb/mon/mon_bin.c:603
 mon_bin_submit+0x27/0x30 drivers/usb/mon/mon_bin.c:623
 mon_bus_submit drivers/usb/mon/mon_main.c:91 [inline]
 mon_submit+0x1a1/0x210 drivers/usb/mon/mon_main.c:103
 usbmon_urb_submit include/linux/usb/hcd.h:721 [inline]
 usb_hcd_submit_urb+0x129/0x1830 drivers/usb/core/hcd.c:1545
 usb_submit_urb+0x122d/0x1900 drivers/usb/core/urb.c:596
 usb_start_wait_urb+0x117/0x2f0 drivers/usb/core/message.c:58
 usb_internal_control_msg drivers/usb/core/message.c:102 [inline]
 usb_control_msg+0x241/0x3f0 drivers/usb/core/message.c:153
 usbhid_set_raw_report drivers/hid/usbhid/hid-core.c:926 [inline]
 usbhid_raw_request+0x453/0x580 drivers/hid/usbhid/hid-core.c:1297
 __hid_request+0x1e0/0x3a0 drivers/hid/hid-core.c:1951
 hidinput_change_resolution_multipliers drivers/hid/hid-input.c:1955 [inline]
 hidinput_connect+0x22c4/0x31b0 drivers/hid/hid-input.c:2332
 hid_connect+0x496/0x1960 drivers/hid/hid-core.c:2182
 hid_hw_start+0xbf/0x150 drivers/hid/hid-core.c:2295
 ms_probe+0x190/0x460 drivers/hid/hid-microsoft.c:391
 hid_device_probe+0x268/0x390 drivers/hid/hid-core.c:2626
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2cb/0x960 drivers/base/dd.c:639
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:808
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
 __device_attach_driver+0x2e9/0x4a0 drivers/base/dd.c:966
 bus_for_each_drv+0x183/0x210 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:1038
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087
 bus_probe_device+0xc0/0x1f0 drivers/base/bus.c:489
 device_add+0xb4d/0xef0 drivers/base/core.c:3698
 hid_add_device+0x38f/0x540 drivers/hid/hid-core.c:2778
 usbhid_probe+0xbb6/0xfa0 drivers/hid/usbhid/hid-core.c:1427
 usb_probe_interface+0x610/0xaf0 drivers/usb/core/driver.c:397
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2cb/0x960 drivers/base/dd.c:639
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:808
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
 __device_attach_driver+0x2e9/0x4a0 drivers/base/dd.c:966
 bus_for_each_drv+0x183/0x210 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:1038
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087
 bus_probe_device+0xc0/0x1f0 drivers/base/bus.c:489
 device_add+0xb4d/0xef0 drivers/base/core.c:3698
 usb_set_configuration+0x19c2/0x1f10 drivers/usb/core/message.c:2165
 usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x159/0x270 drivers/usb/core/driver.c:294
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2cb/0x960 drivers/base/dd.c:639
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:808
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
 __device_attach_driver+0x2e9/0x4a0 drivers/base/dd.c:966
 bus_for_each_drv+0x183/0x210 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:1038
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087
 bus_probe_device+0xc0/0x1f0 drivers/base/bus.c:489
 device_add+0xb4d/0xef0 drivers/base/core.c:3698
 usb_new_device+0xa70/0x1520 drivers/usb/core/hub.c:2656
 hub_port_connect drivers/usb/core/hub.c:5566 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5706 [inline]
 port_event drivers/usb/core/hub.c:5866 [inline]
 hub_event+0x2a5d/0x4680 drivers/usb/core/hub.c:5948
 process_one_work+0x71f/0xc40 kernel/workqueue.c:2302
 worker_thread+0xa29/0x11f0 kernel/workqueue.c:2449
 kthread+0x281/0x320 kernel/kthread.c:386
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Allocated by task 395:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 kasan_save_alloc_info+0x25/0x30 mm/kasan/generic.c:505
 ____kasan_kmalloc mm/kasan/common.c:379 [inline]
 __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:388
 kasan_kmalloc include/linux/kasan.h:212 [inline]
 __do_kmalloc_node mm/slab_common.c:938 [inline]
 __kmalloc+0xb1/0x1e0 mm/slab_common.c:951
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 hid_alloc_report_buf drivers/hid/hid-core.c:1877 [inline]
 __hid_request+0x9a/0x3a0 drivers/hid/hid-core.c:1942
 hidinput_change_resolution_multipliers drivers/hid/hid-input.c:1955 [inline]
 hidinput_connect+0x22c4/0x31b0 drivers/hid/hid-input.c:2332
 hid_connect+0x496/0x1960 drivers/hid/hid-core.c:2182
 hid_hw_start+0xbf/0x150 drivers/hid/hid-core.c:2295
 ms_probe+0x190/0x460 drivers/hid/hid-microsoft.c:391
 hid_device_probe+0x268/0x390 drivers/hid/hid-core.c:2626
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2cb/0x960 drivers/base/dd.c:639
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:808
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
 __device_attach_driver+0x2e9/0x4a0 drivers/base/dd.c:966
 bus_for_each_drv+0x183/0x210 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:1038
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087
 bus_probe_device+0xc0/0x1f0 drivers/base/bus.c:489
 device_add+0xb4d/0xef0 drivers/base/core.c:3698
 hid_add_device+0x38f/0x540 drivers/hid/hid-core.c:2778
 usbhid_probe+0xbb6/0xfa0 drivers/hid/usbhid/hid-core.c:1427
 usb_probe_interface+0x610/0xaf0 drivers/usb/core/driver.c:397
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2cb/0x960 drivers/base/dd.c:639
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:808
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
 __device_attach_driver+0x2e9/0x4a0 drivers/base/dd.c:966
 bus_for_each_drv+0x183/0x210 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:1038
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087
 bus_probe_device+0xc0/0x1f0 drivers/base/bus.c:489
 device_add+0xb4d/0xef0 drivers/base/core.c:3698
 usb_set_configuration+0x19c2/0x1f10 drivers/usb/core/message.c:2165
 usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x159/0x270 drivers/usb/core/driver.c:294
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2cb/0x960 drivers/base/dd.c:639
 __driver_probe_device+0x198/0x280 drivers/base/dd.c:808
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
 __device_attach_driver+0x2e9/0x4a0 drivers/base/dd.c:966
 bus_for_each_drv+0x183/0x210 drivers/base/bus.c:429
 __device_attach+0x2a2/0x400 drivers/base/dd.c:1038
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087
 bus_probe_device+0xc0/0x1f0 drivers/base/bus.c:489
 device_add+0xb4d/0xef0 drivers/base/core.c:3698
 usb_new_device+0xa70/0x1520 drivers/usb/core/hub.c:2656
 hub_port_connect drivers/usb/core/hub.c:5566 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5706 [inline]
 port_event drivers/usb/core/hub.c:5866 [inline]
 hub_event+0x2a5d/0x4680 drivers/usb/core/hub.c:5948
 process_one_work+0x71f/0xc40 kernel/workqueue.c:2302
 worker_thread+0xa29/0x11f0 kernel/workqueue.c:2449
 kthread+0x281/0x320 kernel/kthread.c:386
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the object at ffff8881112e3320
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 1 bytes inside of
 8-byte region [ffff8881112e3320, ffff8881112e3328)

The buggy address belongs to the physical page:
page:ffffea000444b8c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1112e3
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 ffffea0004224840 dead000000000002 ffff888100042300
raw: 0000000000000000 0000000080660066 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, tgid 1 (swapper/0), ts 1867757709, free_ts 0
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2637
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2644
 get_page_from_freelist+0x2c7b/0x2cf0 mm/page_alloc.c:4544
 __alloc_pages+0x1c3/0x450 mm/page_alloc.c:5858
 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
 allocate_slab mm/slub.c:1962 [inline]
 new_slab+0x98/0x3d0 mm/slub.c:2015
 ___slab_alloc+0x6f6/0xb50 mm/slub.c:3203
 __slab_alloc+0x5e/0xa0 mm/slub.c:3302
 slab_alloc_node mm/slub.c:3387 [inline]
 __kmem_cache_alloc_node+0x203/0x2c0 mm/slub.c:3462
 __do_kmalloc_node mm/slab_common.c:937 [inline]
 __kmalloc_node_track_caller+0xa0/0x1e0 mm/slab_common.c:958
 kstrdup mm/util.c:66 [inline]
 kstrdup_const+0x5a/0xa0 mm/util.c:89
 kvasprintf_const+0xd7/0x240 lib/kasprintf.c:-1
 kobject_set_name_vargs+0x61/0x110 lib/kobject.c:265
 kobject_add_varg lib/kobject.c:360 [inline]
 kobject_init_and_add+0xda/0x190 lib/kobject.c:449
 locate_module_kobject+0xe2/0x162 kernel/params.c:776
 kernel_add_sysfs_param+0x24/0x128 kernel/params.c:803
page_owner free stack trace missing

Memory state around the buggy address:
 ffff8881112e3200: fc 00 fc fc fc fc 00 fc fc fc fc fa fc fc fc fc
 ffff8881112e3280: 05 fc fc fc fc fa fc fc fc fc fa fc fc fc fc 04
>ffff8881112e3300: fc fc fc fc 07 fc fc fc fc 05 fc fc fc fc 05 fc
                               ^
 ffff8881112e3380: fc fc fc 04 fc fc fc fc 07 fc fc fc fc fa fc fc
 ffff8881112e3400: fc fc fb fc fc fc fc fa fc fc fc fc 06 fc fc fc
==================================================================
microsoft 0003:045E:07DA.0002: No inputs registered, leaving
microsoft 0003:045E:07DA.0002: hidraw0: USB HID v0.00 Device [HID 045e:07da] on usb-dummy_hcd.3-1/input0
microsoft 0003:045E:07DA.0002: no inputs found
microsoft 0003:045E:07DA.0002: could not initialize ff, continuing anyway
usb 4-1: USB disconnect, device number 3

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/28 11:53 android14-6.1 47b374a18638 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: slab-out-of-bounds Read in mon_bin_event
2025/07/26 22:08 android14-6.1 2ff414a09808 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: slab-out-of-bounds Read in mon_bin_event
2025/07/20 05:11 android14-6.1 145c7fad733f 7117feec .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: slab-out-of-bounds Read in mon_bin_event
2025/07/20 04:19 android14-6.1 145c7fad733f 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: slab-out-of-bounds Read in mon_bin_event
2025/07/12 10:49 android14-6.1 e2deb0b42a3a 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: slab-out-of-bounds Read in mon_bin_event
* Struck through repros no longer work on HEAD.