================================================================== BUG: KASAN: use-after-free in strrchr+0x5c/0x70 lib/string.c:501 Read of size 1 at addr ffff88811a07dd80 by task kworker/0:0/6 CPU: 0 PID: 6 Comm: kworker/0:0 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x10f/0x150 mm/kasan/report.c:444 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306 strrchr+0x5c/0x70 lib/string.c:501 hid_compare_device_paths+0x43/0xb0 drivers/hid/hid-core.c:2311 wacom_get_hdev_data drivers/hid/wacom_sys.c:832 [inline] wacom_add_shared_data drivers/hid/wacom_sys.c:890 [inline] wacom_parse_and_register+0x4efa/0x6d20 drivers/hid/wacom_sys.c:2410 wacom_probe+0x767/0x980 drivers/hid/wacom_sys.c:2862 hid_device_probe+0x28d/0x390 drivers/hid/hid-core.c:2363 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x27d/0x970 drivers/base/dd.c:595 __driver_probe_device+0x193/0x270 drivers/base/dd.c:755 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2b0/0x420 drivers/base/dd.c:979 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:489 device_add+0xaef/0xe90 drivers/base/core.c:3422 hid_add_device+0x349/0x4b0 drivers/hid/hid-core.c:2513 usbhid_probe+0xb93/0xf30 drivers/hid/usbhid/hid-core.c:1442 usb_probe_interface+0x60f/0xb20 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x27d/0x970 drivers/base/dd.c:595 __driver_probe_device+0x193/0x270 drivers/base/dd.c:755 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2b0/0x420 drivers/base/dd.c:979 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:489 device_add+0xaef/0xe90 drivers/base/core.c:3422 usb_set_configuration+0x1a01/0x1f70 drivers/usb/core/message.c:2223 usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x143/0x250 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x27d/0x970 drivers/base/dd.c:595 __driver_probe_device+0x193/0x270 drivers/base/dd.c:755 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2b0/0x420 drivers/base/dd.c:979 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:489 device_add+0xaef/0xe90 drivers/base/core.c:3422 usb_new_device+0xa1f/0x1720 drivers/usb/core/hub.c:2643 hub_port_connect drivers/usb/core/hub.c:5560 [inline] hub_port_connect_change drivers/usb/core/hub.c:5700 [inline] port_event drivers/usb/core/hub.c:5866 [inline] hub_event+0x291b/0x43f0 drivers/usb/core/hub.c:5948 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328 process_scheduled_works kernel/workqueue.c:2391 [inline] worker_thread+0xd4c/0x1250 kernel/workqueue.c:2477 kthread+0x3f5/0x4f0 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 63: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] ____kasan_kmalloc mm/kasan/common.c:512 [inline] __kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:521 kasan_kmalloc include/linux/kasan.h:227 [inline] kmem_cache_alloc_trace+0x119/0x270 mm/slub.c:3274 kmalloc include/linux/slab.h:619 [inline] kzalloc include/linux/slab.h:750 [inline] hid_allocate_device+0x50/0x2f0 drivers/hid/hid-core.c:2537 usbhid_probe+0x3c7/0xf30 drivers/hid/usbhid/hid-core.c:1376 usb_probe_interface+0x60f/0xb20 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x27d/0x970 drivers/base/dd.c:595 __driver_probe_device+0x193/0x270 drivers/base/dd.c:755 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2b0/0x420 drivers/base/dd.c:979 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:489 device_add+0xaef/0xe90 drivers/base/core.c:3422 usb_set_configuration+0x1a01/0x1f70 drivers/usb/core/message.c:2223 usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x143/0x250 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x27d/0x970 drivers/base/dd.c:595 __driver_probe_device+0x193/0x270 drivers/base/dd.c:755 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2b0/0x420 drivers/base/dd.c:979 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1028 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:489 device_add+0xaef/0xe90 drivers/base/core.c:3422 usb_new_device+0xa1f/0x1720 drivers/usb/core/hub.c:2643 hub_port_connect drivers/usb/core/hub.c:5560 [inline] hub_port_connect_change drivers/usb/core/hub.c:5700 [inline] port_event drivers/usb/core/hub.c:5866 [inline] hub_event+0x291b/0x43f0 drivers/usb/core/hub.c:5948 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328 process_scheduled_works kernel/workqueue.c:2391 [inline] worker_thread+0xd4c/0x1250 kernel/workqueue.c:2477 kthread+0x3f5/0x4f0 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Freed by task 63: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754 slab_free mm/slub.c:3526 [inline] kfree+0xc4/0x270 mm/slub.c:4588 hid_device_release+0x4b/0x50 drivers/hid/hid-core.c:718 device_release+0x96/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:713 [inline] kobject_release lib/kobject.c:744 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x18a/0x270 lib/kobject.c:761 put_device+0x1f/0x30 drivers/base/core.c:3530 hid_destroy_device+0xe3/0x110 drivers/hid/hid-core.c:2581 usbhid_disconnect+0x9f/0xc0 drivers/hid/usbhid/hid-core.c:1469 usb_unbind_interface+0x212/0x8a0 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1229 [inline] device_release_driver_internal+0x536/0x7c0 drivers/base/dd.c:1262 device_release_driver+0x19/0x20 drivers/base/dd.c:1285 bus_remove_device+0x2df/0x340 drivers/base/bus.c:531 device_del+0x62e/0xe20 drivers/base/core.c:3610 usb_disable_device+0x3a8/0x750 drivers/usb/core/message.c:1472 usb_disconnect+0x32d/0x870 drivers/usb/core/hub.c:2293 hub_port_connect drivers/usb/core/hub.c:5399 [inline] hub_port_connect_change drivers/usb/core/hub.c:5700 [inline] port_event drivers/usb/core/hub.c:5866 [inline] hub_event+0x19b0/0x43f0 drivers/usb/core/hub.c:5948 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328 process_scheduled_works kernel/workqueue.c:2391 [inline] worker_thread+0xd4c/0x1250 kernel/workqueue.c:2477 kthread+0x3f5/0x4f0 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88811a07c000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 7552 bytes inside of 8192-byte region [ffff88811a07c000, ffff88811a07e000) The buggy address belongs to the page: page:ffffea0004681e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11a078 head:ffffea0004681e00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 ffffea0004671000 0000000200000002 ffff888100043500 raw: 0000000000000000 0000000000020002 00000001ffffffff 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 20, ts 85969311105, free_ts 85963374323 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2610 prep_new_page+0x1c/0x110 mm/page_alloc.c:2616 get_page_from_freelist+0x2d42/0x2dd0 mm/page_alloc.c:4492 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5829 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1937 [inline] new_slab+0xa0/0x4d0 mm/slub.c:2000 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033 __slab_alloc+0x49/0x90 mm/slub.c:3120 slab_alloc_node mm/slub.c:3211 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc_trace+0x146/0x270 mm/slub.c:3272 kmalloc include/linux/slab.h:619 [inline] kzalloc include/linux/slab.h:750 [inline] hid_allocate_device+0x50/0x2f0 drivers/hid/hid-core.c:2537 usbhid_probe+0x3c7/0xf30 drivers/hid/usbhid/hid-core.c:1376 usb_probe_interface+0x60f/0xb20 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x27d/0x970 drivers/base/dd.c:595 __driver_probe_device+0x193/0x270 drivers/base/dd.c:755 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:785 __device_attach_driver+0x2a6/0x460 drivers/base/dd.c:907 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1477 [inline] free_pcp_prepare mm/page_alloc.c:1549 [inline] free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3540 free_unref_page+0xae/0x540 mm/page_alloc.c:3622 free_the_page mm/page_alloc.c:808 [inline] __free_pages+0x6c/0x100 mm/page_alloc.c:5905 __free_slab+0xe5/0x1e0 mm/slub.c:2025 free_slab mm/slub.c:2040 [inline] discard_slab mm/slub.c:2046 [inline] __unfreeze_partials+0x15a/0x190 mm/slub.c:2532 put_cpu_partial+0xc6/0x120 mm/slub.c:2612 __slab_free+0x1d4/0x290 mm/slub.c:3395 do_slab_free mm/slub.c:3514 [inline] ___cache_free+0x104/0x120 mm/slub.c:3535 qlink_free+0x4d/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x14a/0x170 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:443 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550 slab_alloc_node mm/slub.c:3245 [inline] slab_alloc mm/slub.c:3255 [inline] __kmalloc+0x120/0x2c0 mm/slub.c:4432 __kmalloc_node include/linux/slab.h:487 [inline] kmalloc_node include/linux/slab.h:642 [inline] kvmalloc_node+0x211/0x320 mm/util.c:621 kvmalloc include/linux/mm.h:862 [inline] seq_buf_alloc fs/seq_file.c:38 [inline] seq_read_iter+0x1f1/0xce0 fs/seq_file.c:210 Memory state around the buggy address: ffff88811a07dc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811a07dd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88811a07dd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811a07de00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811a07de80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== wacom 0003:056A:0084.00C6: hidraw0: 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: probe of 3-1:1.2 failed with error -71 usb 3-1: USB disconnect, device number 21 usb 3-1: new high-speed USB device number 22 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.00CB: hidraw2: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.2-1/input0 wacom 0003:056A:0084.00D0: hidraw7: 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: probe of 3-1:1.2 failed with error -71 usb 3-1: USB disconnect, device number 22 usb 3-1: new high-speed USB device number 23 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.00D5: hidraw2: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.2-1/input0 wacom 0003:056A:0084.00DA: hidraw7: 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: probe of 3-1:1.2 failed with error -71 usb 3-1: USB disconnect, device number 23 usb 3-1: new high-speed USB device number 24 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.00DF: hidraw2: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.2-1/input0 wacom 0003:056A:0084.00E4: hidraw7: 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: probe of 3-1:1.2 failed with error -71 usb 3-1: USB disconnect, device number 24 usb 3-1: new high-speed USB device number 25 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.00E8: hidraw1: USB HID v1.10 Device [HID 056a:0084] on usb-dummy_hcd.2-1/input0 wacom 0003:056A:0084.00ED: hidraw6: 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: probe of 3-1:1.2 failed with error -71 usb 3-1: USB disconnect, device number 25 usb 3-1: new high-speed USB device number 26 using dummy_hcd