==================================================================
BUG: KASAN: slab-out-of-bounds in xfrm_lookup_with_ifid+0x1e23/0x2150 net/xfrm/xfrm_policy.c:3083
Read of size 4 at addr ffff88809f27d6a4 by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.7.0-rc2-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/0x315 mm/kasan/report.c:382
__kasan_report.cold+0x35/0x4d mm/kasan/report.c:511
kasan_report+0x33/0x50 mm/kasan/common.c:625
xfrm_lookup_with_ifid+0x1e23/0x2150 net/xfrm/xfrm_policy.c:3083
xfrmi_xmit2 net/xfrm/xfrm_interface.c:272 [inline]
xfrmi_xmit+0x3c1/0x1430 net/xfrm/xfrm_interface.c:387
__netdev_start_xmit include/linux/netdevice.h:4533 [inline]
netdev_start_xmit include/linux/netdevice.h:4547 [inline]
xmit_one net/core/dev.c:3477 [inline]
dev_hard_start_xmit+0x1a4/0x9b0 net/core/dev.c:3493
__dev_queue_xmit+0x25e1/0x30a0 net/core/dev.c:4052
neigh_output include/net/neighbour.h:510 [inline]
ip6_finish_output2+0x1091/0x25b0 net/ipv6/ip6_output.c:117
__ip6_finish_output+0x442/0xab0 net/ipv6/ip6_output.c:143
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]
ndisc_send_skb+0xf40/0x14b0 net/ipv6/ndisc.c:506
ndisc_send_rs+0x12e/0x6f0 net/ipv6/ndisc.c:700
addrconf_rs_timer+0x30f/0x6e0 net/ipv6/addrconf.c:3889
call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1405
expire_timers kernel/time/timer.c:1450 [inline]
__run_timers kernel/time/timer.c:1774 [inline]
__run_timers kernel/time/timer.c:1741 [inline]
run_timer_softirq+0x623/0x1600 kernel/time/timer.c:1787
__do_softirq+0x26c/0x9f7 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x192/0x1d0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:546 [inline]
smp_apic_timer_interrupt+0x19e/0x600 arch/x86/kernel/apic/apic.c:1140
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61
Code: cc cc cc cc cc cc cc cc cc cc cc cc e9 07 00 00 00 0f 00 2d 04 44 58 00 f4 c3 66 90 e9 07 00 00 00 0f 00 2d f4 43 58 00 fb f4 cc 41 56 41 55 41 54 55 53 e8 83 bc 90 f9 e8 9e 98 c9 fb 0f 1f
RSP: 0018:ffffffff89807d98 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff1329807 RBX: ffffffff898864c0 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000006 RDI: ffffffff89886d84
RBP: dffffc0000000000 R08: ffffffff898864c0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: fffffbfff1310c98
R13: 0000000000000000 R14: ffffffff8a894ec0 R15: 0000000000000000
arch_safe_halt arch/x86/include/asm/paravirt.h:144 [inline]
default_idle+0x49/0x350 arch/x86/kernel/process.c:697
cpuidle_idle_call kernel/sched/idle.c:154 [inline]
do_idle+0x393/0x690 kernel/sched/idle.c:269
cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:361
start_kernel+0x862/0x89c init/main.c:1003
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:242
Allocated by task 4115:
save_stack+0x1b/0x40 mm/kasan/common.c:49
set_track mm/kasan/common.c:57 [inline]
__kasan_kmalloc mm/kasan/common.c:495 [inline]
__kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468
slab_post_alloc_hook mm/slab.h:586 [inline]
slab_alloc mm/slab.c:3320 [inline]
kmem_cache_alloc+0x11b/0x740 mm/slab.c:3484
getname_flags fs/namei.c:138 [inline]
getname_flags+0xd2/0x5b0 fs/namei.c:128
do_sys_openat2+0x3fc/0x7d0 fs/open.c:1142
do_sys_open+0xc3/0x140 fs/open.c:1164
do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
entry_SYSCALL_64_after_hwframe+0x49/0xb3
Freed by task 4115:
save_stack+0x1b/0x40 mm/kasan/common.c:49
set_track mm/kasan/common.c:57 [inline]
kasan_set_free_info mm/kasan/common.c:317 [inline]
__kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456
__cache_free mm/slab.c:3426 [inline]
kmem_cache_free+0x7f/0x320 mm/slab.c:3694
putname+0xe1/0x120 fs/namei.c:259
do_sys_openat2+0x467/0x7d0 fs/open.c:1157
do_sys_open+0xc3/0x140 fs/open.c:1164
do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
entry_SYSCALL_64_after_hwframe+0x49/0xb3
The buggy address belongs to the object at ffff88809f27c540
which belongs to the cache names_cache of size 4096
The buggy address is located 356 bytes to the right of
4096-byte region [ffff88809f27c540, ffff88809f27d540)
The buggy address belongs to the page:
page:ffffea00027c9f00 refcount:1 mapcount:0 mapping:00000000c9c7d1a0 index:0x0 head:ffffea00027c9f00 order:1 compound_mapcount:0
flags: 0xfffe0000010200(slab|head)
raw: 00fffe0000010200 ffffea00017eca88 ffffea000260f188 ffff8880aa1eb000
raw: 0000000000000000 ffff88809f27c540 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88809f27d580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88809f27d600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88809f27d680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88809f27d700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88809f27d780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================