savu 0003:1E7D:2D5A.0015: hidraw1: USB HID v0.00 Device [HID 1e7d:2d5a] on usb-dummy_hcd.2-1/input0 usb 5-1: USB disconnect, device number 4 ================================================================== BUG: KASAN: use-after-free in roccat_disconnect+0x236/0x240 drivers/hid/hid-roccat.c:382 Read of size 4 at addr ffff88807b6f5008 by task kworker/1:0/21 CPU: 1 PID: 21 Comm: kworker/1: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_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 roccat_disconnect+0x236/0x240 drivers/hid/hid-roccat.c:382 savu_remove_specials drivers/hid/hid-roccat-savu.c:107 [inline] savu_remove+0xe5/0x160 drivers/hid/hid-roccat-savu.c:147 hid_device_remove+0xba/0x1b0 drivers/hid/hid-core.c:2435 __device_release_driver drivers/base/dd.c:1247 [inline] device_release_driver_internal+0x44c/0x710 drivers/base/dd.c:1282 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3615 hid_remove_device drivers/hid/hid-core.c:2611 [inline] hid_destroy_device+0x66/0x100 drivers/hid/hid-core.c:2630 usbhid_disconnect+0x9b/0xc0 drivers/hid/usbhid/hid-core.c:1470 usb_unbind_interface+0x203/0x870 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1249 [inline] device_release_driver_internal+0x487/0x710 drivers/base/dd.c:1282 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3615 usb_disable_device+0x3e7/0x8a0 drivers/usb/core/message.c:1478 usb_disconnect+0x33c/0x8a0 drivers/usb/core/hub.c:2297 hub_port_connect drivers/usb/core/hub.c:5351 [inline] hub_port_connect_change drivers/usb/core/hub.c:5647 [inline] port_event drivers/usb/core/hub.c:5809 [inline] hub_event+0x1d64/0x5260 drivers/usb/core/hub.c:5891 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 4317: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] roccat_connect+0x59/0x490 drivers/hid/hid-roccat.c:315 savu_init_specials drivers/hid/hid-roccat-savu.c:81 [inline] savu_probe+0x1af/0x350 drivers/hid/hid-roccat-savu.c:131 __hid_device_probe drivers/hid/hid-core.c:2377 [inline] hid_device_probe+0x2cb/0x590 drivers/hid/hid-core.c:2416 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:999 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3427 hid_add_device+0x361/0x500 drivers/hid/hid-core.c:2562 usbhid_probe+0xbc5/0xf50 drivers/hid/usbhid/hid-core.c:1443 usb_probe_interface+0x5be/0xae0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:999 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3427 usb_set_configuration+0x1ad8/0x2140 drivers/usb/core/message.c:2229 usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x126/0x250 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:999 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3427 usb_new_device+0x9f6/0x15d0 drivers/usb/core/hub.c:2642 hub_port_connect drivers/usb/core/hub.c:5507 [inline] hub_port_connect_change drivers/usb/core/hub.c:5647 [inline] port_event drivers/usb/core/hub.c:5809 [inline] hub_event+0x2b8d/0x5260 drivers/usb/core/hub.c:5891 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Freed by task 4488: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 roccat_release+0x2a6/0x370 drivers/hid/hid-roccat.c:238 __fput+0x212/0x8c0 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:184 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88807b6f5000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 8 bytes inside of 1024-byte region [ffff88807b6f5000, ffff88807b6f5400) The buggy address belongs to the page: page:ffffea0001edbc00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b6f0 head:ffffea0001edbc00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001f08000 0000000b00000003 ffff888017841dc0 raw: 0000000000000000 0000000000100010 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 0x152a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 4323, ts 111578903781, free_ts 111400900741 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] __kmalloc+0x11d/0x340 mm/slub.c:4408 kmalloc include/linux/slab.h:612 [inline] kzalloc include/linux/slab.h:738 [inline] neigh_alloc net/core/neighbour.c:438 [inline] ___neigh_create+0x6fa/0x2210 net/core/neighbour.c:591 ip6_finish_output2+0xacc/0x1640 net/ipv6/ip6_output.c:129 dst_output include/net/dst.h:452 [inline] NF_HOOK+0x165/0x460 include/linux/netfilter.h:302 mld_sendpack+0x6ee/0xc40 net/ipv6/mcast.c:1853 mld_send_cr net/ipv6/mcast.c:2152 [inline] mld_ifc_work+0x843/0xd60 net/ipv6/mcast.c:2688 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3225 [inline] __kmalloc_node_track_caller+0x1a9/0x3a0 mm/slub.c:4963 kmalloc_reserve net/core/skbuff.c:356 [inline] __alloc_skb+0x22c/0x750 net/core/skbuff.c:427 alloc_skb include/linux/skbuff.h:1162 [inline] mld_newpack+0x12f/0xba0 net/ipv6/mcast.c:1773 add_grhead net/ipv6/mcast.c:1884 [inline] add_grec+0x1364/0x1840 net/ipv6/mcast.c:2023 mld_send_cr net/ipv6/mcast.c:2146 [inline] mld_ifc_work+0x6f2/0xd60 net/ipv6/mcast.c:2688 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff88807b6f4f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b6f4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807b6f5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807b6f5080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807b6f5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================