================================================================== BUG: KASAN: slab-use-after-free in decode_session6 net/xfrm/xfrm_policy.c:3494 [inline] BUG: KASAN: slab-use-after-free in __xfrm_decode_session+0x18d7/0x20a0 net/xfrm/xfrm_policy.c:3600 Read of size 1 at addr ffff88806b0c1ffe by task syz.9.3320/15043 CPU: 0 PID: 15043 Comm: syz.9.3320 Not tainted 6.6.99-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xac/0x200 mm/kasan/report.c:466 kasan_report+0x117/0x150 mm/kasan/report.c:579 decode_session6 net/xfrm/xfrm_policy.c:3494 [inline] __xfrm_decode_session+0x18d7/0x20a0 net/xfrm/xfrm_policy.c:3600 xfrm_decode_session_reverse include/net/xfrm.h:1243 [inline] icmpv6_route_lookup+0x358/0x590 net/ipv6/icmp.c:392 icmp6_send+0x106a/0x1990 net/ipv6/icmp.c:604 __icmpv6_send include/linux/icmpv6.h:28 [inline] icmpv6_send include/linux/icmpv6.h:49 [inline] ip6_link_failure+0x3b/0x4c0 net/ipv6/route.c:2825 dst_link_failure include/net/dst.h:437 [inline] ip6_tnl_xmit+0xdf7/0x2a30 net/ipv6/ip6_tunnel.c:1283 ipxip6_tnl_xmit net/ipv6/ip6_tunnel.c:1399 [inline] ip6_tnl_start_xmit+0xc10/0x1140 net/ipv6/ip6_tunnel.c:1447 __netdev_start_xmit include/linux/netdevice.h:4943 [inline] netdev_start_xmit include/linux/netdevice.h:4957 [inline] xmit_one net/core/dev.c:3607 [inline] dev_hard_start_xmit+0x246/0x740 net/core/dev.c:3623 sch_direct_xmit+0x252/0x4a0 net/sched/sch_generic.c:342 qdisc_restart net/sched/sch_generic.c:407 [inline] __qdisc_run+0xab2/0x1570 net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3907 [inline] __dev_queue_xmit+0xf02/0x35a0 net/core/dev.c:4379 neigh_output include/net/neighbour.h:542 [inline] ip6_finish_output2+0xe2e/0x1650 net/ipv6/ip6_output.c:141 ip6_send_skb+0x1d5/0x380 net/ipv6/ip6_output.c:2038 udp_v6_send_skb+0xbbb/0x1860 net/ipv6/udp.c:1295 udpv6_sendmsg+0x1bb8/0x22f0 net/ipv6/udp.c:1591 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x5bf/0x950 net/socket.c:2595 ___sys_sendmsg+0x220/0x290 net/socket.c:2649 __sys_sendmmsg+0x275/0x4a0 net/socket.c:2735 __do_sys_sendmmsg net/socket.c:2764 [inline] __se_sys_sendmmsg net/socket.c:2761 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2761 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fa3e338e9a9 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:00007fa3e41eb038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007fa3e35b5fa0 RCX: 00007fa3e338e9a9 RDX: 0000000000000003 RSI: 0000200000001b80 RDI: 0000000000000003 RBP: 00007fa3e3410d69 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000004001c00 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fa3e35b5fa0 R15: 00007fff61c2cd78 Allocated by task 15042: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3485 [inline] kmem_cache_alloc_node+0x150/0x330 mm/slub.c:3530 kmalloc_reserve+0x95/0x260 net/core/skbuff.c:559 __alloc_skb+0x138/0x2c0 net/core/skbuff.c:650 __netdev_alloc_skb+0x10c/0x500 net/core/skbuff.c:714 netdev_alloc_skb include/linux/skbuff.h:3249 [inline] dev_alloc_skb include/linux/skbuff.h:3262 [inline] __ieee80211_beacon_get+0xe17/0x1600 net/mac80211/tx.c:5437 ieee80211_beacon_get_tim+0xb8/0x560 net/mac80211/tx.c:5559 ieee80211_beacon_get include/net/mac80211.h:5438 [inline] mac80211_hwsim_beacon_tx+0x3c7/0x780 drivers/net/wireless/virtual/mac80211_hwsim.c:2265 __iterate_interfaces+0x243/0x500 net/mac80211/util.c:766 ieee80211_iterate_active_interfaces_atomic+0xdb/0x180 net/mac80211/util.c:802 mac80211_hwsim_beacon+0xbb/0x1b0 drivers/net/wireless/virtual/mac80211_hwsim.c:2295 __run_hrtimer kernel/time/hrtimer.c:1755 [inline] __hrtimer_run_queues+0x51e/0xc40 kernel/time/hrtimer.c:1819 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1836 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 Freed by task 15042: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1806 [inline] slab_free_freelist_hook+0x130/0x1b0 mm/slub.c:1832 slab_free mm/slub.c:3816 [inline] kmem_cache_free+0xf8/0x280 mm/slub.c:3838 skb_kfree_head net/core/skbuff.c:943 [inline] skb_free_head net/core/skbuff.c:957 [inline] skb_release_data+0x60a/0x800 net/core/skbuff.c:987 skb_release_all net/core/skbuff.c:1053 [inline] __kfree_skb net/core/skbuff.c:1067 [inline] consume_skb+0xb2/0x110 net/core/skbuff.c:1283 mac80211_hwsim_beacon_tx+0x3e9/0x780 drivers/net/wireless/virtual/mac80211_hwsim.c:2269 __iterate_interfaces+0x243/0x500 net/mac80211/util.c:766 ieee80211_iterate_active_interfaces_atomic+0xdb/0x180 net/mac80211/util.c:802 mac80211_hwsim_beacon+0xbb/0x1b0 drivers/net/wireless/virtual/mac80211_hwsim.c:2295 __run_hrtimer kernel/time/hrtimer.c:1755 [inline] __hrtimer_run_queues+0x51e/0xc40 kernel/time/hrtimer.c:1819 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1836 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 The buggy address belongs to the object at ffff88806b0c1e00 which belongs to the cache skbuff_small_head of size 640 The buggy address is located 510 bytes inside of freed 640-byte region [ffff88806b0c1e00, ffff88806b0c2080) The buggy address belongs to the physical page: page:ffffea0001ac3000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6b0c0 head:ffffea0001ac3000 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff88801e65b280 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 13670, tgid 13670 (syz-executor), ts 447330485315, free_ts 447327059590 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554 prep_new_page mm/page_alloc.c:1561 [inline] get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457 alloc_slab_page+0x5d/0x170 mm/slub.c:1876 allocate_slab mm/slub.c:2023 [inline] new_slab+0x87/0x2e0 mm/slub.c:2076 ___slab_alloc+0xc6d/0x12f0 mm/slub.c:3230 __slab_alloc mm/slub.c:3329 [inline] __slab_alloc_node mm/slub.c:3382 [inline] slab_alloc_node mm/slub.c:3475 [inline] kmem_cache_alloc_node+0x1ea/0x330 mm/slub.c:3530 kmalloc_reserve+0x95/0x260 net/core/skbuff.c:559 __alloc_skb+0x138/0x2c0 net/core/skbuff.c:650 alloc_skb include/linux/skbuff.h:1284 [inline] alloc_uevent_skb+0x7d/0x230 lib/kobject_uevent.c:290 uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline] kobject_uevent_net_broadcast+0x17e/0x530 lib/kobject_uevent.c:412 kobject_uevent_env+0x550/0x8c0 lib/kobject_uevent.c:608 rx_queue_add_kobject net/core/net-sysfs.c:1101 [inline] net_rx_queue_update_kobjects+0x313/0x580 net/core/net-sysfs.c:1141 register_queue_kobjects net/core/net-sysfs.c:1801 [inline] netdev_register_kobject+0x227/0x310 net/core/net-sysfs.c:2046 register_netdevice+0x128f/0x1ae0 net/core/dev.c:10268 veth_newlink+0x7bb/0xc30 drivers/net/veth.c:1902 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1154 [inline] free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429 __stack_depot_save+0x572/0x630 lib/stackdepot.c:443 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x5f/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3485 [inline] slab_alloc mm/slub.c:3493 [inline] __kmem_cache_alloc_lru mm/slub.c:3500 [inline] kmem_cache_alloc+0x11e/0x2e0 mm/slub.c:3509 kmem_cache_zalloc include/linux/slab.h:711 [inline] fill_pool lib/debugobjects.c:169 [inline] debug_objects_fill_pool+0x344/0x6b0 lib/debugobjects.c:616 __debug_object_init+0x27/0x430 lib/debugobjects.c:628 debug_timer_init kernel/time/timer.c:777 [inline] debug_init kernel/time/timer.c:825 [inline] init_timer_key+0x41/0x2a0 kernel/time/timer.c:869 ipv6_mc_init_dev+0x10f/0x7d0 net/ipv6/mcast.c:2769 ipv6_add_dev+0xbb2/0x11f0 net/ipv6/addrconf.c:448 addrconf_notify+0x67b/0x1010 net/ipv6/addrconf.c:3623 notifier_call_chain+0x197/0x390 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2064 [inline] call_netdevice_notifiers net/core/dev.c:2078 [inline] register_netdevice+0x160c/0x1ae0 net/core/dev.c:10301 veth_newlink+0x598/0xc30 drivers/net/veth.c:1871 Memory state around the buggy address: ffff88806b0c1e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806b0c1f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88806b0c1f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806b0c2000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806b0c2080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================