savu 0003:1E7D:2D5A.0004: hidraw0: USB HID v0.00 Device [HID 1e7d:2d5a] on usb-dummy_hcd.6-1/input0 usb 7-1: USB disconnect, device number 89 ================================================================== BUG: KASAN: use-after-free in roccat_disconnect+0x236/0x240 drivers/hid/hid-roccat.c:382 Read of size 4 at addr ffff8880734f2808 by task kworker/1:9/5234 CPU: 1 PID: 5234 Comm: kworker/1:9 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/0x24e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 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:2762 device_remove drivers/base/dd.c:547 [inline] __device_release_driver drivers/base/dd.c:1279 [inline] device_release_driver_internal+0x47d/0x7c0 drivers/base/dd.c:1305 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3901 hid_remove_device drivers/hid/hid-core.c:2938 [inline] hid_destroy_device+0x66/0x100 drivers/hid/hid-core.c:2957 usbhid_disconnect+0x9b/0xc0 drivers/hid/usbhid/hid-core.c:1470 usb_unbind_interface+0x200/0x870 drivers/usb/core/driver.c:457 device_remove drivers/base/dd.c:549 [inline] __device_release_driver drivers/base/dd.c:1279 [inline] device_release_driver_internal+0x4cf/0x7c0 drivers/base/dd.c:1305 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3901 usb_disable_device+0x3e7/0x8a0 drivers/usb/core/message.c:1478 usb_disconnect+0x33c/0x8a0 drivers/usb/core/hub.c:2324 hub_port_connect drivers/usb/core/hub.c:5371 [inline] hub_port_connect_change drivers/usb/core/hub.c:5667 [inline] port_event drivers/usb/core/hub.c:5827 [inline] hub_event+0x1d27/0x5200 drivers/usb/core/hub.c:5909 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 5234: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [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:2704 [inline] hid_device_probe+0x2b8/0x520 drivers/hid/hid-core.c:2743 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x24a/0xb40 drivers/base/dd.c:638 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3713 hid_add_device+0x361/0x500 drivers/hid/hid-core.c:2889 usbhid_probe+0xc3f/0x1010 drivers/hid/usbhid/hid-core.c:1443 usb_probe_interface+0x6e7/0xcf0 drivers/usb/core/driver.c:395 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x24a/0xb40 drivers/base/dd.c:638 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3713 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:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x24a/0xb40 drivers/base/dd.c:638 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3713 usb_new_device+0xa01/0x15e0 drivers/usb/core/hub.c:2669 hub_port_connect drivers/usb/core/hub.c:5527 [inline] hub_port_connect_change drivers/usb/core/hub.c:5667 [inline] port_event drivers/usb/core/hub.c:5827 [inline] hub_event+0x2b2f/0x5200 drivers/usb/core/hub.c:5909 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Freed by task 16752: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1735 [inline] slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1761 slab_free mm/slub.c:3694 [inline] __kmem_cache_free+0xb6/0x200 mm/slub.c:3707 roccat_release+0x2a6/0x370 drivers/hid/hid-roccat.c:238 __fput+0x20a/0x8b0 fs/file_table.c:320 task_work_run+0x1d0/0x260 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:180 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213 __syscall_exit_to_user_mode_work kernel/entry/common.c:295 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:306 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 call_rcu+0x14f/0x950 kernel/rcu/tree.c:2849 qdisc_put net/sched/sch_generic.c:1128 [inline] dev_shutdown+0x351/0x440 net/sched/sch_generic.c:1489 unregister_netdevice_many_notify+0xa7e/0x1990 net/core/dev.c:11038 unregister_netdevice_many net/core/dev.c:11101 [inline] default_device_exit_batch+0x95e/0x9f0 net/core/dev.c:11573 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x78e/0xba0 net/core/net_namespace.c:640 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3c0 kernel/workqueue.c:1361 __queue_work+0xae2/0xee0 kernel/workqueue.c:1520 queue_work_on+0x124/0x1f0 kernel/workqueue.c:1548 req_bio_endio block/blk-mq.c:782 [inline] blk_update_request+0x535/0xdf0 block/blk-mq.c:927 blk_mq_end_request+0x3a/0x70 block/blk-mq.c:1052 blk_flush_complete_seq+0x5a3/0xc30 block/blk-flush.c:210 flush_end_io+0x7e4/0xa60 block/blk-flush.c:268 __blk_mq_end_request+0x3b4/0x4b0 block/blk-mq.c:1042 blk_complete_reqs block/blk-mq.c:1132 [inline] blk_done_softirq+0x107/0x160 block/blk-mq.c:1137 handle_softirqs+0x291/0x910 kernel/softirq.c:596 run_ksoftirqd+0xa4/0x100 kernel/softirq.c:968 smpboot_thread_fn+0x667/0xa30 kernel/smpboot.c:164 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff8880734f2800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 8 bytes inside of 1024-byte region [ffff8880734f2800, ffff8880734f2c00) The buggy address belongs to the physical page: page:ffffea0001cd3c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x734f0 head:ffffea0001cd3c00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000a3da00 dead000000000002 ffff888018441dc0 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 0x52a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 4371, tgid 4371 (kworker/0:8), ts 72724357403, free_ts 72602984365 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560 prep_new_page mm/page_alloc.c:2567 [inline] get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658 alloc_slab_page+0x5d/0x180 mm/slub.c:1805 allocate_slab mm/slub.c:1950 [inline] new_slab+0x87/0x2d0 mm/slub.c:2003 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3161 __slab_alloc mm/slub.c:3247 [inline] slab_alloc_node mm/slub.c:3332 [inline] __kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3405 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc+0xa3/0x240 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] kzalloc include/linux/slab.h:699 [inline] neigh_alloc net/core/neighbour.c:495 [inline] ___neigh_create+0x6f4/0x2450 net/core/neighbour.c:649 ip6_finish_output2+0x13c4/0x1490 net/ipv6/ip6_output.c:127 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0x337/0x530 net/ipv6/ip6_output.c:239 dst_output include/net/dst.h:456 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] ndisc_send_skb+0xc04/0x1520 net/ipv6/ndisc.c:513 addrconf_dad_completed+0x836/0xd90 net/ipv6/addrconf.c:4311 addrconf_dad_work+0xc68/0x1500 net/ipv6/addrconf.c:-1 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1487 [inline] free_pcp_prepare mm/page_alloc.c:1537 [inline] free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509 free_slab mm/slub.c:2042 [inline] discard_slab mm/slub.c:2048 [inline] __unfreeze_partials+0x188/0x1e0 mm/slub.c:2598 put_cpu_partial+0x17c/0x250 mm/slub.c:2674 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:306 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x490 mm/slab.h:742 slab_alloc_node mm/slub.c:3366 [inline] __kmem_cache_alloc_node+0x19d/0x270 mm/slub.c:3405 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026 kmalloc include/linux/slab.h:563 [inline] rtnl_newlink+0x10f/0x1f90 net/core/rtnetlink.c:3665 rtnetlink_rcv_msg+0x863/0xfb0 net/core/rtnetlink.c:6166 netlink_rcv_skb+0x1ef/0x440 net/netlink/af_netlink.c:2516 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x7ad/0x920 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x497/0x650 net/socket.c:2153 Memory state around the buggy address: ffff8880734f2700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880734f2780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880734f2800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880734f2880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880734f2900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================