KASAN: slab-use-after-free Read in strrchr

Status: premoderation: reported syz repro on 2026/10/13 01:47
Reported-by: syzbot+5750f218ee7db53f6388@syzkaller.appspotmail.com
First crash: 12h29m, last: 3h52m

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in strrchr+0x5e/0x80 lib/string.c:373
Read of size 1 at addr ffff888102f4dd80 by task kworker/1:0/31

CPU: 1 UID: 0 PID: 31 Comm: kworker/1:0 Not tainted syzkaller #0 4bc62a9bdafb808e3133dbe6927c9cb60f98f7d5
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:94
 dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120
 print_address_description+0x71/0x210 mm/kasan/report.c:377
 print_report+0x4a/0x70 mm/kasan/report.c:481
 kasan_report+0x162/0x1a0 mm/kasan/report.c:594
 __asan_report_load1_noabort+0x18/0x20 mm/kasan/report_generic.c:378
 strrchr+0x5e/0x80 lib/string.c:373
 hid_compare_device_paths+0x47/0xb0 drivers/hid/hid-core.c:2714
 wacom_get_hdev_data drivers/hid/wacom_sys.c:826 [inline]
 wacom_add_shared_data drivers/hid/wacom_sys.c:884 [inline]
 wacom_parse_and_register+0x4401/0x6270 drivers/hid/wacom_sys.c:2414
 wacom_probe+0x7f6/0xa20 drivers/hid/wacom_sys.c:2860
 __hid_device_probe drivers/hid/hid-core.c:2760 [inline]
 hid_device_probe+0x2ce/0x5f0 drivers/hid/hid-core.c:2797
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2e1/0x8b0 drivers/base/dd.c:657
 __driver_probe_device+0x193/0x280 drivers/base/dd.c:799
 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829
 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957
 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459
 __device_attach+0x2c4/0x3c0 drivers/base/dd.c:1029
 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078
 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534
 device_add+0x7fd/0xbf0 drivers/base/core.c:3692
 hid_add_device+0x3c4/0x5a0 drivers/hid/hid-core.c:2943
 usbhid_probe+0xdca/0x1310 drivers/hid/usbhid/hid-core.c:1451
 usb_probe_interface+0x6ab/0xbf0 drivers/usb/core/driver.c:400
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2e1/0x8b0 drivers/base/dd.c:657
 __driver_probe_device+0x193/0x280 drivers/base/dd.c:799
 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829
 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957
 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459
 __device_attach+0x2c4/0x3c0 drivers/base/dd.c:1029
 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078
 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534
 device_add+0x7fd/0xbf0 drivers/base/core.c:3692
 usb_set_configuration+0x1aad/0x2080 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x95/0x160 drivers/usb/core/generic.c:254
 usb_probe_device+0x1ef/0x3b0 drivers/usb/core/driver.c:295
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2e1/0x8b0 drivers/base/dd.c:657
 __driver_probe_device+0x193/0x280 drivers/base/dd.c:799
 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829
 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957
 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459
 __device_attach+0x2c4/0x3c0 drivers/base/dd.c:1029
 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078
 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534
 device_add+0x7fd/0xbf0 drivers/base/core.c:3692
 usb_new_device+0x98d/0x1500 drivers/usb/core/hub.c:2703
 hub_port_connect drivers/usb/core/hub.c:5574 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5714 [inline]
 port_event drivers/usb/core/hub.c:5878 [inline]
 hub_event+0x2dbd/0x4360 drivers/usb/core/hub.c:5960
 process_one_work kernel/workqueue.c:3273 [inline]
 process_scheduled_works+0x7f7/0x1060 kernel/workqueue.c:3354
 worker_thread+0xc99/0x13f0 kernel/workqueue.c:3435
 kthread+0x2c7/0x360 kernel/kthread.c:389
 ret_from_fork+0x67/0xa0 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Allocated by task 63:
 kasan_save_stack mm/kasan/common.c:49 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
 kasan_save_alloc_info+0x3a/0x50 mm/kasan/generic.c:565
 poison_kmalloc_redzone mm/kasan/common.c:379 [inline]
 __kasan_kmalloc+0x96/0xb0 mm/kasan/common.c:396
 kasan_kmalloc include/linux/kasan.h:261 [inline]
 __kmalloc_cache_noprof+0x23c/0x470 mm/slub.c:4426
 kmalloc_noprof include/linux/slab.h:882 [inline]
 kzalloc_noprof include/linux/slab.h:1117 [inline]
 hid_allocate_device+0x5e/0x3d0 drivers/hid/hid-core.c:2967
 usbhid_probe+0x3cc/0x1310 drivers/hid/usbhid/hid-core.c:1384
 usb_probe_interface+0x6ab/0xbf0 drivers/usb/core/driver.c:400
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2e1/0x8b0 drivers/base/dd.c:657
 __driver_probe_device+0x193/0x280 drivers/base/dd.c:799
 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829
 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957
 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459
 __device_attach+0x2c4/0x3c0 drivers/base/dd.c:1029
 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078
 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534
 device_add+0x7fd/0xbf0 drivers/base/core.c:3692
 usb_set_configuration+0x1aad/0x2080 drivers/usb/core/message.c:2268
 usb_generic_driver_probe+0x95/0x160 drivers/usb/core/generic.c:254
 usb_probe_device+0x1ef/0x3b0 drivers/usb/core/driver.c:295
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2e1/0x8b0 drivers/base/dd.c:657
 __driver_probe_device+0x193/0x280 drivers/base/dd.c:799
 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829
 __device_attach_driver+0x2f1/0x4b0 drivers/base/dd.c:957
 bus_for_each_drv+0x264/0x300 drivers/base/bus.c:459
 __device_attach+0x2c4/0x3c0 drivers/base/dd.c:1029
 device_initial_probe+0x1e/0x30 drivers/base/dd.c:1078
 bus_probe_device+0x18b/0x270 drivers/base/bus.c:534
 device_add+0x7fd/0xbf0 drivers/base/core.c:3692
 usb_new_device+0x98d/0x1500 drivers/usb/core/hub.c:2703
 hub_port_connect drivers/usb/core/hub.c:5574 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5714 [inline]
 port_event drivers/usb/core/hub.c:5878 [inline]
 hub_event+0x2dbd/0x4360 drivers/usb/core/hub.c:5960
 process_one_work kernel/workqueue.c:3273 [inline]
 process_scheduled_works+0x7f7/0x1060 kernel/workqueue.c:3354
 worker_thread+0xc99/0x13f0 kernel/workqueue.c:3435
 kthread+0x2c7/0x360 kernel/kthread.c:389
 ret_from_fork+0x67/0xa0 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Freed by task 63:
 kasan_save_stack mm/kasan/common.c:49 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
 kasan_save_free_info+0x44/0x50 mm/kasan/generic.c:579
 poison_slab_object mm/kasan/common.c:249 [inline]
 __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:266
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2445 [inline]
 slab_free mm/slub.c:4714 [inline]
 kfree+0x158/0x440 mm/slub.c:4875
 hiddev_free drivers/hid/hid-core.c:746 [inline]
 kref_put include/linux/kref.h:65 [inline]
 hid_device_release+0x8e/0xd0 drivers/hid/hid-core.c:753
 device_release+0xab/0x1e0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x1a7/0x2a0 lib/kobject.c:737
 put_device+0x23/0x40 drivers/base/core.c:3800
 hid_destroy_device+0xe7/0x110 drivers/hid/hid-core.c:3021
 usbhid_disconnect+0xa3/0xc0 drivers/hid/usbhid/hid-core.c:1478
 usb_unbind_interface+0x2ad/0xa40 drivers/usb/core/driver.c:462
 device_remove drivers/base/dd.c:569 [inline]
 __device_release_driver drivers/base/dd.c:1272 [inline]
 device_release_driver_internal+0x525/0x830 drivers/base/dd.c:1295
 device_release_driver+0x1d/0x30 drivers/base/dd.c:1318
 bus_remove_device+0x34f/0x370 drivers/base/bus.c:576
 device_del+0x583/0xcf0 drivers/base/core.c:3881
 usb_disable_device+0x3af/0x770 drivers/usb/core/message.c:1476
 usb_disconnect+0x331/0x950 drivers/usb/core/hub.c:2353
 hub_port_connect drivers/usb/core/hub.c:5414 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5714 [inline]
 port_event drivers/usb/core/hub.c:5878 [inline]
 hub_event+0x1ad5/0x4360 drivers/usb/core/hub.c:5960
 process_one_work kernel/workqueue.c:3273 [inline]
 process_scheduled_works+0x7f7/0x1060 kernel/workqueue.c:3354
 worker_thread+0xc99/0x13f0 kernel/workqueue.c:3435
 kthread+0x2c7/0x360 kernel/kthread.c:389
 ret_from_fork+0x67/0xa0 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

