================================================================== BUG: KASAN: slab-out-of-bounds in xfrm_policy_inexact_list_reinsert+0x5df/0x690 net/xfrm/xfrm_policy.c:874 Read of size 1 at addr ffff888074543600 by task syz.5.565/5984 CPU: 0 PID: 5984 Comm: syz.5.565 Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x168/0x230 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+0x5df/0x690 net/xfrm/xfrm_policy.c:874 xfrm_policy_inexact_node_merge net/xfrm/xfrm_policy.c:1006 [inline] xfrm_policy_inexact_insert_node+0x950/0xb60 net/xfrm/xfrm_policy.c:1062 xfrm_policy_inexact_alloc_chain+0x7cf/0xea0 net/xfrm/xfrm_policy.c:1178 xfrm_policy_inexact_insert+0xe0/0x1460 net/xfrm/xfrm_policy.c:1221 xfrm_policy_insert+0x112/0x930 net/xfrm/xfrm_policy.c:1605 xfrm_add_policy+0x4d6/0x860 net/xfrm/xfrm_user.c:1833 xfrm_user_rcv_msg+0x58d/0x860 net/xfrm/xfrm_user.c:2979 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2507 xfrm_netlink_rcv+0x75/0x90 net/xfrm/xfrm_user.c:3001 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x774/0x920 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x5a2/0x8c0 net/socket.c:2436 ___sys_sendmsg+0x1f0/0x260 net/socket.c:2490 __sys_sendmsg net/socket.c:2519 [inline] __do_sys_sendmsg net/socket.c:2528 [inline] __se_sys_sendmsg+0x190/0x250 net/socket.c:2526 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:0x7fa2a5115b69 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:00007fa2a2f7d038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fa2a533cfa0 RCX: 00007fa2a5115b69 RDX: 0000000000004000 RSI: 0000200000000580 RDI: 0000000000000004 RBP: 00007fa2a5198df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fa2a533cfa0 R15: 00007ffc15d6c228 Allocated by task 5984: 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+0xb5/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:609 [inline] sk_prot_alloc+0xe7/0x210 net/core/sock.c:1864 sk_alloc+0x2f/0x310 net/core/sock.c:1917 pfkey_create+0xd8/0x560 net/key/af_key.c:152 __sock_create+0x47b/0x900 net/socket.c:1486 sock_create net/socket.c:1542 [inline] __sys_socket+0xe2/0x170 net/socket.c:1584 __do_sys_socket net/socket.c:1593 [inline] __se_sys_socket net/socket.c:1591 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1591 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+0x182/0x930 kernel/rcu/tree.c:3091 qdisc_put net/sched/sch_generic.c:1044 [inline] shutdown_scheduler_queue net/sched/sch_generic.c:1097 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2379 [inline] dev_shutdown+0x19f/0x710 net/sched/sch_generic.c:1405 unregister_netdevice_many+0xa0c/0x18f0 net/core/dev.c:11127 unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:11067 unregister_netdevice include/linux/netdevice.h:3020 [inline] __tun_detach+0xd4a/0x1500 drivers/net/tun.c:686 tun_detach drivers/net/tun.c:702 [inline] tun_chr_close+0x109/0x1b0 drivers/net/tun.c:3440 __fput+0x234/0x930 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:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 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 __call_rcu kernel/rcu/tree.c:3011 [inline] call_rcu+0x182/0x930 kernel/rcu/tree.c:3091 qdisc_put net/sched/sch_generic.c:1044 [inline] shutdown_scheduler_queue net/sched/sch_generic.c:1097 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2379 [inline] dev_shutdown+0x19f/0x710 net/sched/sch_generic.c:1405 unregister_netdevice_many+0xa0c/0x18f0 net/core/dev.c:11127 unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:11067 unregister_netdevice include/linux/netdevice.h:3020 [inline] __tun_detach+0xd4a/0x1500 drivers/net/tun.c:686 tun_detach drivers/net/tun.c:702 [inline] tun_chr_close+0x109/0x1b0 drivers/net/tun.c:3440 __fput+0x234/0x930 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:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 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 ffff888074543000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1536 bytes inside of 2048-byte region [ffff888074543000, ffff888074543800) The buggy address belongs to the page: page:ffffea0001d15000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x74540 head:ffffea0001d15000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888016842000 raw: 0000000000000000 0000000080080008 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4186, ts 73988945035, free_ts 73968185356 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc_track_caller+0x1cb/0x330 mm/slub.c:4925 kmemdup+0x22/0x50 mm/util.c:128 neigh_sysctl_register+0x9b/0xa80 net/core/neighbour.c:3652 addrconf_sysctl_register+0xac/0x1b0 net/ipv6/addrconf.c:7145 ipv6_add_dev+0xbf3/0x1190 net/ipv6/addrconf.c:454 addrconf_notify+0x66f/0xf00 net/ipv6/addrconf.c:3577 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:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] register_netdevice+0x1275/0x16b0 net/core/dev.c:10428 register_vlan_dev+0x3c3/0x7f0 net/8021q/vlan.c:180 vlan_newlink+0x44c/0x610 net/8021q/vlan_netlink.c:195 __rtnl_newlink net/core/rtnetlink.c:3524 [inline] rtnl_newlink+0x114c/0x17d0 net/core/rtnetlink.c:3572 rtnetlink_rcv_msg+0x9b9/0xe60 net/core/rtnetlink.c:5650 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+0x94/0x280 mm/page_alloc.c:3396 free_slab mm/slub.c:2015 [inline] discard_slab mm/slub.c:2021 [inline] __unfreeze_partials+0x1a5/0x200 mm/slub.c:2507 put_cpu_partial+0x12d/0x190 mm/slub.c:2587 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xd0 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:3220 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc_track_caller+0x125/0x330 mm/slub.c:4925 kvasprintf+0xd4/0x180 lib/kasprintf.c:25 kobject_set_name_vargs+0x5d/0x110 lib/kobject.c:297 kobject_add_varg lib/kobject.c:392 [inline] kobject_init_and_add+0xda/0x190 lib/kobject.c:481 rx_queue_add_kobject net/core/net-sysfs.c:1059 [inline] net_rx_queue_update_kobjects+0x1af/0x490 net/core/net-sysfs.c:1110 register_queue_kobjects net/core/net-sysfs.c:1767 [inline] netdev_register_kobject+0x223/0x310 net/core/net-sysfs.c:2018 register_netdevice+0x1019/0x16b0 net/core/dev.c:10397 veth_newlink+0x8ed/0xda0 drivers/net/veth.c:1714 Memory state around the buggy address: ffff888074543500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888074543580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc >ffff888074543600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888074543680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888074543700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================