================================================================== 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 ffff88801ff4e608 by task syz.4.2710/16213 CPU: 0 PID: 16213 Comm: syz.4.2710 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_merge net/xfrm/xfrm_policy.c:1006 [inline] xfrm_policy_inexact_insert_node+0x95f/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:0x7fbe3d3bee59 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:00007fbe3b617028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fbe3d646fa0 RCX: 00007fbe3d3bee59 RDX: 0000000000000000 RSI: 0000200000000580 RDI: 0000000000000008 RBP: 00007fbe3d454e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fbe3d647038 R14: 00007fbe3d646fa0 R15: 00007fff012e1bd8 Allocated by task 16213: 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 wg_noise_keypairs_clear+0x104/0x290 drivers/net/wireguard/noise.c:169 wg_stop+0x9e/0x5c0 drivers/net/wireguard/device.c:109 __dev_close_many+0x1d3/0x2b0 net/core/dev.c:1634 dev_close_many+0x21c/0x400 net/core/dev.c:1659 unregister_netdevice_many+0x4b8/0x1a40 net/core/dev.c:11136 default_device_exit_batch+0x364/0x3c0 net/core/dev.c:11693 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x78e/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 Second to 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 insert_work+0x54/0x3d0 kernel/workqueue.c:1366 __queue_work+0x90b/0xc80 kernel/workqueue.c:1532 queue_work_on+0x124/0x1f0 kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] schedule_work include/linux/workqueue.h:573 [inline] nsim_fib_event_schedule_work drivers/net/netdevsim/fib.c:-1 [inline] nsim_fib_event_nb+0xced/0xef0 drivers/net/netdevsim/fib.c:1032 notifier_call_chain kernel/notifier.c:83 [inline] atomic_notifier_call_chain+0x15d/0x280 kernel/notifier.c:198 call_fib_notifiers+0x2d/0x60 net/core/fib_notifier.c:35 call_fib6_entry_notifiers net/ipv6/ip6_fib.c:401 [inline] fib6_del_route net/ipv6/ip6_fib.c:1990 [inline] fib6_del+0xfb6/0x1550 net/ipv6/ip6_fib.c:2031 fib6_clean_node+0x28c/0x540 net/ipv6/ip6_fib.c:2193 fib6_walk_continue+0x662/0x8b0 net/ipv6/ip6_fib.c:2115 fib6_walk+0x149/0x270 net/ipv6/ip6_fib.c:2163 fib6_clean_tree net/ipv6/ip6_fib.c:2243 [inline] __fib6_clean_all+0x252/0x3b0 net/ipv6/ip6_fib.c:2259 rt6_sync_down_dev net/ipv6/route.c:4914 [inline] rt6_disable_ip+0x127/0x6b0 net/ipv6/route.c:4919 addrconf_ifdown+0x149/0x19f0 net/ipv6/addrconf.c:3778 addrconf_notify+0x445/0xf20 net/ipv6/addrconf.c:-1 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2074 [inline] call_netdevice_notifiers net/core/dev.c:2088 [inline] dev_close_many+0x29c/0x400 net/core/dev.c:1663 unregister_netdevice_many+0x4b8/0x1a40 net/core/dev.c:11136 unregister_netdevice_queue+0x2e1/0x320 net/core/dev.c:11093 unregister_netdevice include/linux/netdevice.h:3029 [inline] nsim_destroy+0x49/0x150 drivers/net/netdevsim/netdev.c:382 __nsim_dev_port_del+0x155/0x1c0 drivers/net/netdevsim/dev.c:1349 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1362 [inline] nsim_dev_reload_destroy+0x160/0x230 drivers/net/netdevsim/dev.c:1561 nsim_dev_reload_down+0xf9/0x160 drivers/net/netdevsim/dev.c:883 devlink_reload+0x253/0x770 net/core/devlink.c:3963 devlink_pernet_pre_exit+0x1aa/0x310 net/core/devlink.c:11543 ops_pre_exit_list net/core/net_namespace.c:162 [inline] cleanup_net+0x58e/0xba0 net/core/net_namespace.c:615 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 ffff88801ff4e000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1544 bytes inside of 2048-byte region [ffff88801ff4e000, ffff88801ff4e800) The buggy address belongs to the page: page:ffffea00007fd200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ff48 head:ffffea00007fd200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888016c42000 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 0xd28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4194, ts 67856189153, free_ts 67695911303 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] __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:1710 netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1299 netlink_broadcast_filtered+0x69/0x1170 net/netlink/af_netlink.c:1516 netlink_broadcast net/netlink/af_netlink.c:1561 [inline] nlmsg_multicast include/net/netlink.h:1044 [inline] nlmsg_notify+0xdf/0x190 net/netlink/af_netlink.c:2555 register_netdevice+0x13af/0x1720 net/core/dev.c:10468 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:317 [inline] nsim_create+0x32d/0x3e0 drivers/net/netdevsim/netdev.c:365 __nsim_dev_port_add+0x66e/0xa80 drivers/net/netdevsim/dev.c:1312 nsim_dev_port_add_all+0x37/0x100 drivers/net/netdevsim/dev.c:1372 nsim_dev_probe+0x75e/0x9d0 drivers/net/netdevsim/dev.c:1513 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 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 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:1182 [inline] netlink_sendmsg+0x654/0xbe0 net/netlink/af_netlink.c:1898 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: ffff88801ff4e500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801ff4e580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc >ffff88801ff4e600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801ff4e680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801ff4e700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================