================================================================== BUG: KASAN: slab-out-of-bounds in xfrm_policy_inexact_list_reinsert+0x5a3/0x650 net/xfrm/xfrm_policy.c:877 Read of size 1 at addr ffff888074e40608 by task syz.1.614/6109 CPU: 0 PID: 6109 Comm: syz.1.614 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 xfrm_policy_inexact_list_reinsert+0x5a3/0x650 net/xfrm/xfrm_policy.c:877 xfrm_policy_inexact_node_reinsert net/xfrm/xfrm_policy.c:965 [inline] xfrm_policy_inexact_node_merge net/xfrm/xfrm_policy.c:1000 [inline] xfrm_policy_inexact_insert_node+0x5a4/0xb70 net/xfrm/xfrm_policy.c:1065 xfrm_policy_inexact_alloc_chain+0x7a2/0xe70 net/xfrm/xfrm_policy.c:1172 xfrm_policy_inexact_insert+0xd7/0x12d0 net/xfrm/xfrm_policy.c:1215 xfrm_policy_insert+0x10f/0x940 net/xfrm/xfrm_policy.c:1602 xfrm_add_policy+0x4ef/0x8b0 net/xfrm/xfrm_user.c:1894 xfrm_user_rcv_msg+0x7fc/0xaa0 net/xfrm/xfrm_user.c:3047 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2535 xfrm_netlink_rcv+0x75/0x90 net/xfrm/xfrm_user.c:3069 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x804/0x9e0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2446 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2500 __sys_sendmsg net/socket.c:2529 [inline] __do_sys_sendmsg net/socket.c:2538 [inline] __se_sys_sendmsg+0x1b7/0x2a0 net/socket.c:2536 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f0123a61519 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0121cae028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f0123cedfa0 RCX: 00007f0123a61519 RDX: 0000000000004000 RSI: 0000200000000440 RDI: 0000000000000003 RBP: 00007f0123af1136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0123cee038 R14: 00007f0123cedfa0 R15: 00007ffe4637aca8 Allocated by task 6109: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:612 [inline] sk_prot_alloc+0xe7/0x210 net/core/sock.c:1865 sk_alloc+0x2f/0x310 net/core/sock.c:1921 pfkey_create+0xd8/0x560 net/key/af_key.c:152 __sock_create+0x473/0x910 net/socket.c:1496 sock_create net/socket.c:1552 [inline] __sys_socket+0xe2/0x170 net/socket.c:1594 __do_sys_socket net/socket.c:1603 [inline] __se_sys_socket net/socket.c:1601 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1601 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3011 [inline] call_rcu+0x189/0x900 kernel/rcu/tree.c:3091 qdisc_put net/sched/sch_generic.c:1087 [inline] shutdown_scheduler_queue net/sched/sch_generic.c:1140 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2390 [inline] dev_shutdown+0x19e/0x700 net/sched/sch_generic.c:1448 unregister_netdevice_many+0xa59/0x1a40 net/core/dev.c:11161 unregister_netdevice_queue+0x2e1/0x320 net/core/dev.c:11101 unregister_netdevice include/linux/netdevice.h:3047 [inline] __tun_detach+0xdb7/0x1580 drivers/net/tun.c:690 tun_detach drivers/net/tun.c:706 [inline] tun_chr_close+0x109/0x1b0 drivers/net/tun.c:3462 __fput+0x212/0x8c0 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:184 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888074e40000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1544 bytes inside of 2048-byte region [ffff888074e40000, ffff888074e40800) The buggy address belongs to the page: page:ffffea0001d39000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x74e40 head:ffffea0001d39000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017842000 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4195, ts 71304407965, free_ts 71298675026 prep_new_page mm/page_alloc.c:2427 [inline] get_page_from_freelist+0x2510/0x2680 mm/page_alloc.c:4202 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5511 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] __kmalloc_node_track_caller+0x13d/0x3a0 mm/slub.c:4963 kmalloc_reserve net/core/skbuff.c:356 [inline] pskb_expand_head+0x128/0x1100 net/core/skbuff.c:1714 netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1295 netlink_broadcast_filtered+0x69/0x1240 net/netlink/af_netlink.c:1520 netlink_broadcast net/netlink/af_netlink.c:1565 [inline] nlmsg_multicast include/net/netlink.h:1044 [inline] nlmsg_notify+0xdf/0x190 net/netlink/af_netlink.c:2578 __dev_notify_flags+0xdc/0x300 net/core/dev.c:8921 rtnl_configure_link+0x21b/0x330 net/core/rtnetlink.c:-1 __rtnl_newlink net/core/rtnetlink.c:3546 [inline] rtnl_newlink+0x1525/0x1920 net/core/rtnetlink.c:3586 rtnetlink_rcv_msg+0x7f1/0xf10 net/core/rtnetlink.c:5698 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2535 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x804/0x9e0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1927 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1341 [inline] free_pcp_prepare mm/page_alloc.c:1392 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3325 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3404 free_slab mm/slub.c:2020 [inline] discard_slab mm/slub.c:2026 [inline] __unfreeze_partials+0x188/0x1e0 mm/slub.c:2512 put_cpu_partial+0x12d/0x190 mm/slub.c:2592 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3225 [inline] kmem_cache_alloc_node+0x184/0x2c0 mm/slub.c:3261 __alloc_skb+0xf4/0x750 net/core/skbuff.c:415 alloc_skb include/linux/skbuff.h:1162 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1178 [inline] netlink_sendmsg+0x654/0xbe0 net/netlink/af_netlink.c:1902 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] __sys_sendto+0x46d/0x620 net/socket.c:2073 __do_sys_sendto net/socket.c:2085 [inline] __se_sys_sendto net/socket.c:2081 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2081 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888074e40500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888074e40580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc >ffff888074e40600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888074e40680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888074e40700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================