================================================================== BUG: KASAN: slab-out-of-bounds in xfrm_policy_inexact_list_reinsert+0x5a3/0x650 net/xfrm/xfrm_policy.c:874 Read of size 1 at addr ffff88807c165608 by task syz.2.178/5002 CPU: 1 PID: 5002 Comm: syz.2.178 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/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:874 xfrm_policy_inexact_node_reinsert net/xfrm/xfrm_policy.c:962 [inline] xfrm_policy_inexact_node_merge net/xfrm/xfrm_policy.c:997 [inline] xfrm_policy_inexact_insert_node+0x5a4/0xb70 net/xfrm/xfrm_policy.c:1062 xfrm_policy_inexact_alloc_chain+0x7a2/0xe70 net/xfrm/xfrm_policy.c:1169 xfrm_policy_inexact_insert+0xd7/0x12d0 net/xfrm/xfrm_policy.c:1212 xfrm_policy_insert+0x10f/0x940 net/xfrm/xfrm_policy.c:1596 xfrm_add_policy+0x4e6/0x870 net/xfrm/xfrm_user.c:1833 xfrm_user_rcv_msg+0x694/0x980 net/xfrm/xfrm_user.c:2979 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2512 xfrm_netlink_rcv+0x75/0x90 net/xfrm/xfrm_user.c:3001 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x78f/0x940 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1923 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:0x7fb0e1b55e99 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:00007fb0dfdae028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fb0e1dddfa0 RCX: 00007fb0e1b55e99 RDX: 0000000000000000 RSI: 0000200000000580 RDI: 0000000000000009 RBP: 00007fb0e1bebeaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fb0e1dde038 R14: 00007fb0e1dddfa0 R15: 00007fff1ca9a918 Allocated by task 5002: 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:1866 sk_alloc+0x2f/0x310 net/core/sock.c:1922 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 netlink_release+0x134c/0x1790 net/netlink/af_netlink.c:799 __sock_release net/socket.c:651 [inline] sock_release+0x7b/0x140 net/socket.c:679 diag_net_exit+0x3c/0x60 net/core/sock_diag.c:324 ops_exit_list net/core/net_namespace.c:172 [inline] cleanup_net+0x703/0xba0 net/core/net_namespace.c:635 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88807c165000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1544 bytes inside of 2048-byte region [ffff88807c165000, ffff88807c165800) The buggy address belongs to the page: page:ffffea0001f05800 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807c166000 pfn:0x7c160 head:ffffea0001f05800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 0000000100000001 ffff888016c42000 raw: ffff88807c166000 0000000080080006 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4266, ts 56467888366, free_ts 54597051235 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 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] slab_alloc mm/slub.c:3233 [inline] __kmalloc+0x11d/0x340 mm/slub.c:4408 kmalloc_array include/linux/slab.h:647 [inline] kcalloc include/linux/slab.h:676 [inline] cache_create_net+0x8e/0x250 net/sunrpc/cache.c:1748 nfsd_export_init+0x55/0x1e0 fs/nfsd/export.c:1355 nfsd_init_net+0x29/0x1e0 fs/nfsd/nfsctl.c:1454 ops_init+0x360/0x5f0 net/core/net_namespace.c:138 setup_net+0x39e/0xa10 net/core/net_namespace.c:333 copy_net_ns+0x33e/0x5b0 net/core/net_namespace.c:503 create_new_namespaces+0x3ce/0x700 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x116/0x160 kernel/nsproxy.c:226 ksys_unshare+0x4f6/0x8e0 kernel/fork.c:3177 __do_sys_unshare kernel/fork.c:3254 [inline] __se_sys_unshare kernel/fork.c:3252 [inline] __x64_sys_unshare+0x34/0x40 kernel/fork.c:3252 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396 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] slab_alloc mm/slub.c:3233 [inline] __kmalloc+0x189/0x340 mm/slub.c:4408 kmalloc include/linux/slab.h:612 [inline] tomoyo_realpath_from_path+0xed/0x5e0 security/tomoyo/realpath.c:254 tomoyo_scan_exec_realpath security/tomoyo/condition.c:243 [inline] tomoyo_condition+0x1a03/0x2d90 security/tomoyo/condition.c:827 tomoyo_check_acl+0x192/0x420 security/tomoyo/domain.c:177 tomoyo_execute_permission+0x11f/0x400 security/tomoyo/file.c:615 tomoyo_find_next_domain+0x442/0x1a50 security/tomoyo/domain.c:755 tomoyo_bprm_check_security+0xdd/0x120 security/tomoyo/tomoyo.c:101 security_bprm_check+0x5e/0x90 security/security.c:869 search_binary_handler fs/exec.c:1730 [inline] exec_binprm fs/exec.c:1783 [inline] bprm_execve+0x9f2/0x1740 fs/exec.c:1852 kernel_execve+0x808/0x8e0 fs/exec.c:2013 Memory state around the buggy address: ffff88807c165500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807c165580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc >ffff88807c165600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807c165680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807c165700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================