The buggy address belongs to the object at ffff888102f4c000
 which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 7552 bytes inside of
 freed 8192-byte region [ffff888102f4c000, ffff888102f4e000)

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f48
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x4000000000000040(head|zone=1)
page_type: f5(slab)
raw: 4000000000000040 ffff888100042280 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000020002 00000001f5000000 0000000000000000
head: 4000000000000040 ffff888100042280 dead000000000100 dead000000000122
head: 0000000000000000 0000000000020002 00000001f5000000 0000000000000000
head: 4000000000000003 ffffea00040bd201 ffffffffffffffff 0000000000000000
head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 46, tgid 46 (kworker/u8:2), ts 3746857421, free_ts 0
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook+0x37d/0x3b0 mm/page_alloc.c:1864
 prep_new_page+0x2d/0x180 mm/page_alloc.c:1872
 get_page_from_freelist+0x4aea/0x4ba0 mm/page_alloc.c:3949
 __alloc_pages_noprof+0x35a/0x7e0 mm/page_alloc.c:5316
 alloc_slab_page+0x6b/0x1e0 mm/slub.c:-1
 allocate_slab+0x69/0x430 mm/slub.c:2687
 new_slab mm/slub.c:2741 [inline]
 ___slab_alloc+0x591/0x8c0 mm/slub.c:3934
 __slab_alloc mm/slub.c:4025 [inline]
 __slab_alloc_node mm/slub.c:4078 [inline]
 slab_alloc_node mm/slub.c:4239 [inline]
 __do_kmalloc_node mm/slub.c:4394 [inline]
 __kmalloc_node_noprof+0x2e7/0x500 mm/slub.c:4401
 __kvmalloc_node_noprof+0x128/0x300 mm/util.c:672
 sbitmap_init_node+0x2e6/0x7c0 lib/sbitmap.c:132
 scsi_realloc_sdev_budget_map+0x26d/0x3e0 drivers/scsi/scsi_scan.c:246
 scsi_alloc_sdev+0x846/0xcc0 drivers/scsi/scsi_scan.c:356
 scsi_probe_and_add_lun+0x1e9/0x3e60 drivers/scsi/scsi_scan.c:1207
 __scsi_scan_target+0x1f1/0xc20 drivers/scsi/scsi_scan.c:1754
 scsi_scan_channel drivers/scsi/scsi_scan.c:1842 [inline]
 scsi_scan_host_selected+0x352/0x610 drivers/scsi/scsi_scan.c:1871
 do_scsi_scan_host drivers/scsi/scsi_scan.c:2010 [inline]
 do_scan_async+0x131/0x790 drivers/scsi/scsi_scan.c:2020
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888102f4dc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888102f4dd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888102f4dd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff888102f4de00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888102f4de80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
wacom 0003:056A:0084.0028: hidraw0: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.3-1/input1
usbhid 4-1:1.2: can't add hid device: -71
usbhid 4-1:1.2: probe with driver usbhid failed with error -71
usb 4-1: USB disconnect, device number 6
usb 5-1: new high-speed USB device number 7 using dummy_hcd
usb 5-1: New USB device found, idVendor=056a, idProduct=0084, bcdDevice= 1.00
usb 5-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
wacom 0003:056A:0084.002B: hidraw2: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.4-1/input0
wacom 0003:056A:0084.002F: hidraw6: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.4-1/input1
usbhid 5-1:1.2: can't add hid device: -71
usbhid 5-1:1.2: probe with driver usbhid failed with error -71
usb 5-1: USB disconnect, device number 7
usb 6-1: new high-speed USB device number 8 using dummy_hcd
usb 6-1: New USB device found, idVendor=056a, idProduct=0084, bcdDevice= 1.00
usb 6-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
wacom 0003:056A:0084.0031: hidraw0: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.5-1/input0
wacom 0003:056A:0084.0035: hidraw4: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.5-1/input1
usbhid 6-1:1.2: can't add hid device: -71
usbhid 6-1:1.2: probe with driver usbhid failed with error -71
usb 6-1: USB disconnect, device number 8
usb 3-1: new high-speed USB device number 9 using dummy_hcd
usb 3-1: New USB device found, idVendor=056a, idProduct=0084, bcdDevice= 1.00
usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
wacom 0003:056A:0084.003A: hidraw1: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.2-1/input0
wacom 0003:056A:0084.003E: hidraw5: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.2-1/input1
usbhid 3-1:1.2: can't add hid device: -71
usbhid 3-1:1.2: probe with driver usbhid failed with error -71
usb 3-1: USB disconnect, device number 9
usb 3-1: new high-speed USB device number 10 using dummy_hcd
usb 3-1: New USB device found, idVendor=056a, idProduct=0084, bcdDevice= 1.00
usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
wacom 0003:056A:0084.0042: hidraw1: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.2-1/input0
wacom 0003:056A:0084.0046: hidraw5: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.2-1/input1
usbhid 3-1:1.2: can't add hid device: -71
usbhid 3-1:1.2: probe with driver usbhid failed with error -71
usb 3-1: USB disconnect, device number 10
usb 3-1: new high-speed USB device number 11 using dummy_hcd

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/13 10:22 android16-6.12 3f843d670131 5a1eeac4 .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in strrchr
2026/10/13 01:46 android16-6.12 602cc832d2b7 745a967f .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in strrchr
* Struck through repros no longer work on HEAD.