usb 1-1: USB disconnect, device number 2 ================================================================== BUG: KASAN: use-after-free in roccat_disconnect+0x236/0x240 drivers/hid/hid-roccat.c:382 Read of size 4 at addr ffff8880795ff808 by task kworker/0:22/4324 CPU: 0 PID: 4324 Comm: kworker/0:22 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:2413 __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:2589 [inline] hid_destroy_device+0x66/0x100 drivers/hid/hid-core.c:2608 usbhid_disconnect+0x9b/0xc0 drivers/hid/usbhid/hid-core.c:1469 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:1472 usb_disconnect+0x33c/0x8a0 drivers/usb/core/hub.c:2292 hub_port_connect drivers/usb/core/hub.c:5346 [inline] hub_port_connect_change drivers/usb/core/hub.c:5642 [inline] port_event drivers/usb/core/hub.c:5804 [inline] hub_event+0x1d64/0x5260 drivers/usb/core/hub.c:5886 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 4320: 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:2355 [inline] hid_device_probe+0x2cb/0x590 drivers/hid/hid-core.c:2394 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:2540 usbhid_probe+0xbc5/0xf50 drivers/hid/usbhid/hid-core.c:1442 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+0x19d5/0x2030 drivers/usb/core/message.c:2223 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:2637 hub_port_connect drivers/usb/core/hub.c:5502 [inline] hub_port_connect_change drivers/usb/core/hub.c:5642 [inline] port_event drivers/usb/core/hub.c:5804 [inline] hub_event+0x2b8d/0x5260 drivers/usb/core/hub.c:5886 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 4408: 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 ffff8880795ff800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 8 bytes inside of 1024-byte region [ffff8880795ff800, ffff8880795ffc00) The buggy address belongs to the page: page:ffffea0001e57e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x795f8 head:ffffea0001e57e00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 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 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4344, ts 78317190656, free_ts 78314531848 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] __kmalloc_node_track_caller+0x13d/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] nlmsg_new include/net/netlink.h:964 [inline] inet6_rt_notify+0xe0/0x290 net/ipv6/route.c:6187 fib6_add_rt2node net/ipv6/ip6_fib.c:1258 [inline] fib6_add+0x1e9a/0x3ee0 net/ipv6/ip6_fib.c:1487 __ip6_ins_rt net/ipv6/route.c:1307 [inline] ip6_route_add+0x86/0x130 net/ipv6/route.c:3872 addrconf_prefix_route net/ipv6/addrconf.c:2457 [inline] fixup_permanent_addr net/ipv6/addrconf.c:3542 [inline] addrconf_permanent_addr+0x6d0/0xa30 net/ipv6/addrconf.c:3566 addrconf_notify+0x827/0xf20 net/ipv6/addrconf.c:3634 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2074 [inline] call_netdevice_notifiers net/core/dev.c:2088 [inline] __dev_notify_flags+0x194/0x300 net/core/dev.c:8918 dev_change_flags+0xda/0x1a0 net/core/dev.c:8956 do_setlink+0xca4/0x29d0 net/core/rtnetlink.c:2793 __rtnl_newlink net/core/rtnetlink.c:3464 [inline] rtnl_newlink+0x15bb/0x1920 net/core/rtnetlink.c:3586 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] kmem_cache_alloc_node+0x184/0x2c0 mm/slub.c:3261 __alloc_skb+0xf4/0x750 net/core/skbuff.c:415 alloc_skb include/linux/skbuff.h:1162 [inline] nlmsg_new include/net/netlink.h:964 [inline] netlink_ack+0x35c/0xb10 net/netlink/af_netlink.c:2454 netlink_rcv_skb+0x267/0x430 net/netlink/af_netlink.c:2525 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x78f/0x940 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] __sys_sendto+0x46d/0x620 net/socket.c:2073 __do_sys_sendto net/socket.c:2085 [inline] __se_sys_sendto net/socket.c:2081 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2081 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff8880795ff700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880795ff780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880795ff800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880795ff880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880795ff900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================