sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer ================================================================== BUG: KASAN: slab-use-after-free in __xfrm_state_delete+0x972/0x980 Write of size 8 at addr ffff88801db78470 by task swapper/1/0 CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.16.0-rc7-next-20250725 #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/0x610 kasan_report+0xca/0x100 __xfrm_state_delete+0x972/0x980 xfrm_timer_handler+0x4cc/0xbb0 __hrtimer_run_queues+0x1ee/0xac0 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 09 1a 0a 00 0f 1f 44 00 00 fb f4 9d 82 02 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 90 90 90 90 RSP: 0018:ffff888009717e58 EFLAGS: 00000202 RAX: 0000000000f20237 RBX: 0000000000000001 RCX: ffffffff84bb7167 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff814c6e94 RBP: dffffc0000000000 R08: 0000000000000001 R09: ffffed100d9e630a R10: ffff88806cf31853 R11: 0000000000000001 R12: ffffffff8643d150 R13: 1ffff110012e2fd2 R14: 0000000000000000 R15: 0000000000000000 default_idle+0xe/0x20 default_idle_call+0x6d/0xb0 do_idle+0x344/0x490 cpu_startup_entry+0x4f/0x60 start_secondary+0x1bd/0x210 common_startup_64+0x13e/0x148 Allocated by task 15642: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_slab_alloc+0x59/0x70 kmem_cache_alloc_noprof+0x13c/0x3d0 xfrm_state_alloc+0x25/0x600 __find_acq_core+0x9c8/0x27a0 xfrm_find_acq+0x7f/0xb0 xfrm_alloc_userspi+0x589/0xbb0 xfrm_user_rcv_msg+0x459/0xa00 netlink_rcv_skb+0x147/0x430 xfrm_netlink_rcv+0x74/0x90 netlink_unicast+0x5a7/0x870 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 15509: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3a/0x60 __kasan_slab_free+0x3f/0x50 kmem_cache_free+0x2a1/0x460 xfrm_state_gc_task+0x107/0x740 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 ffff88801db78440 which belongs to the cache xfrm_state of size 920 The buggy address is located 48 bytes inside of freed 920-byte region [ffff88801db78440, ffff88801db787d8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88801db7bb80 pfn:0x1db78 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x100000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0100000000000040 ffff88800a7b0780 0000000000000000 0000000000000001 raw: ffff88801db7bb80 00000000000f0008 00000000f5000000 0000000000000000 head: 0100000000000040 ffff88800a7b0780 0000000000000000 0000000000000001 head: ffff88801db7bb80 00000000000f0008 00000000f5000000 0000000000000000 head: 0100000000000002 ffffea000076de01 00000000ffffffff 00000000ffffffff head: 0000000000000013 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801db78300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801db78380: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801db78400: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ^ ffff88801db78480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801db78500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== sr 1:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s sr 1:0:0:0: [sr0] tag#0 Sense Key : Not Ready [current] sr 1:0:0:0: [sr0] tag#0 Add. Sense: Medium not present sr 1:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 00 00 02 00 00 02 00 blk_print_req_error: 16 callbacks suppressed I/O error, dev sr0, sector 8 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 8 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 buffer_io_error: 30 callbacks suppressed Buffer I/O error on dev sr0, logical block 8, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 9 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev sr0, logical block 9, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 10 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev sr0, logical block 10, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 11 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev sr0, logical block 11, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 12 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev sr0, logical block 12, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 13 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev sr0, logical block 13, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 14 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev sr0, logical block 14, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 15 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev sr0, logical block 15, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 8 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev sr0, logical block 8, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer Buffer I/O error on dev sr0, logical block 9, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer ---------------- 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 1a 0a 00 verw 0xa1a09(%rip) # 0xa1a2c 23: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 28: fb sti 29: f4 hlt * 2a: e9 9d 82 02 00 jmpq 0x282cc <-- 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