================================================================== BUG: KASAN: slab-out-of-bounds in __xfrm_state_lookup_all net/xfrm/xfrm_state.c:-1 [inline] BUG: KASAN: slab-out-of-bounds in xfrm_state_find+0x2cf2/0x5400 net/xfrm/xfrm_state.c:1494 Read of size 1 at addr ffff8880569dcbb0 by task syz.5.2735/17135 CPU: 1 UID: 0 PID: 17135 Comm: syz.5.2735 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 __xfrm_state_lookup_all net/xfrm/xfrm_state.c:-1 [inline] xfrm_state_find+0x2cf2/0x5400 net/xfrm/xfrm_state.c:1494 xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2522 [inline] xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2573 [inline] xfrm_resolve_and_create_bundle+0x768/0x2f80 net/xfrm/xfrm_policy.c:2871 xfrm_lookup_with_ifid+0x2a7/0x1a70 net/xfrm/xfrm_policy.c:3205 xfrm_lookup net/xfrm/xfrm_policy.c:3336 [inline] xfrm_lookup_route+0x3c/0x1c0 net/xfrm/xfrm_policy.c:3347 udp_sendmsg+0x142e/0x2170 net/ipv4/udp.c:1450 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x19c/0x270 net/socket.c:729 ____sys_sendmsg+0x52d/0x830 net/socket.c:2614 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668 __sys_sendmmsg+0x227/0x430 net/socket.c:2757 __do_sys_sendmmsg net/socket.c:2784 [inline] __se_sys_sendmmsg net/socket.c:2781 [inline] __x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2781 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f112218eec9 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f11203d5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f11223e6180 RCX: 00007f112218eec9 RDX: 000000000800001d RSI: 0000200000007fc0 RDI: 0000000000000004 RBP: 00007f1122211f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f11223e6218 R14: 00007f11223e6180 R15: 00007fff6935fc38 Allocated by task 15250: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4376 [inline] __kvmalloc_node_noprof+0x30d/0x5f0 mm/slub.c:5067 netif_alloc_netdev_queues net/core/dev.c:11090 [inline] alloc_netdev_mqs+0x8a0/0x11b0 net/core/dev.c:11964 rtnl_create_link+0x31f/0xd10 net/core/rtnetlink.c:3641 rtnl_newlink_create+0x25c/0xb00 net/core/rtnetlink.c:3823 __rtnl_newlink net/core/rtnetlink.c:3950 [inline] rtnl_newlink+0x16e4/0x1c80 net/core/rtnetlink.c:4065 rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6954 netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2552 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x219/0x270 net/socket.c:729 ____sys_sendmsg+0x505/0x830 net/socket.c:2614 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668 __sys_sendmsg net/socket.c:2700 [inline] __do_sys_sendmsg net/socket.c:2705 [inline] __se_sys_sendmsg net/socket.c:2703 [inline] __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2703 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880569dc800 which belongs to the cache kmalloc-cg-512 of size 512 The buggy address is located 496 bytes to the right of allocated 448-byte region [ffff8880569dc800, ffff8880569dc9c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880569ddc00 pfn:0x569dc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88807ccd1701 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801a44b140 ffffea0001d53e10 ffffea0001580e10 raw: ffff8880569ddc00 0000000000100005 00000000f5000000 ffff88807ccd1701 head: 00fff00000000240 ffff88801a44b140 ffffea0001d53e10 ffffea0001580e10 head: ffff8880569ddc00 0000000000100005 00000000f5000000 ffff88807ccd1701 head: 00fff00000000002 ffffea00015a7701 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 14023, tgid 14018 (syz.6.1957), ts 298955281238, free_ts 298905764404 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2660 new_slab mm/slub.c:2714 [inline] ___slab_alloc+0xbeb/0x1420 mm/slub.c:3901 __slab_alloc mm/slub.c:3992 [inline] __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] __do_kmalloc_node mm/slub.c:4375 [inline] __kmalloc_node_track_caller_noprof+0x2f8/0x4e0 mm/slub.c:4395 __do_krealloc mm/slub.c:4957 [inline] krealloc_noprof+0x124/0x340 mm/slub.c:5010 push_jmp_history+0x1cc/0x6f0 kernel/bpf/verifier.c:3989 check_mem_access+0xbbd/0x1cd0 kernel/bpf/verifier.c:7708 do_check_insn kernel/bpf/verifier.c:19910 [inline] do_check+0x6657/0xe520 kernel/bpf/verifier.c:20121 do_check_common+0x1949/0x24f0 kernel/bpf/verifier.c:23288 do_check_main kernel/bpf/verifier.c:23371 [inline] bpf_check+0x1746a/0x1d2d0 kernel/bpf/verifier.c:24731 bpf_prog_load+0x1318/0x1930 kernel/bpf/syscall.c:2979 __sys_bpf+0x528/0x870 kernel/bpf/syscall.c:6029 __do_sys_bpf kernel/bpf/syscall.c:6139 [inline] __se_sys_bpf kernel/bpf/syscall.c:6137 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6137 page last free pid 23 tgid 23 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895 stack_depot_save_flags+0x436/0x860 lib/stackdepot.c:727 ref_tracker_free+0xfe/0x7d0 lib/ref_tracker.c:308 __netns_tracker_free include/net/net_namespace.h:374 [inline] put_net_track include/net/net_namespace.h:389 [inline] __sk_destruct+0x3c3/0x660 net/core/sock.c:2368 tcp_v6_rcv+0x2239/0x2a70 net/ipv6/tcp_ipv6.c:1930 ip6_protocol_deliver_rcu+0xcb0/0x15c0 net/ipv6/ip6_input.c:438 ip6_input_finish+0x191/0x370 net/ipv6/ip6_input.c:489 NF_HOOK+0x309/0x3a0 include/linux/netfilter.h:318 ip6_input+0x16a/0x270 net/ipv6/ip6_input.c:500 NF_HOOK+0x309/0x3a0 include/linux/netfilter.h:318 __netif_receive_skb_one_core net/core/dev.c:6078 [inline] __netif_receive_skb+0xd3/0x380 net/core/dev.c:6191 process_backlog+0x60e/0x14f0 net/core/dev.c:6543 __napi_poll+0xc7/0x360 net/core/dev.c:7593 napi_poll net/core/dev.c:7656 [inline] net_rx_action+0x707/0xe30 net/core/dev.c:7783 handle_softirqs+0x283/0x870 kernel/softirq.c:579 run_ksoftirqd+0x9b/0x100 kernel/softirq.c:968 Memory state around the buggy address: ffff8880569dca80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880569dcb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880569dcb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880569dcc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880569dcc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================