================================================================== BUG: KASAN: slab-out-of-bounds in _decode_session6+0xeb6/0x1300 net/ipv6/xfrm6_policy.c:137 Read of size 1 at addr ffff8880573db877 by task syz-executor.5/6927 CPU: 1 PID: 6927 Comm: syz-executor.5 Not tainted 4.19.128-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+0x1fc/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x222 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396 _decode_session6+0xeb6/0x1300 net/ipv6/xfrm6_policy.c:137 __xfrm_decode_session+0x5a/0x130 net/xfrm/xfrm_policy.c:2299 xfrm_decode_session include/net/xfrm.h:1237 [inline] vti_tunnel_xmit+0x259/0x18a0 net/ipv4/ip_vti.c:326 __netdev_start_xmit include/linux/netdevice.h:4314 [inline] netdev_start_xmit include/linux/netdevice.h:4323 [inline] xmit_one net/core/dev.c:3260 [inline] dev_hard_start_xmit+0x1a4/0x940 net/core/dev.c:3276 sch_direct_xmit+0x343/0xfd0 net/sched/sch_generic.c:332 qdisc_restart net/sched/sch_generic.c:395 [inline] __qdisc_run+0x4d3/0x1690 net/sched/sch_generic.c:403 __dev_xmit_skb net/core/dev.c:3504 [inline] __dev_queue_xmit+0x182a/0x3010 net/core/dev.c:3814 neigh_output include/net/neighbour.h:501 [inline] ip6_finish_output2+0x130c/0x2570 net/ipv6/ip6_output.c:120 ip6_finish_output+0x7e8/0xc00 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x760 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:447 [inline] NF_HOOK include/linux/netfilter.h:289 [inline] ndisc_send_skb+0xa81/0x1710 net/ipv6/ndisc.c:491 ndisc_send_rs+0x131/0x690 net/ipv6/ndisc.c:685 addrconf_rs_timer+0x306/0x680 net/ipv6/addrconf.c:3834 call_timer_fn+0x177/0x700 kernel/time/timer.c:1326 expire_timers+0x24f/0x4f0 kernel/time/timer.c:1363 __run_timers kernel/time/timer.c:1684 [inline] run_timer_softirq+0x218/0x660 kernel/time/timer.c:1697 __do_softirq+0x26c/0x93d kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x17b/0x1c0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:get_current arch/x86/include/asm/current.h:15 [inline] RIP: 0010:do_syscall_64+0x56/0x620 arch/x86/entry/common.c:281 Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 2d 05 00 00 48 83 3d f4 c2 b1 07 00 0f 84 44 04 00 00 e8 d1 05 67 00 fb 66 0f 1f 44 00 00 <65> 4c 8b 24 25 40 ee 01 00 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 RSP: 0018:ffff88806043ff28 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13 RAX: ffff888060434140 RBX: 0000000000000023 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff810094ef RDI: ffff8880604349c4 RBP: ffff88806043ff58 R08: ffff888060434140 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff88b257d8 R14: 0000000000000000 R15: 0000000000000000 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45af70 Code: c0 5b 5d c3 66 0f 1f 44 00 00 8b 04 24 48 83 c4 18 5b 5d c3 66 0f 1f 44 00 00 83 3d e1 ee 84 00 00 75 14 b8 23 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 d4 d1 fb ff c3 48 83 ec 08 e8 8a 46 00 00 RSP: 002b:00007ffcf602c3b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000023 RAX: ffffffffffffffda RBX: 00000000000fded0 RCX: 000000000045af70 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007ffcf602c3c0 RBP: 0000000000000ef0 R08: 0000000000000001 R09: 0000000001b9e940 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 R13: 00007ffcf602c410 R14: 00000000000fde3d R15: 00007ffcf602c420 Allocated by task 19902: __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node+0x4c/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] alloc_netdev_mqs+0x97/0xd50 net/core/dev.c:9137 rtnl_create_link+0x1d4/0xa30 net/core/rtnetlink.c:2869 rtnl_newlink+0xe1a/0x1440 net/core/rtnetlink.c:3131 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4777 netlink_rcv_skb+0x160/0x410 net/netlink/af_netlink.c:2455 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x4d7/0x6a0 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x6e3/0xcc0 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:632 ___sys_sendmsg+0x803/0x920 net/socket.c:2115 __sys_sendmsg+0xec/0x1b0 net/socket.c:2153 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 18: __cache_free mm/slab.c:3503 [inline] kfree+0xce/0x220 mm/slab.c:3822 __rcu_reclaim kernel/rcu/rcu.h:231 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0x9fc/0x17e0 kernel/rcu/tree.c:2881 __do_softirq+0x26c/0x93d kernel/softirq.c:292 The buggy address belongs to the object at ffff8880573da300 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 1399 bytes to the right of 4096-byte region [ffff8880573da300, ffff8880573db300) The buggy address belongs to the page: page:ffffea00015cf680 count:1 mapcount:0 mapping:ffff88812c3dcdc0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea000176e888 ffffea000213a488 ffff88812c3dcdc0 raw: 0000000000000000 ffff8880573da300 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880573db700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880573db780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880573db800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880573db880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880573db900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================