================================================================== BUG: KASAN: use-after-free in _decode_session6+0xeb6/0x1300 net/ipv6/xfrm6_policy.c:137 Read of size 1 at addr ffff8880750fe4a9 by task syz-executor.1/3697 CPU: 0 PID: 3697 Comm: syz-executor.1 Not tainted 4.19.124-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x222 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396 _decode_session6+0xeb6/0x1300 net/ipv6/xfrm6_policy.c:137 __xfrm_decode_session+0x5a/0x130 net/xfrm/xfrm_policy.c:2304 xfrm_decode_session_reverse include/net/xfrm.h:1244 [inline] icmpv6_route_lookup+0x2f5/0x470 net/ipv6/icmp.c:372 icmp6_send+0x1460/0x2260 net/ipv6/icmp.c:555 icmpv6_send+0xde/0x210 net/ipv6/ip6_icmp.c:43 ip6_link_failure+0x26/0x4e0 net/ipv6/route.c:2297 dst_link_failure include/net/dst.h:430 [inline] ipip6_tunnel_xmit net/ipv6/sit.c:1001 [inline] sit_tunnel_xmit+0x1453/0x2625 net/ipv6/sit.c:1038 __netdev_start_xmit include/linux/netdevice.h:4314 [inline] netdev_start_xmit include/linux/netdevice.h:4323 [inline] xmit_one net/core/dev.c:3260 [inline] dev_hard_start_xmit+0x1a4/0x940 net/core/dev.c:3276 sch_direct_xmit+0x343/0xfd0 net/sched/sch_generic.c:332 qdisc_restart net/sched/sch_generic.c:395 [inline] __qdisc_run+0x4d3/0x1690 net/sched/sch_generic.c:403 __dev_xmit_skb net/core/dev.c:3504 [inline] __dev_queue_xmit+0x182a/0x3010 net/core/dev.c:3814 neigh_output include/net/neighbour.h:501 [inline] ip6_finish_output2+0x130c/0x2570 net/ipv6/ip6_output.c:120 ip6_finish_output+0x7e8/0xc00 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x760 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:447 [inline] ip6_local_out+0xaf/0x170 net/ipv6/output_core.c:178 ip6_send_skb+0xb3/0x300 net/ipv6/ip6_output.c:1699 ip6_push_pending_frames+0xbd/0xe0 net/ipv6/ip6_output.c:1719 rawv6_push_pending_frames net/ipv6/raw.c:618 [inline] rawv6_sendmsg+0x2a3b/0x3670 net/ipv6/raw.c:959 inet_sendmsg+0x12e/0x590 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:632 __sys_sendto+0x21a/0x330 net/socket.c:1787 __do_sys_sendto net/socket.c:1799 [inline] __se_sys_sendto net/socket.c:1795 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1795 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45ca29 Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f69c6d3bc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000501200 RCX: 000000000045ca29 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 000000000078bf00 R08: 0000000020000180 R09: 000000000000001c R10: 0000000000000004 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000a0f R14: 00000000004cce62 R15: 00007f69c6d3c6d4 The buggy address belongs to the page: page:ffffea0001d43f80 count:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000000() raw: 00fffe0000000000 ffffea000212d088 ffffea0002800008 0000000000000000 raw: 0000000000000000 ffff88806871bc60 00000001fffffbff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880750fe380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880750fe400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880750fe480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880750fe500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880750fe580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================