EXT4-fs (loop6): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback. EXT4-fs (loop6): unmounting filesystem 00000000-0000-0000-0000-000000000000. ================================================================== BUG: KASAN: slab-use-after-free in __xfrm_state_delete+0x81b/0x830 Write of size 8 at addr ffff888032df4030 by task swapper/0/0 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.16.0-rc5-next-20250711 #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/0x5f0 kasan_report+0xca/0x100 __xfrm_state_delete+0x81b/0x830 xfrm_timer_handler+0x4cc/0xbb0 __hrtimer_run_queues+0x1ee/0xab0 hrtimer_run_softirq+0x14c/0x310 handle_softirqs+0x1b1/0x770 __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: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 e9 c5 0c 00 0f 1f 44 00 00 fb f4 9d 71 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: 0000000000385cef RBX: 0000000000000000 RCX: ffffffff84b8c167 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff814c72d4 RBP: dffffc0000000000 R08: 0000000000000001 R09: ffffed100d9c630a R10: ffff88806ce31853 R11: 0000000000000001 R12: ffffffff86439c50 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 12418: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_slab_alloc+0x59/0x70 kmem_cache_alloc_noprof+0x13c/0x470 xfrm_state_alloc+0x25/0x600 __find_acq_core+0x9c8/0x27a0 xfrm_find_acq+0x7f/0xb0 xfrm_alloc_userspi+0x58b/0xbb0 xfrm_user_rcv_msg+0x459/0xa00 netlink_rcv_skb+0x147/0x430 xfrm_netlink_rcv+0x74/0x90 netlink_unicast+0x58d/0x850 netlink_sendmsg+0x8ac/0xd80 ____sys_sendmsg+0xa67/0xc20 ___sys_sendmsg+0x10f/0x1b0 __sys_sendmsg+0x150/0x200 do_syscall_64+0xbf/0x360 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 302: 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 xfrm_state_gc_task+0x112/0x170 process_one_work+0x8e1/0x19c0 worker_thread+0x67e/0xe90 kthread+0x3c8/0x740 ret_from_fork+0x34b/0x430 ret_from_fork_asm+0x1a/0x30 The buggy address belongs to the object at ffff888032df4000 which belongs to the cache xfrm_state of size 920 The buggy address is located 48 bytes inside of freed 920-byte region [ffff888032df4000, ffff888032df4398) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x32df4 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x100000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0100000000000040 ffff88800a81b780 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 head: 0100000000000040 ffff88800a81b780 dead000000000122 0000000000000000 head: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 head: 0100000000000002 ffffea0000cb7d01 00000000ffffffff 00000000ffffffff head: ffff888032df5de0 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888032df3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888032df3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888032df4000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888032df4080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888032df4100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== random: crng reseeded on system resumption loop6: detected capacity change from 0 to 4096 random: crng reseeded on system resumption EXT4-fs (loop6): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback. EXT4-fs (loop6): unmounting filesystem 00000000-0000-0000-0000-000000000000. random: crng reseeded on system resumption loop6: detected capacity change from 0 to 4096 EXT4-fs (loop6): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback. EXT4-fs (loop6): unmounting filesystem 00000000-0000-0000-0000-000000000000. ---------------- 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 e9 c5 0c 00 verw 0xcc5e9(%rip) # 0xcc60c 23: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 28: fb sti 29: f4 hlt * 2a: e9 9d 71 02 00 jmpq 0x271cc <-- 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