================================================================== BUG: KASAN: slab-out-of-bounds in decode_session6 net/xfrm/xfrm_policy.c:3393 [inline] BUG: KASAN: slab-out-of-bounds in __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3485 Read of size 1 at addr ffff888069bff983 by task kworker/1:2/15508 CPU: 1 PID: 15508 Comm: kworker/1:2 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events linkwatch_event Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:132 decode_session6 net/xfrm/xfrm_policy.c:3393 [inline] __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3485 xfrm_decode_session include/net/xfrm.h:1138 [inline] vti6_tnl_xmit+0x603/0x1d30 net/ipv6/ip6_vti.c:548 __netdev_start_xmit include/linux/netdevice.h:4523 [inline] netdev_start_xmit include/linux/netdevice.h:4537 [inline] xmit_one net/core/dev.c:3475 [inline] dev_hard_start_xmit+0x1a3/0x9b0 net/core/dev.c:3491 sch_direct_xmit+0x372/0xd30 net/sched/sch_generic.c:313 qdisc_restart net/sched/sch_generic.c:376 [inline] __qdisc_run+0x4bf/0x17e0 net/sched/sch_generic.c:384 __dev_xmit_skb net/core/dev.c:3714 [inline] __dev_queue_xmit+0x163c/0x3080 net/core/dev.c:4019 dev_queue_xmit+0x18/0x20 net/core/dev.c:4083 neigh_direct_output+0x16/0x20 net/core/neighbour.c:1527 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x109a/0x25c0 net/ipv6/ip6_output.c:116 __ip6_finish_output+0x444/0xaa0 net/ipv6/ip6_output.c:142 ip6_finish_output+0x38/0x1f0 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x25e/0x880 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] mld_sendpack+0x9c2/0xed0 net/ipv6/mcast.c:1682 mld_send_cr net/ipv6/mcast.c:1978 [inline] mld_ifc_timer_expire+0x454/0x950 net/ipv6/mcast.c:2477 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+0x6c3/0x1790 kernel/time/timer.c:1786 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1146 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:752 [inline] RIP: 0010:console_unlock+0xbb8/0xf00 kernel/printk/printk.c:2481 Code: b3 89 48 c1 e8 03 42 80 3c 30 00 0f 85 e4 02 00 00 48 83 3d c1 65 55 08 00 0f 84 91 01 00 00 e8 be 3c 17 00 48 8b 7d 98 57 9d <0f> 1f 44 00 00 e9 6d ff ff ff e8 a9 3c 17 00 48 8b 7d 08 c7 05 7b RSP: 0018:ffffc9000633f790 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13 RAX: ffff8880a99f8300 RBX: 0000000000000200 RCX: 0000000000000006 RDX: 0000000000000000 RSI: ffffffff815e4b02 RDI: 0000000000000293 RBP: ffffc9000633f818 R08: 1ffffffff16a356c R09: fffffbfff16a356d R10: fffffbfff16a356c R11: ffffffff8b51ab67 R12: 0000000000000000 R13: ffffffff84beebf0 R14: dffffc0000000000 R15: ffffffff8a355190 vprintk_emit+0x2a0/0x700 kernel/printk/printk.c:1996 vprintk_default+0x28/0x30 kernel/printk/printk.c:2023 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:386 printk+0xba/0xed kernel/printk/printk.c:2056 addrconf_notify.cold+0x2c/0x76 net/ipv6/addrconf.c:3573 notifier_call_chain+0xc2/0x230 kernel/notifier.c:83 __raw_notifier_call_chain kernel/notifier.c:361 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:368 call_netdevice_notifiers_info net/core/dev.c:1948 [inline] call_netdevice_notifiers_info+0xba/0x130 net/core/dev.c:1933 netdev_state_change net/core/dev.c:1383 [inline] netdev_state_change+0x10d/0x140 net/core/dev.c:1376 linkwatch_do_dev+0x14e/0x190 net/core/link_watch.c:159 __linkwatch_run_queue+0x203/0x690 net/core/link_watch.c:204 linkwatch_event+0x4e/0x70 net/core/link_watch.c:243 process_one_work+0xa05/0x17a0 kernel/workqueue.c:2264 worker_thread+0x98/0xe40 kernel/workqueue.c:2410 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 9880: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc_track_caller+0x15f/0x760 mm/slab.c:3671 kmemdup+0x27/0x60 mm/util.c:127 kmemdup include/linux/string.h:454 [inline] __addrconf_sysctl_register+0xae/0x430 net/ipv6/addrconf.c:6835 addrconf_sysctl_register net/ipv6/addrconf.c:6900 [inline] addrconf_sysctl_register+0x140/0x1e0 net/ipv6/addrconf.c:6889 ipv6_add_dev net/ipv6/addrconf.c:443 [inline] ipv6_add_dev+0x9dd/0x10b0 net/ipv6/addrconf.c:363 addrconf_notify+0x89c/0x2270 net/ipv6/addrconf.c:3491 notifier_call_chain+0xc2/0x230 kernel/notifier.c:83 __raw_notifier_call_chain kernel/notifier.c:361 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:368 call_netdevice_notifiers_info net/core/dev.c:1948 [inline] call_netdevice_notifiers_info+0xba/0x130 net/core/dev.c:1933 call_netdevice_notifiers_extack net/core/dev.c:1960 [inline] call_netdevice_notifiers net/core/dev.c:1974 [inline] register_netdevice+0x6de/0x1070 net/core/dev.c:9399 xfrmi_create net/xfrm/xfrm_interface.c:144 [inline] xfrmi_newlink+0x293/0x4e0 net/xfrm/xfrm_interface.c:673 __rtnl_newlink+0x109d/0x1790 net/core/rtnetlink.c:3319 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5440 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2478 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5458 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 __sys_sendto+0x262/0x380 net/socket.c:1998 __do_sys_sendto net/socket.c:2010 [inline] __se_sys_sendto net/socket.c:2006 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:2006 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888069bfe000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2435 bytes to the right of 4096-byte region [ffff888069bfe000, ffff888069bff000) The buggy address belongs to the page: page:ffffea0001a6ff80 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0001a6ff08 ffffea0001a32488 ffff8880aa402000 raw: 0000000000000000 ffff888069bfe000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888069bff880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888069bff900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888069bff980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888069bffa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888069bffa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================