================================================================== BUG: KASAN: slab-use-after-free in decode_session6 net/xfrm/xfrm_policy.c:3451 [inline] BUG: KASAN: slab-use-after-free in __xfrm_decode_session+0x1520/0x1d20 net/xfrm/xfrm_policy.c:3557 Read of size 1 at addr ffff0000e30a399e by task udevd/5083 CPU: 1 PID: 5083 Comm: udevd Not tainted 6.4.0-rc7-syzkaller-00019-g99ec1ed7c2ed #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x174/0x514 mm/kasan/report.c:462 kasan_report+0xd4/0x130 mm/kasan/report.c:572 __asan_report_load1_noabort+0x20/0x2c mm/kasan/report_generic.c:378 decode_session6 net/xfrm/xfrm_policy.c:3451 [inline] __xfrm_decode_session+0x1520/0x1d20 net/xfrm/xfrm_policy.c:3557 vti6_tnl_xmit+0x31c/0x173c __netdev_start_xmit include/linux/netdevice.h:4918 [inline] netdev_start_xmit include/linux/netdevice.h:4932 [inline] xmit_one net/core/dev.c:3578 [inline] dev_hard_start_xmit+0x240/0x8ac net/core/dev.c:3594 sch_direct_xmit+0x234/0x548 net/sched/sch_generic.c:342 qdisc_restart net/sched/sch_generic.c:407 [inline] __qdisc_run+0x8a0/0x2228 net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3868 [inline] __dev_queue_xmit+0xbfc/0x31c4 net/core/dev.c:4210 dev_queue_xmit include/linux/netdevice.h:3088 [inline] neigh_connected_output+0x338/0x37c net/core/neighbour.c:1581 neigh_output include/net/neighbour.h:544 [inline] ip6_finish_output2+0xd60/0x1a1c net/ipv6/ip6_output.c:134 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x538/0x8c8 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:292 [inline] ip6_output+0x270/0x594 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:458 [inline] NF_HOOK include/linux/netfilter.h:303 [inline] ndisc_send_skb+0xbe0/0x1704 net/ipv6/ndisc.c:508 ndisc_send_rs+0x47c/0x5d4 net/ipv6/ndisc.c:718 addrconf_rs_timer+0x300/0x58c net/ipv6/addrconf.c:3936 call_timer_fn+0x19c/0x8cc kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1751 [inline] __run_timers+0x55c/0x734 kernel/time/timer.c:2022 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:2035 __do_softirq+0x2d0/0xd54 kernel/softirq.c:571 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:899 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:85 invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:650 irq_exit_rcu+0x14/0x84 kernel/softirq.c:662 __el1_irq arch/arm64/kernel/entry-common.c:472 [inline] el1_interrupt+0x38/0x68 arch/arm64/kernel/entry-common.c:486 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:491 el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:587 local_daif_restore arch/arm64/include/asm/daifflags.h:117 [inline] el0_svc_common+0xa8/0x258 arch/arm64/kernel/syscall.c:107 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Allocated by task 5083: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:510 __kasan_slab_alloc+0x58/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x80/0x444 mm/slab.h:711 slab_alloc_node mm/slub.c:3451 [inline] kmem_cache_alloc_node+0x2c8/0x43c mm/slub.c:3496 kmalloc_reserve+0xb4/0x240 net/core/skbuff.c:568 __alloc_skb+0x1c8/0x3d8 net/core/skbuff.c:654 alloc_skb include/linux/skbuff.h:1288 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1211 [inline] netlink_sendmsg+0x634/0xb18 net/netlink/af_netlink.c:1888 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0x568/0x81c net/socket.c:2503 ___sys_sendmsg net/socket.c:2557 [inline] __sys_sendmsg+0x26c/0x33c net/socket.c:2586 __do_sys_sendmsg net/socket.c:2595 [inline] __se_sys_sendmsg net/socket.c:2593 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2593 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Freed by task 5818: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:521 ____kasan_slab_free+0x128/0x1a4 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3786 [inline] kmem_cache_free+0x25c/0x4e8 mm/slub.c:3808 skb_kfree_head net/core/skbuff.c:903 [inline] skb_free_head+0xa4/0x198 net/core/skbuff.c:918 skb_release_data+0x444/0x5c8 net/core/skbuff.c:948 skb_release_all net/core/skbuff.c:1014 [inline] __kfree_skb net/core/skbuff.c:1028 [inline] consume_skb+0x14c/0x414 net/core/skbuff.c:1244 skb_free_datagram+0x20/0x30 net/core/datagram.c:322 netlink_recvmsg+0x488/0xe18 net/netlink/af_netlink.c:1991 sock_recvmsg_nosec net/socket.c:1019 [inline] sock_recvmsg net/socket.c:1040 [inline] ____sys_recvmsg+0x230/0x6e8 net/socket.c:2722 ___sys_recvmsg net/socket.c:2764 [inline] __sys_recvmsg+0x27c/0x350 net/socket.c:2794 __do_sys_recvmsg net/socket.c:2804 [inline] __se_sys_recvmsg net/socket.c:2801 [inline] __arm64_sys_recvmsg+0x80/0x94 net/socket.c:2801 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 The buggy address belongs to the object at ffff0000e30a3900 which belongs to the cache skbuff_small_head of size 640 The buggy address is located 158 bytes inside of freed 640-byte region [ffff0000e30a3900, ffff0000e30a3b80) The buggy address belongs to the physical page: page:0000000018f4a1dc refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1230a0 head:0000000018f4a1dc order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000010200 ffff0000c0b6e900 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e30a3880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000e30a3900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000e30a3980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000e30a3a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e30a3a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================