================================================================== BUG: KASAN: slab-out-of-bounds in __xfrm_state_insert+0x8af/0x1450 net/xfrm/xfrm_state.c:1743 Read of size 1 at addr ffff888058e90ff0 by task syz.0.2724/15419 CPU: 1 UID: 0 PID: 15419 Comm: syz.0.2724 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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_insert+0x8af/0x1450 net/xfrm/xfrm_state.c:1743 xfrm_state_insert+0x54/0x60 net/xfrm/xfrm_state.c:1795 ipcomp6_tunnel_attach net/ipv6/ipcomp6.c:131 [inline] ipcomp6_init_state+0x655/0x900 net/ipv6/ipcomp6.c:163 __xfrm_init_state+0xa73/0x13f0 net/xfrm/xfrm_state.c:3188 xfrm_init_state+0x18/0xa0 net/xfrm/xfrm_state.c:3231 pfkey_msg2xfrm_state net/key/af_key.c:1286 [inline] pfkey_add+0x1d38/0x2e00 net/key/af_key.c:1504 pfkey_process net/key/af_key.c:2848 [inline] pfkey_sendmsg+0xbfe/0x1090 net/key/af_key.c:3699 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x219/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:0x7f907c98ebe9 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:00007f907d8ab038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f907cbb6090 RCX: 00007f907c98ebe9 RDX: 000000000400008a RSI: 0000200000000180 RDI: 0000000000000007 RBP: 00007f907ca11e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f907cbb6128 R14: 00007f907cbb6090 R15: 00007fff3f0f1c78 Allocated by task 14936: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:356 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_node_noprof+0x1bb/0x3c0 mm/slub.c:4281 kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:578 __alloc_skb+0x142/0x2d0 net/core/skbuff.c:669 alloc_skb include/linux/skbuff.h:1377 [inline] alloc_skb_with_frags+0xca/0x890 net/core/skbuff.c:6667 sock_alloc_send_pskb+0x857/0x990 net/core/sock.c:2982 sock_alloc_send_skb include/net/sock.h:1849 [inline] __ip_append_data+0x2ce8/0x40c0 net/ipv4/ip_output.c:1125 ip_make_skb+0x1de/0x3f0 net/ipv4/ip_output.c:1572 udp_sendmsg+0x1925/0x2170 net/ipv4/udp.c:1479 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 Freed by task 14946: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4782 skb_release_data+0x62d/0x7c0 net/core/skbuff.c:1086 skb_release_all net/core/skbuff.c:1151 [inline] __kfree_skb net/core/skbuff.c:1165 [inline] sk_skb_reason_drop+0x127/0x170 net/core/skbuff.c:1203 kfree_skb_reason include/linux/skbuff.h:1316 [inline] kfree_skb include/linux/skbuff.h:1325 [inline] __skb_array_destroy_skb include/linux/skb_array.h:188 [inline] tun_ptr_free drivers/net/tun.c:555 [inline] tun_queue_purge+0x220/0x4d0 drivers/net/tun.c:565 tun_detach_all drivers/net/tun.c:673 [inline] tun_net_uninit+0x5aa/0xa70 drivers/net/tun.c:953 unregister_netdevice_many_notify+0x1953/0x1ff0 net/core/dev.c:12187 rtnl_delete_link net/core/rtnetlink.c:3513 [inline] rtnl_dellink+0x488/0x710 net/core/rtnetlink.c:3555 rtnetlink_rcv_msg+0x7cc/0xb70 net/core/rtnetlink.c:6946 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 ffff888058e90d00 which belongs to the cache skbuff_small_head of size 704 The buggy address is located 48 bytes to the right of allocated 704-byte region [ffff888058e90d00, ffff888058e90fc0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58e90 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff8881416edc80 ffffea00013cf900 0000000000000003 raw: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff8881416edc80 ffffea00013cf900 0000000000000003 head: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea000163a401 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 3604, tgid 3604 (kworker/u8:8), ts 180274637940, free_ts 180231014869 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:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0xbeb/0x1410 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_node_noprof+0x280/0x3c0 mm/slub.c:4281 kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:578 __alloc_skb+0x142/0x2d0 net/core/skbuff.c:669 alloc_skb include/linux/skbuff.h:1377 [inline] nlmsg_new include/net/netlink.h:1055 [inline] inet_netconf_notify_devconf+0x173/0x240 net/ipv4/devinet.c:2210 __devinet_sysctl_unregister net/ipv4/devinet.c:2705 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2729 [inline] inetdev_destroy net/ipv4/devinet.c:334 [inline] inetdev_event+0x77f/0x15b0 net/ipv4/devinet.c:1656 notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] unregister_netdevice_many_notify+0x14d7/0x1ff0 net/core/dev.c:12166 ops_exit_rtnl_list net/core/net_namespace.c:186 [inline] ops_undo_list+0x3dc/0x990 net/core/net_namespace.c:247 cleanup_net+0x4c5/0x800 net/core/net_namespace.c:682 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319 page last free pid 14212 tgid 14211 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 __slab_free+0x303/0x3c0 mm/slub.c:4591 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] __do_kmalloc_node mm/slub.c:4364 [inline] __kmalloc_noprof+0x224/0x4f0 mm/slub.c:4377 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] kobject_get_path+0xc5/0x2d0 lib/kobject.c:161 kobject_uevent_env+0x292/0x8c0 lib/kobject_uevent.c:545 __kobject_del+0xd2/0x300 lib/kobject.c:601 kobject_cleanup lib/kobject.c:680 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x243/0x480 lib/kobject.c:737 netdev_queue_update_kobjects+0x5db/0x6c0 net/core/net-sysfs.c:2071 remove_queue_kobjects net/core/net-sysfs.c:2168 [inline] netdev_unregister_kobject+0x11f/0x450 net/core/net-sysfs.c:2323 unregister_netdevice_many_notify+0x1a6b/0x1ff0 net/core/dev.c:12201 ops_exit_rtnl_list net/core/net_namespace.c:186 [inline] ops_undo_list+0x3dc/0x990 net/core/net_namespace.c:247 setup_net+0x2d3/0x320 net/core/net_namespace.c:453 copy_net_ns+0x31b/0x4d0 net/core/net_namespace.c:570 Memory state around the buggy address: ffff888058e90e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888058e90f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888058e90f80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888058e91000: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff888058e91080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================