R10: 0000000020000080 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffd3f6032df R14: 00007fbe77011300 R15: 0000000000022000 ================================================================== BUG: KASAN: slab-use-after-free in flush_tlb_func+0x24d/0x560 Write of size 8 at addr ffff8880158365c0 by task syz-executor.5/18551 CPU: 0 UID: 0 PID: 18551 Comm: syz-executor.5 Not tainted 6.16.0-rc4-next-20250702 #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+0x39/0x1b0 flush_tlb_func+0x24d/0x560 __flush_smp_call_function_queue+0x20d/0x740 __sysvec_call_function_single+0x6d/0x360 sysvec_call_function_single+0x5f/0xc0 asm_sysvec_call_function_single+0x1a/0x20 RIP: 0010:handle_softirqs+0x174/0x770 Code: c8 83 83 3c 0a 00 00 01 c7 44 24 20 0a 00 00 00 48 89 44 24 18 65 66 c7 05 cf b4 47 06 00 00 e8 42 6b 40 00 fb bb ff ff ff ff <48> c7 c5 c0 c0 a0 85 41 0f bc de 83 c3 01 0f 85 9b 00 00 00 e9 8d RSP: 0018:ffff88806ce08f78 EFLAGS: 00000202 RAX: 0000000000000108 RBX: 00000000ffffffff RCX: 0000000000000008 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff813b5b6e RBP: ffff88803c24f5a8 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff86439057 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000380 R15: 0000000000000000 __irq_exit_rcu+0xc4/0x100 irq_exit_rcu+0x9/0x20 sysvec_apic_timer_interrupt+0x70/0x80 asm_sysvec_apic_timer_interrupt+0x1a/0x20 RIP: 0010:dump_stack_lvl+0x115/0x120 Code: fc ff ff 4c 89 e2 31 f6 31 ff e8 26 31 7b fc e8 e1 e7 a4 fc 48 89 ee 31 ff e8 f7 8b c4 fc e8 92 90 c4 fc e8 9d ba cc fc fb 5b <5d> 41 5c e9 83 90 c4 fc 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffff88803c24f658 EFLAGS: 00000206 RAX: 0000000000000105 RBX: ffffffff85d021c0 RCX: 0000000000000080 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff84af0c13 RBP: 0000000000000200 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff86439057 R11: 0000000000000001 R12: ffffffff8530fc40 R13: ffffffff85d021d0 R14: 0000000000000001 R15: 0000000000000000 should_fail_ex+0x4d7/0x5e0 should_fail_alloc_page+0xe0/0x110 prepare_alloc_pages+0x1af/0x500 __alloc_frozen_pages_noprof+0x17f/0x1f10 alloc_pages_mpol+0xed/0x340 vma_alloc_folio_noprof+0xe9/0x440 __handle_mm_fault+0x142c/0x30f0 handle_mm_fault+0x2c3/0x900 do_user_addr_fault+0x395/0xeb0 exc_page_fault+0xb0/0x180 asm_exc_page_fault+0x26/0x30 RIP: 0010:__put_user_4+0xd/0x20 Code: 66 89 01 31 c9 0f 01 ca e9 c0 d2 02 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 48 89 cb 48 c1 fb 3f 48 09 d9 0f 01 cb <89> 01 31 c9 0f 01 ca e9 97 d2 02 00 0f 1f 80 00 00 00 00 90 90 90 RSP: 0018:ffff88803c24fd68 EFLAGS: 00050202 RAX: 00000000fffffffe RBX: 0000000000000000 RCX: 0000000020001740 RDX: 0000000000040000 RSI: ffffffff81afea03 RDI: ffff88803222c158 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 00000000fffffffe R13: 0000000020ffc000 R14: 0000000020001740 R15: 0000000000000000 kernel_move_pages+0xbd8/0x1200 __x64_sys_move_pages+0xe1/0x1c0 do_syscall_64+0xbf/0x360 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbe79a9bb19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbe77011188 EFLAGS: 00000246 ORIG_RAX: 0000000000000117 RAX: ffffffffffffffda RBX: 00007fbe79baef60 RCX: 00007fbe79a9bb19 RDX: 0000000020000040 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 00007fbe770111d0 R08: 0000000020001740 R09: 0000000000000000 R10: 0000000020000080 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffd3f6032df R14: 00007fbe77011300 R15: 0000000000022000 Allocated by task 4151: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_slab_alloc+0x59/0x70 kmem_cache_alloc_noprof+0x13c/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 18553: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3a/0x60 __kasan_slab_free+0x38/0x50 kmem_cache_free+0x2a1/0x460 mmput+0x305/0x390 do_exit+0x79d/0x2970 do_group_exit+0xd3/0x2a0 __x64_sys_exit_group+0x3e/0x50 x64_sys_call+0x18b4/0x18c0 do_syscall_64+0xbf/0x360 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888015835c40 which belongs to the cache mm_struct of size 2456 The buggy address is located 2432 bytes inside of freed 2456-byte region [ffff888015835c40, ffff8880158365d8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888015835200 pfn:0x15830 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88800e13ec01 anon flags: 0x100000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0100000000000040 ffff888008c4bc80 0000000000000000 dead000000000001 raw: ffff888015835200 00000000800c000a 00000000f5000000 ffff88800e13ec01 head: 0100000000000040 ffff888008c4bc80 0000000000000000 dead000000000001 head: ffff888015835200 00000000800c000a 00000000f5000000 ffff88800e13ec01 head: 0100000000000003 ffffea0000560c01 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888015836480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888015836500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888015836580: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ^ ffff888015836600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888015836680: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== FAULT_INJECTION: forcing a failure. name fail_usercopy, interval 1, probability 0, space 0, times 0 CPU: 1 UID: 0 PID: 18576 Comm: syz-executor.5 Tainted: G B 6.16.0-rc4-next-20250702 #1 PREEMPT(voluntary) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0xfa/0x120 should_fail_ex+0x4d7/0x5e0 _copy_to_user+0x32/0xd0 simple_read_from_buffer+0xe0/0x180 proc_fail_nth_read+0x189/0x270 vfs_read+0x1eb/0xbe0 ksys_read+0x121/0x240 do_syscall_64+0xbf/0x360 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbe79a4e69c Code: ec 28 48 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 fc ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 48 89 44 24 08 e8 2f fd ff ff 48 RSP: 002b:00007fbe77011170 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fbe79a4e69c RDX: 000000000000000f RSI: 00007fbe770111e0 RDI: 0000000000000003 RBP: 00007fbe770111d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000080 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffd3f6032df R14: 00007fbe77011300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: c8 83 83 3c enterq $0x8383,$0x3c 4: 0a 00 or (%rax),%al 6: 00 01 add %al,(%rcx) 8: c7 44 24 20 0a 00 00 movl $0xa,0x20(%rsp) f: 00 10: 48 89 44 24 18 mov %rax,0x18(%rsp) 15: 65 66 c7 05 cf b4 47 movw $0x0,%gs:0x647b4cf(%rip) # 0x647b4ee 1c: 06 00 00 1f: e8 42 6b 40 00 callq 0x406b66 24: fb sti 25: bb ff ff ff ff mov $0xffffffff,%ebx * 2a: 48 c7 c5 c0 c0 a0 85 mov $0xffffffff85a0c0c0,%rbp <-- trapping instruction 31: 41 0f bc de bsf %r14d,%ebx 35: 83 c3 01 add $0x1,%ebx 38: 0f 85 9b 00 00 00 jne 0xd9 3e: e9 .byte 0xe9 3f: 8d .byte 0x8d