================================================================== BUG: KASAN: slab-out-of-bounds in decode_session6 net/xfrm/xfrm_policy.c:3394 [inline] BUG: KASAN: slab-out-of-bounds in __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3486 Read of size 1 at addr ffff888058e1164c by task swapper/1/0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.7.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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:382 __kasan_report.cold+0x20/0x38 mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 decode_session6 net/xfrm/xfrm_policy.c:3394 [inline] __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3486 xfrm_decode_session include/net/xfrm.h:1138 [inline] vti_tunnel_xmit+0x25c/0x19a0 net/ipv4/ip_vti.c:300 __netdev_start_xmit include/linux/netdevice.h:4599 [inline] netdev_start_xmit include/linux/netdevice.h:4613 [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/0x3090 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_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:3863 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x623/0x1600 kernel/time/timer.c:1786 __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 b4 71 55 00 f4 c3 66 90 e9 07 00 00 00 0f 00 2d a4 71 55 00 fb f4 cc 41 56 41 55 41 54 55 53 e8 43 f0 8d f9 e8 4e 38 c7 fb 0f 1f RSP: 0018:ffffc90000d3fdb8 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff132980f RBX: ffff8880a95f0340 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000006 RDI: ffff8880a95f0c04 RBP: dffffc0000000000 R08: ffff8880a95f0340 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffed10152be068 R13: 0000000000000001 R14: ffffffff8a89c280 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_secondary+0x2f8/0x410 arch/x86/kernel/smpboot.c:268 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:242 Allocated by task 17855: 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 kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0xb4/0xf0 mm/util.c:574 kvmalloc include/linux/mm.h:757 [inline] kvzalloc include/linux/mm.h:765 [inline] alloc_netdev_mqs+0x97/0xdc0 net/core/dev.c:9899 rtnl_create_link+0x219/0xac0 net/core/rtnetlink.c:3068 __rtnl_newlink+0xe2e/0x1590 net/core/rtnetlink.c:3330 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3398 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5461 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2469 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e6/0x810 net/socket.c:2352 ___sys_sendmsg+0x100/0x170 net/socket.c:2406 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2439 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888058e10000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 5708 bytes inside of 8192-byte region [ffff888058e10000, ffff888058e12000) The buggy address belongs to the page: page:ffffea0001638400 refcount:1 mapcount:0 mapping:0000000077d88694 index:0x0 head:ffffea0001638400 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0002a2fe08 ffffea00025d3808 ffff8880aa0021c0 raw: 0000000000000000 ffff888058e10000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888058e11500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888058e11580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888058e11600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888058e11680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888058e11700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================