================================================================== BUG: KASAN: use-after-free in decode_session6 net/xfrm/xfrm_policy.c:3389 [inline] BUG: KASAN: use-after-free in __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3481 Read of size 1 at addr ffff888050acb4ab by task syz-executor.4/27462 CPU: 0 PID: 27462 Comm: syz-executor.4 Not tainted 5.7.0-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 decode_session6 net/xfrm/xfrm_policy.c:3389 [inline] __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3481 xfrm_decode_session include/net/xfrm.h:1133 [inline] vti6_tnl_xmit+0x5b8/0x1d30 net/ipv6/ip6_vti.c:577 __netdev_start_xmit include/linux/netdevice.h:4607 [inline] netdev_start_xmit include/linux/netdevice.h:4621 [inline] xmit_one net/core/dev.c:3545 [inline] dev_hard_start_xmit+0x1a4/0x9b0 net/core/dev.c:3561 sch_direct_xmit+0x345/0xc20 net/sched/sch_generic.c:313 qdisc_restart net/sched/sch_generic.c:376 [inline] __qdisc_run+0x4d1/0x17b0 net/sched/sch_generic.c:384 __dev_xmit_skb net/core/dev.c:3784 [inline] __dev_queue_xmit+0x165b/0x30a0 net/core/dev.c:4089 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x1091/0x25b0 net/ipv6/ip6_output.c:117 ip6_fragment+0x1479/0x2540 net/ipv6/ip6_output.c:920 __ip6_finish_output+0x573/0xab0 net/ipv6/ip6_output.c:141 ip6_finish_output+0x34/0x1f0 net/ipv6/ip6_output.c:153 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x239/0x810 net/ipv6/ip6_output.c:176 dst_output include/net/dst.h:435 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_xmit+0xe1a/0x2090 net/ipv6/ip6_output.c:280 sctp_v6_xmit+0x33b/0x690 net/sctp/ipv6.c:217 sctp_packet_transmit+0x19fc/0x3490 net/sctp/output.c:629 sctp_packet_singleton net/sctp/outqueue.c:773 [inline] sctp_outq_flush_ctrl.constprop.0+0x6ca/0xc40 net/sctp/outqueue.c:904 sctp_outq_flush+0xf8/0x2340 net/sctp/outqueue.c:1186 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1801 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1185 [inline] sctp_do_sm+0x4db/0x4ec0 net/sctp/sm_sideeffect.c:1156 sctp_primitive_ASSOCIATE+0x98/0xc0 net/sctp/primitive.c:73 __sctp_connect+0x7e8/0xc70 net/sctp/socket.c:1234 __sctp_setsockopt_connectx+0x12d/0x180 net/sctp/socket.c:1343 sctp_getsockopt_connectx3 net/sctp/socket.c:1428 [inline] sctp_getsockopt net/sctp/socket.c:8099 [inline] sctp_getsockopt+0x177f/0x6f5d net/sctp/socket.c:8030 __sys_getsockopt+0x14b/0x2e0 net/socket.c:2172 __do_sys_getsockopt net/socket.c:2187 [inline] __se_sys_getsockopt net/socket.c:2184 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:2184 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45ca69 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:00007f9650fcfc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00000000004dfc80 RCX: 000000000045ca69 RDX: 000000000000006f RSI: 0000000000000084 RDI: 0000000000000006 RBP: 000000000078bf00 R08: 0000000020000240 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000001aa R14: 00000000004d2c28 R15: 00007f9650fd06d4 The buggy address belongs to the page: page:ffffea000142b2c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000000() raw: 00fffe0000000000 0000000000000000 ffffffff01420101 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888050acb380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888050acb400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888050acb480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888050acb500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888050acb580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================