================================================================== BUG: KASAN: use-after-free in decode_session6+0xe7c/0x1580 net/xfrm/xfrm_policy.c:3393 Read of size 1 at addr ffff88802d11625e by task syz-executor.3/8542 CPU: 0 PID: 8542 Comm: syz-executor.3 Not tainted 5.10.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:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 decode_session6+0xe7c/0x1580 net/xfrm/xfrm_policy.c:3393 __xfrm_decode_session+0x50/0xb0 net/xfrm/xfrm_policy.c:3485 xfrm_decode_session include/net/xfrm.h:1137 [inline] vti6_tnl_xmit+0x40d/0x1cd0 net/ipv6/ip6_vti.c:576 __netdev_start_xmit include/linux/netdevice.h:4776 [inline] netdev_start_xmit include/linux/netdevice.h:4790 [inline] xmit_one net/core/dev.c:3574 [inline] dev_hard_start_xmit+0x1eb/0x960 net/core/dev.c:3590 sch_direct_xmit+0x2d5/0xb70 net/sched/sch_generic.c:313 qdisc_restart net/sched/sch_generic.c:376 [inline] __qdisc_run+0x4d1/0x1610 net/sched/sch_generic.c:384 __dev_xmit_skb net/core/dev.c:3813 [inline] __dev_queue_xmit+0x1abb/0x2ec0 net/core/dev.c:4119 neigh_connected_output+0x380/0x4c0 net/core/neighbour.c:1520 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x68c/0x1710 net/ipv6/ip6_output.c:117 __ip6_finish_output net/ipv6/ip6_output.c:143 [inline] __ip6_finish_output+0x4be/0xb80 net/ipv6/ip6_output.c:128 ip6_finish_output+0x35/0x200 net/ipv6/ip6_output.c:153 NF_HOOK_COND include/linux/netfilter.h:290 [inline] ip6_output+0x1db/0x520 net/ipv6/ip6_output.c:176 dst_output include/net/dst.h:441 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ndisc_send_skb+0xacc/0x1850 net/ipv6/ndisc.c:508 ndisc_send_rs+0x12e/0x710 net/ipv6/ndisc.c:702 addrconf_rs_timer+0x3f2/0x820 net/ipv6/addrconf.c:3874 call_timer_fn+0x1a5/0x710 kernel/time/timer.c:1417 expire_timers kernel/time/timer.c:1462 [inline] __run_timers.part.0+0x692/0xa80 kernel/time/timer.c:1731 __run_timers kernel/time/timer.c:1712 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1744 __do_softirq+0x2bc/0xa77 kernel/softirq.c:343 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0xaa/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:226 [inline] __irq_exit_rcu+0x17f/0x200 kernel/softirq.c:420 irq_exit_rcu+0x5/0x20 kernel/softirq.c:432 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1096 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628 RIP: 0010:check_kcov_mode kernel/kcov.c:163 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x7/0x60 kernel/kcov.c:197 Code: 0f bd c8 49 8b 14 24 48 63 c9 e9 66 ff ff ff 4c 01 ca 49 89 13 e9 00 fd ff ff 66 0f 1f 84 00 00 00 00 00 65 8b 05 c9 a9 8e 7e <89> c1 48 8b 34 24 81 e1 00 01 00 00 65 48 8b 14 25 00 f0 01 00 a9 RSP: 0018:ffffc90001737808 EFLAGS: 00000282 RAX: 0000000080000002 RBX: 800000006b36d007 RCX: 0000000000000000 RDX: ffff88806b7323c0 RSI: ffffffff81a72761 RDI: 0000000000000003 RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff81a72757 R11: 0000000000000000 R12: 0000000000000010 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 copy_present_pte mm/memory.c:896 [inline] copy_pte_range mm/memory.c:978 [inline] copy_pmd_range mm/memory.c:1058 [inline] copy_pud_range mm/memory.c:1095 [inline] copy_p4d_range mm/memory.c:1119 [inline] copy_page_range+0xfea/0x4010 mm/memory.c:1192 dup_mmap kernel/fork.c:594 [inline] dup_mm+0x9ed/0x1380 kernel/fork.c:1361 copy_mm kernel/fork.c:1417 [inline] copy_process+0x2a3e/0x6fe0 kernel/fork.c:2099 kernel_clone+0xe7/0xad0 kernel/fork.c:2464 __do_sys_clone+0xc8/0x110 kernel/fork.c:2581 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45c71a Code: f7 d8 64 89 04 25 d4 02 00 00 64 4c 8b 0c 25 10 00 00 00 31 d2 4d 8d 91 d0 02 00 00 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 f5 00 00 00 85 c0 41 89 c5 0f 85 fc 00 00 RSP: 002b:00007ffd3df47230 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007ffd3df47230 RCX: 000000000045c71a RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 00007ffd3df47270 R08: 0000000000000001 R09: 000000000245e940 R10: 000000000245ec10 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001 The buggy address belongs to the page: page:0000000035d912a6 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x2d116 flags: 0xfff00000000000() raw: 00fff00000000000 ffffea0000e2a888 ffffea000045ca48 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88802d116100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802d116180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88802d116200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88802d116280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802d116300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================