================================================================== BUG: KASAN: use-after-free in decode_session6+0xe7c/0x1580 net/xfrm/xfrm_policy.c:3393 Read of size 1 at addr ffff88814441526e by task syz-executor.5/10954 CPU: 1 PID: 10954 Comm: syz-executor.5 Not tainted 5.10.0-rc5-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+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 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] vti_tunnel_xmit+0x264/0x1980 net/ipv4/ip_vti.c:292 __netdev_start_xmit include/linux/netdevice.h:4718 [inline] netdev_start_xmit include/linux/netdevice.h:4732 [inline] xmit_one net/core/dev.c:3564 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3580 sch_direct_xmit+0x2e1/0xbd0 net/sched/sch_generic.c:313 qdisc_restart net/sched/sch_generic.c:376 [inline] __qdisc_run+0x4ba/0x15e0 net/sched/sch_generic.c:384 __dev_xmit_skb net/core/dev.c:3803 [inline] __dev_queue_xmit+0x19fa/0x2da0 net/core/dev.c:4108 neigh_connected_output+0x380/0x4c0 net/core/neighbour.c:1520 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x6b8/0x16c0 net/ipv6/ip6_output.c:117 __ip6_finish_output net/ipv6/ip6_output.c:143 [inline] __ip6_finish_output+0x447/0xab0 net/ipv6/ip6_output.c:128 ip6_finish_output+0x34/0x1f0 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:443 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ndisc_send_skb+0xa69/0x1720 net/ipv6/ndisc.c:508 ndisc_send_rs+0x12e/0x700 net/ipv6/ndisc.c:702 addrconf_rs_timer+0x3f2/0x820 net/ipv6/addrconf.c:3873 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1410 expire_timers kernel/time/timer.c:1455 [inline] __run_timers.part.0+0x67c/0xa50 kernel/time/timer.c:1747 __run_timers kernel/time/timer.c:1728 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1760 __do_softirq+0x2a0/0x9f6 kernel/softirq.c:298 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:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x132/0x200 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631 RIP: 0010:write_comp_data+0x0/0x80 kernel/kcov.c:212 Code: e9 18 fe ff ff cc cc cc cc cc 65 48 8b 04 25 00 f0 01 00 48 8b 80 50 14 00 00 c3 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 <49> 89 f2 65 8b 05 16 f4 91 7e 65 48 8b 34 25 00 f0 01 00 a9 00 01 RSP: 0018:ffffc900037dfa20 EFLAGS: 00000202 RAX: 0000000000000002 RBX: 0000000000000007 RCX: ffffffff837fe589 RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000001 RBP: ffffffff899684a0 R08: 0000000000000001 R09: ffffffff8f076b47 R10: 0000000000000006 R11: 0000000000000001 R12: 0000000000000007 R13: 000000000000026d R14: dffffc0000000000 R15: 0000000000000000 __sanitizer_cov_trace_switch+0x45/0x70 kernel/kcov.c:320 tomoyo_domain_quota_is_ok+0x1c9/0x550 security/tomoyo/util.c:1056 tomoyo_supervisor+0x2f2/0xef0 security/tomoyo/common.c:2089 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x419/0x590 security/tomoyo/file.c:734 security_file_ioctl+0x50/0xb0 security/security.c:1481 __do_sys_ioctl fs/ioctl.c:747 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0xb3/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 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 b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fcb04584c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000015580 RCX: 000000000045deb9 RDX: 0000000000000000 RSI: 0000000000008906 RDI: 0000000000000003 RBP: 000000000118c008 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bfd4 R13: 00007ffd5b5562df R14: 00007fcb045859c0 R15: 000000000118bfd4 Allocated by task 17: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:664 [inline] neigh_alloc net/core/neighbour.c:401 [inline] ___neigh_create+0x12a4/0x2540 net/core/neighbour.c:579 ip6_finish_output2+0xdf8/0x16c0 net/ipv6/ip6_output.c:114 __ip6_finish_output net/ipv6/ip6_output.c:143 [inline] __ip6_finish_output+0x447/0xab0 net/ipv6/ip6_output.c:128 ip6_finish_output+0x34/0x1f0 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:443 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ndisc_send_skb+0xa69/0x1720 net/ipv6/ndisc.c:508 ndisc_send_rs+0x12e/0x700 net/ipv6/ndisc.c:702 addrconf_dad_completed+0x2fe/0xc60 net/ipv6/addrconf.c:4191 addrconf_dad_work+0x797/0x1280 net/ipv6/addrconf.c:4101 process_one_work+0x933/0x15a0 kernel/workqueue.c:2272 worker_thread+0x64c/0x1120 kernel/workqueue.c:2418 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Freed by task 9793: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x102/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1577 slab_free mm/slub.c:3142 [inline] kmem_cache_free_bulk mm/slub.c:3268 [inline] kmem_cache_free_bulk+0x455/0xbf0 mm/slub.c:3255 kfree_bulk include/linux/slab.h:409 [inline] kfree_rcu_work+0x501/0xa40 kernel/rcu/tree.c:3207 process_one_work+0x933/0x15a0 kernel/workqueue.c:2272 worker_thread+0x64c/0x1120 kernel/workqueue.c:2418 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 The buggy address belongs to the object at ffff888144415000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 622 bytes inside of 1024-byte region [ffff888144415000, ffff888144415400) The buggy address belongs to the page: page:00000000ee77ad3f refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888144414000 pfn:0x144410 head:00000000ee77ad3f order:3 compound_mapcount:0 compound_pincount:0 flags: 0x57ff00000010200(slab|head) raw: 057ff00000010200 ffffea0000b68000 0000000200000002 ffff888010041140 raw: ffff888144414000 000000008010000e 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888144415100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888144415180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888144415200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888144415280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888144415300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================