================================================================== BUG: KASAN: slab-use-after-free in __hlist_del include/linux/list.h:980 [inline] BUG: KASAN: slab-use-after-free in hlist_del_rcu include/linux/rculist.h:560 [inline] BUG: KASAN: slab-use-after-free in __xfrm_state_delete+0x528/0x740 net/xfrm/xfrm_state.c:836 Write of size 8 at addr ffff88810f745128 by task kworker/u8:3/47 CPU: 1 UID: 0 PID: 47 Comm: kworker/u8:3 Not tainted syzkaller #0 PREEMPT(undef) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: netns cleanup_net Call Trace: dump_stack_lvl+0xf4/0x170 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 __hlist_del include/linux/list.h:980 [inline] hlist_del_rcu include/linux/rculist.h:560 [inline] __xfrm_state_delete+0x528/0x740 net/xfrm/xfrm_state.c:836 xfrm_state_delete net/xfrm/xfrm_state.c:860 [inline] xfrm_state_flush+0x1fe/0x460 net/xfrm/xfrm_state.c:943 xfrm_state_fini+0x49/0x1f0 net/xfrm/xfrm_state.c:3313 ops_exit_list net/core/net_namespace.c:200 [inline] ops_undo_list+0x49d/0x720 net/core/net_namespace.c:253 cleanup_net+0x45a/0x720 net/core/net_namespace.c:686 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0x995/0x12d0 kernel/workqueue.c:3321 worker_thread+0x850/0xc60 kernel/workqueue.c:3402 kthread+0x59b/0x690 kernel/kthread.c:464 ret_from_fork+0x139/0x2d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 3963: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_noprof+0x1b1/0x400 mm/slub.c:4204 xfrm_state_alloc+0x1f/0x2d0 net/xfrm/xfrm_state.c:733 __find_acq_core+0x1a0/0x1a20 net/xfrm/xfrm_state.c:1847 xfrm_find_acq+0x73/0xa0 net/xfrm/xfrm_state.c:2362 xfrm_alloc_userspi+0x557/0xaa0 net/xfrm/xfrm_user.c:1862 xfrm_user_rcv_msg+0x461/0x730 net/xfrm/xfrm_user.c:3500 netlink_rcv_skb+0x1e6/0x3b0 net/netlink/af_netlink.c:2534 xfrm_netlink_rcv+0x6f/0x80 net/xfrm/xfrm_user.c:3522 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x551/0x770 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x60d/0x920 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x1dd/0x220 net/socket.c:727 ____sys_sendmsg+0x4ac/0x710 net/socket.c:2612 ___sys_sendmsg+0x1d7/0x250 net/socket.c:2666 __sys_sendmsg net/socket.c:2698 [inline] __do_sys_sendmsg net/socket.c:2703 [inline] __se_sys_sendmsg net/socket.c:2701 [inline] __x64_sys_sendmsg+0x175/0x200 net/socket.c:2701 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 47: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kmem_cache_free+0x175/0x460 mm/slub.c:4745 __xfrm_state_destroy net/xfrm/xfrm_state.c:806 [inline] xfrm_state_put_sync include/net/xfrm.h:935 [inline] xfrm_state_flush+0x264/0x460 net/xfrm/xfrm_state.c:947 xfrm_state_fini+0x49/0x1f0 net/xfrm/xfrm_state.c:3313 ops_exit_list net/core/net_namespace.c:200 [inline] ops_undo_list+0x49d/0x720 net/core/net_namespace.c:253 cleanup_net+0x45a/0x720 net/core/net_namespace.c:686 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0x995/0x12d0 kernel/workqueue.c:3321 worker_thread+0x850/0xc60 kernel/workqueue.c:3402 kthread+0x59b/0x690 kernel/kthread.c:464 ret_from_fork+0x139/0x2d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff88810f745100 which belongs to the cache xfrm_state of size 928 The buggy address is located 40 bytes inside of freed 928-byte region [ffff88810f745100, ffff88810f7454a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10f744 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff8881072b73c0 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000f000f 00000000f5000000 0000000000000000 head: 0200000000000040 ffff8881072b73c0 dead000000000122 0000000000000000 head: 0000000000000000 00000000000f000f 00000000f5000000 0000000000000000 head: 0200000000000002 ffffea00043dd101 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 3947, tgid 3946 (syz.3.521), ts 91357951899, free_ts 75037225975 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x168/0x1a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x2cf9/0x2eb0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x26b/0x460 mm/page_alloc.c:4959 alloc_pages_mpol+0xcb/0x270 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x350 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0x9dc/0x10e0 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] kmem_cache_alloc_noprof+0x26e/0x400 mm/slub.c:4204 xfrm_state_alloc+0x1f/0x2d0 net/xfrm/xfrm_state.c:733 __find_acq_core+0x1a0/0x1a20 net/xfrm/xfrm_state.c:1847 xfrm_find_acq+0x73/0xa0 net/xfrm/xfrm_state.c:2362 xfrm_alloc_userspi+0x557/0xaa0 net/xfrm/xfrm_user.c:1862 xfrm_user_rcv_msg+0x461/0x730 net/xfrm/xfrm_user.c:3500 netlink_rcv_skb+0x1e6/0x3b0 net/netlink/af_netlink.c:2534 xfrm_netlink_rcv+0x6f/0x80 net/xfrm/xfrm_user.c:3522 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x551/0x770 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x60d/0x920 net/netlink/af_netlink.c:1883 page last free pid 2349 tgid 2349 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xa6d/0xc50 mm/page_alloc.c:2706 discard_slab mm/slub.c:2717 [inline] __put_partials+0x157/0x1b0 mm/slub.c:3186 put_cpu_partial+0x154/0x1c0 mm/slub.c:3261 __slab_free+0x2a5/0x3a0 mm/slub.c:4513 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:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_noprof+0x1b1/0x400 mm/slub.c:4204 anon_vma_chain_alloc mm/rmap.c:142 [inline] __anon_vma_prepare+0x84/0x3f0 mm/rmap.c:195 __vmf_anon_prepare mm/memory.c:3523 [inline] vmf_anon_prepare mm/internal.h:410 [inline] do_anonymous_page mm/memory.c:5087 [inline] do_pte_missing mm/memory.c:4249 [inline] handle_pte_fault mm/memory.c:6089 [inline] __handle_mm_fault mm/memory.c:6232 [inline] handle_mm_fault+0x202e/0x2450 mm/memory.c:6401 do_user_addr_fault+0x31a/0xc30 arch/x86/mm/fault.c:1336 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x62/0xa0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 Memory state around the buggy address: ffff88810f745000: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff88810f745080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88810f745100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88810f745180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88810f745200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================