==================================================================
BUG: KASAN: slab-use-after-free in flush_tlb_func+0x24d/0x560
Write of size 8 at addr ffff88800a2f7a40 by task swapper/0/0
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.16.0-rc4-next-20250701 #1 PREEMPT(voluntary)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
Call Trace:
dump_stack_lvl+0xca/0x120
print_report+0xcb/0x670
kasan_report+0xca/0x100
kasan_check_range+0x37/0x1a0
flush_tlb_func+0x24d/0x560
__flush_smp_call_function_queue+0x20d/0x740
__sysvec_call_function_single+0x6d/0x360
sysvec_call_function_single+0xa1/0xc0
asm_sysvec_call_function_single+0x1a/0x20
RIP: 0010:pv_native_safe_halt+0x1e/0x30
Code: 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 eb 0c 0f 1f 44 00 00 0f 00 2d 09 45 0d 00 0f 1f 44 00 00 fb f4 7d 6d 02 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 90 90 90 90
RSP: 0018:ffffffff85a07e00 EFLAGS: 00000202
RAX: 000000000027547f RBX: 0000000000000000 RCX: ffffffff84b83987
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff814c6b04
RBP: dffffc0000000000 R08: 0000000000000001 R09: ffffed100d9c630a
R10: ffff88806ce31853 R11: 0000000000000001 R12: ffffffff86438650
R13: 1ffffffff0b40fc7 R14: 0000000000000000 R15: 0000000000000000
default_idle+0xe/0x20
default_idle_call+0x6d/0xb0
do_idle+0x344/0x490
cpu_startup_entry+0x4f/0x60
rest_init+0x164/0x290
start_kernel+0x3f9/0x510
x86_64_start_reservations+0x18/0x30
x86_64_start_kernel+0x109/0x120
common_startup_64+0x13e/0x148
Allocated by task 283:
kasan_save_stack+0x24/0x50
kasan_save_track+0x14/0x30
__kasan_slab_alloc+0x59/0x70
kmem_cache_alloc_noprof+0x13e/0x470
copy_process+0x6f3a/0x73e0
kernel_clone+0xea/0x820
__do_sys_clone+0xce/0x120
do_syscall_64+0xbf/0x360
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 5838:
kasan_save_stack+0x24/0x50
kasan_save_track+0x14/0x30
kasan_save_free_info+0x3c/0x90
__kasan_slab_free+0x3c/0x60
kmem_cache_free+0x2a5/0x460
mmput+0x305/0x390
do_exit+0x79d/0x2970
do_group_exit+0xd3/0x2a0
get_signal+0x2315/0x2340
arch_do_signal_or_restart+0x80/0x790
exit_to_user_mode_loop+0x8b/0x100
do_syscall_64+0x2f7/0x360
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88800a2f70c0
which belongs to the cache mm_struct of size 2456
The buggy address is located 2432 bytes inside of
freed 2456-byte region [ffff88800a2f70c0, ffff88800a2f7a58)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xa2f0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88800ceba481
anon flags: 0x100000000000040(head|node=0|zone=1)
page_type: f5(slab)
raw: 0100000000000040 ffff888008c4bc80 0000000000000000 dead000000000001
raw: 0000000000000000 00000000000c000c 00000000f5000000 ffff88800ceba481
head: 0100000000000040 ffff888008c4bc80 0000000000000000 dead000000000001
head: 0000000000000000 00000000000c000c 00000000f5000000 ffff88800ceba481
head: 0100000000000003 ffffea000028bc01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88800a2f7900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88800a2f7980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88800a2f7a00: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc
^
ffff88800a2f7a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88800a2f7b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
sr 1:0:0:0: [sr0] tag#0 unaligned transfer
I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
----------------
Code disassembly (best guess):
0: 90 nop
1: 90 nop
2: 90 nop
3: 90 nop
4: 90 nop
5: 90 nop
6: 90 nop
7: 90 nop
8: 90 nop
9: 90 nop
a: 90 nop
b: 90 nop
c: f3 0f 1e fa endbr64
10: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
15: eb 0c jmp 0x23
17: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
1c: 0f 00 2d 09 45 0d 00 verw 0xd4509(%rip) # 0xd452c
23: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
28: fb sti
29: f4 hlt
* 2a: e9 7d 6d 02 00 jmpq 0x26dac <-- trapping instruction
2f: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
36: 00 00 00
39: 0f 1f 00 nopl (%rax)
3c: 90 nop
3d: 90 nop
3e: 90 nop
3f: 90 nop