==================================================================
BUG: KASAN: slab-use-after-free in instrument_atomic_write include/linux/instrumented.h:82 [inline]
BUG: KASAN: slab-use-after-free in clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline]
BUG: KASAN: slab-use-after-free in cpumask_clear_cpu include/linux/cpumask.h:628 [inline]
BUG: KASAN: slab-use-after-free in flush_tlb_func+0x23d/0x6c0 arch/x86/mm/tlb.c:1132
Write of size 8 at addr ffff8880256ebfc0 by task kworker/0:3/5851
CPU: 0 UID: 0 PID: 5851 Comm: kworker/0:3 Not tainted 6.16.0-rc4-next-20250701-syzkaller-g3f804361f3b9 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: usb_hub_wq hub_event
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xd2/0x2b0 mm/kasan/report.c:521
kasan_report+0x118/0x150 mm/kasan/report.c:634
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x2b9/0x2c0 mm/kasan/generic.c:200
instrument_atomic_write include/linux/instrumented.h:82 [inline]
clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline]
cpumask_clear_cpu include/linux/cpumask.h:628 [inline]
flush_tlb_func+0x23d/0x6c0 arch/x86/mm/tlb.c:1132
csd_do_func kernel/smp.c:134 [inline]
__flush_smp_call_function_queue+0x373/0xaa0 kernel/smp.c:540
__sysvec_call_function_single+0xa8/0x3d0 arch/x86/kernel/smp.c:271
instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline]
sysvec_call_function_single+0x9e/0xc0 arch/x86/kernel/smp.c:266
asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709
RIP: 0010:console_flush_all+0x7f7/0xc40 kernel/printk/printk.c:3227
Code: 48 21 c3 0f 85 e9 01 00 00 e8 75 2d 1f 00 48 8b 5c 24 20 4d 85 f6 75 07 e8 66 2d 1f 00 eb 06 e8 5f 2d 1f 00 fb 48 8b 44 24 28 <42> 80 3c 20 00 74 08 48 89 df e8 fa 44 83 00 48 8b 1b 48 8b 44 24
RSP: 0018:ffffc900043ae1e0 EFLAGS: 00000293
RAX: 1ffffffff1d369db RBX: ffffffff8e9b4ed8 RCX: ffff88804061da00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900043ae330 R08: ffffffff8fa16d37 R09: 1ffffffff1f42da6
R10: dffffc0000000000 R11: fffffbfff1f42da7 R12: dffffc0000000000
R13: 0000000000000001 R14: 0000000000000200 R15: ffffffff8e9b4e80
__console_flush_and_unlock kernel/printk/printk.c:3285 [inline]
console_unlock+0xc4/0x270 kernel/printk/printk.c:3325
vprintk_emit+0x5b7/0x7a0 kernel/printk/printk.c:2450
_printk+0xcf/0x120 kernel/printk/printk.c:2475
input_register_device+0xa57/0x10b0 drivers/input/input.c:2402
hidinput_connect+0x269e/0x3030 drivers/hid/hid-input.c:2340
hid_connect+0x499/0x19a0 drivers/hid/hid-core.c:2239
hid_hw_start drivers/hid/hid-core.c:2357 [inline]
__hid_device_probe drivers/hid/hid-core.c:2731 [inline]
hid_device_probe+0x548/0x710 drivers/hid/hid-core.c:2764
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26d/0x9a0 drivers/base/dd.c:657
__driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799
driver_probe_device+0x4f/0x430 drivers/base/dd.c:829
__device_attach_driver+0x2ce/0x530 drivers/base/dd.c:957
bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462
__device_attach+0x2b8/0x400 drivers/base/dd.c:1029
bus_probe_device+0x185/0x260 drivers/base/bus.c:537
device_add+0x7b6/0xb50 drivers/base/core.c:3691
hid_add_device+0x398/0x540 drivers/hid/hid-core.c:2910
usbhid_probe+0xe13/0x12a0 drivers/hid/usbhid/hid-core.c:1435
usb_probe_interface+0x634/0xbf0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26d/0x9a0 drivers/base/dd.c:657
__driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799
driver_probe_device+0x4f/0x430 drivers/base/dd.c:829
__device_attach_driver+0x2ce/0x530 drivers/base/dd.c:957
bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462
__device_attach+0x2b8/0x400 drivers/base/dd.c:1029
bus_probe_device+0x185/0x260 drivers/base/bus.c:537
device_add+0x7b6/0xb50 drivers/base/core.c:3691
usb_set_configuration+0x1a87/0x20e0 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
usb_probe_device+0x1c4/0x390 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x26d/0x9a0 drivers/base/dd.c:657
__driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799
driver_probe_device+0x4f/0x430 drivers/base/dd.c:829
__device_attach_driver+0x2ce/0x530 drivers/base/dd.c:957
bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:462
__device_attach+0x2b8/0x400 drivers/base/dd.c:1029
bus_probe_device+0x185/0x260 drivers/base/bus.c:537
device_add+0x7b6/0xb50 drivers/base/core.c:3691
usb_new_device+0xa39/0x16f0 drivers/usb/core/hub.c:2694
hub_port_connect drivers/usb/core/hub.c:5566 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5706 [inline]
port_event drivers/usb/core/hub.c:5866 [inline]
hub_event+0x2941/0x4a00 drivers/usb/core/hub.c:5948
process_one_work kernel/workqueue.c:3239 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3322
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3403
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 6170:
kasan_save_stack mm/kasan/common.c:54 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:75
unpoison_slab_object mm/kasan/common.c:326 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:352
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4180 [inline]
slab_alloc_node mm/slub.c:4229 [inline]
kmem_cache_alloc_noprof+0x1c3/0x3d0 mm/slub.c:4236
dup_mm kernel/fork.c:1466 [inline]
copy_mm+0xdb/0x4b0 kernel/fork.c:1528
copy_process+0x1706/0x3c00 kernel/fork.c:2168
kernel_clone+0x21e/0x870 kernel/fork.c:2598
__do_sys_clone kernel/fork.c:2741 [inline]
__se_sys_clone kernel/fork.c:2725 [inline]
__x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2725
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 6927:
kasan_save_stack mm/kasan/common.c:54 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:75
kasan_save_free_info+0x4a/0x70 mm/kasan/generic.c:587
poison_slab_object mm/kasan/common.c:254 [inline]
__kasan_slab_free+0x68/0x80 mm/kasan/common.c:271
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2417 [inline]
slab_free mm/slub.c:4680 [inline]
kmem_cache_free+0x197/0x410 mm/slub.c:4782
exit_mm+0x1da/0x2c0 kernel/exit.c:581
do_exit+0x648/0x2300 kernel/exit.c:947
do_group_exit+0x21c/0x2d0 kernel/exit.c:1100
get_signal+0x1286/0x1340 kernel/signal.c:3034
arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:111
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff8880256eb5c0
which belongs to the cache mm_struct of size 2584
The buggy address is located 2560 bytes inside of
freed 2584-byte region [ffff8880256eb5c0, ffff8880256ebfd8)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880256eeb80 pfn:0x256e8
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88807f0d2a81
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801a44bb40 ffffea0001f07200 dead000000000002
raw: ffff8880256eeb80 00000000000b0009 00000000f5000000 ffff88807f0d2a81
head: 00fff00000000040 ffff88801a44bb40 ffffea0001f07200 dead000000000002
head: ffff8880256eeb80 00000000000b0009 00000000f5000000 ffff88807f0d2a81
head: 00fff00000000003 ffffea000095ba01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
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 5614, tgid 5614 (dhcpcd-run-hook), ts 50966178740, free_ts 50880774373
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x260/0x2a0 mm/page_alloc.c:1848
prep_new_page mm/page_alloc.c:1856 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3855
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5145
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419
alloc_slab_page mm/slub.c:2487 [inline]
allocate_slab+0x8a/0x380 mm/slub.c:2655
new_slab mm/slub.c:2709 [inline]
___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
__slab_alloc mm/slub.c:3981 [inline]
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
kmem_cache_alloc_noprof+0x288/0x3d0 mm/slub.c:4236
dup_mm kernel/fork.c:1466 [inline]
copy_mm+0xdb/0x4b0 kernel/fork.c:1528
copy_process+0x1706/0x3c00 kernel/fork.c:2168
kernel_clone+0x21e/0x870 kernel/fork.c:2598
__do_sys_clone kernel/fork.c:2741 [inline]
__se_sys_clone kernel/fork.c:2725 [inline]
__x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2725
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5614 tgid 5614 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1392 [inline]
__free_frozen_pages+0xb80/0xd80 mm/page_alloc.c:2892
discard_slab mm/slub.c:2753 [inline]
__put_partials+0x156/0x1a0 mm/slub.c:3218
put_cpu_partial+0x17c/0x250 mm/slub.c:3293
__slab_free+0x2d5/0x3c0 mm/slub.c:4550
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:336
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4180 [inline]
slab_alloc_node mm/slub.c:4229 [inline]
kmem_cache_alloc_noprof+0x1c3/0x3d0 mm/slub.c:4236
getname_flags+0xb8/0x540 fs/namei.c:146
getname include/linux/fs.h:2909 [inline]
do_sys_openat2+0xbc/0x1c0 fs/open.c:1428
do_sys_open fs/open.c:1449 [inline]
__do_sys_openat fs/open.c:1465 [inline]
__se_sys_openat fs/open.c:1460 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1460
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff8880256ebe80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880256ebf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880256ebf80: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc
^
ffff8880256ec000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880256ec080: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 48 21 c3 and %rax,%rbx
3: 0f 85 e9 01 00 00 jne 0x1f2
9: e8 75 2d 1f 00 call 0x1f2d83
e: 48 8b 5c 24 20 mov 0x20(%rsp),%rbx
13: 4d 85 f6 test %r14,%r14
16: 75 07 jne 0x1f
18: e8 66 2d 1f 00 call 0x1f2d83
1d: eb 06 jmp 0x25
1f: e8 5f 2d 1f 00 call 0x1f2d83
24: fb sti
25: 48 8b 44 24 28 mov 0x28(%rsp),%rax
* 2a: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction
2f: 74 08 je 0x39
31: 48 89 df mov %rbx,%rdi
34: e8 fa 44 83 00 call 0x834533
39: 48 8b 1b mov (%rbx),%rbx
3c: 48 rex.W
3d: 8b .byte 0x8b
3e: 44 rex.R
3f: 24 .byte 0x24