KASAN: use-after-free Read in roccat_release

Status: upstream: reported C repro on 2026/11/02 07:52
Reported-by: syzbot+f2f4726206369a4ca421@syzkaller.appspotmail.com
First crash: 11d, last: 11d
▶ ▼ Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.6 KASAN: slab-use-after-free Read in roccat_release 19 syz, C 1 18d 18d 0/2 upstream: reported C repro on 2026/10/26 04:04

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in __list_del_entry_valid+0x80/0x120 lib/list_debug.c:59
Read of size 8 at addr ffff888076f5b870 by task syz.2.83/4698

CPU: 1 PID: 4698 Comm: syz.2.83 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
 <TASK>
 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
 __list_del_entry_valid+0x80/0x120 lib/list_debug.c:59
 __list_del_entry include/linux/list.h:141 [inline]
 list_del include/linux/list.h:155 [inline]
 roccat_release+0xce/0x370 drivers/hid/hid-roccat.c:228
 __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
RIP: 0033:0x7fe85779f559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd1d0ccfe8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007ffd1d0cd0d0 RCX: 00007fe85779f559
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 000000000001ef8b R08: 0000000000000001 R09: 0000000000000000
R10: 0000001b30e20000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fe857a25fac R14: 00007fe857a25fa8 R15: 00007fe857a25fa0
 </TASK>

Allocated by task 956:
 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 4354:
 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
 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

The buggy address belongs to the object at ffff888076f5b800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 112 bytes inside of
 1024-byte region [ffff888076f5b800, ffff888076f5bc00)

The buggy address belongs to the physical page:
page:ffffea0001dbd600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x76f58
head:ffffea0001dbd600 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000001 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4319, tgid 4319 (syz-executor), ts 86080567068, free_ts 86018604437
 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_node_track_caller+0xa0/0x240 mm/slab_common.c:956
 kmemdup+0x27/0x60 mm/util.c:129
 kmemdup include/linux/fortify-string.h:585 [inline]
 netfilter_log_sysctl_init net/netfilter/nf_log.c:464 [inline]
 nf_log_net_init+0x82/0x670 net/netfilter/nf_log.c:540
 ops_init+0x360/0x5e0 net/core/net_namespace.c:138
 setup_net+0x4f2/0xbd0 net/core/net_namespace.c:336
 copy_net_ns+0x33e/0x5b0 net/core/net_namespace.c:508
 create_new_namespaces+0x3ce/0x700 kernel/nsproxy.c:110
 unshare_nsproxy_namespaces+0x116/0x160 kernel/nsproxy.c:226
 ksys_unshare+0x4f6/0x8e0 kernel/fork.c:3289
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
 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
 __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]
 cgroup_create kernel/cgroup/cgroup.c:5650 [inline]
 cgroup_mkdir+0x3d9/0xe70 kernel/cgroup/cgroup.c:5798
 kernfs_iop_mkdir+0x23d/0x3d0 fs/kernfs/dir.c:1221
 vfs_mkdir+0x386/0x570 fs/namei.c:4161
 do_mkdirat+0x1d8/0x440 fs/namei.c:4186
 __do_sys_mkdirat fs/namei.c:4201 [inline]
 __se_sys_mkdirat fs/namei.c:4199 [inline]
 __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4199
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
 ffff888076f5b700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888076f5b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888076f5b800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                             ^
 ffff888076f5b880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888076f5b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/02 07:51 linux-6.1.y 08889840163e 25a0ae84 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in roccat_release
* Struck through repros no longer work on HEAD.