INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 5.1.0-rc1+ #35 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+0x172/0x1f0 lib/dump_stack.c:113 assign_lock_key kernel/locking/lockdep.c:786 [inline] register_lock_class+0x167e/0x1860 kernel/locking/lockdep.c:1095 __lock_acquire+0xf9/0x3fb0 kernel/locking/lockdep.c:3582 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 __raw_spin_trylock include/linux/spinlock_api_smp.h:90 [inline] _raw_spin_trylock+0x62/0x80 kernel/locking/spinlock.c:128 spin_trylock include/linux/spinlock.h:339 [inline] icmp_xmit_lock net/ipv4/icmp.c:219 [inline] __icmp_send+0x553/0x1400 net/ipv4/icmp.c:666 icmp_send include/net/icmp.h:47 [inline] __udp4_lib_rcv+0x1fb6/0x2c50 net/ipv4/udp.c:2323 udp_rcv+0x22/0x30 net/ipv4/udp.c:2482 ip_protocol_deliver_rcu+0x60/0x8f0 net/ipv4/ip_input.c:208 ip_local_deliver_finish+0x23b/0x390 net/ipv4/ip_input.c:234 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip_local_deliver+0x1e9/0x520 net/ipv4/ip_input.c:255 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x1e1/0x300 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip_rcv+0xe8/0x3f0 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0x115/0x1a0 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5083 process_backlog+0x206/0x750 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x4fa/0x1070 net/core/dev.c:6412 __do_softirq+0x266/0x95a kernel/softirq.c:293 run_ksoftirqd kernel/softirq.c:655 [inline] run_ksoftirqd+0x8e/0x110 kernel/softirq.c:647 smpboot_thread_fn+0x6ab/0xa10 kernel/smpboot.c:164 kthread+0x357/0x430 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 ================================================================== BUG: KASAN: slab-out-of-bounds in __icmp_send+0x13db/0x1400 net/ipv4/icmp.c:709 Write of size 1 at addr ffff88808878e0b4 by task ksoftirqd/0/9 CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 5.1.0-rc1+ #35 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_store1_noabort+0x17/0x20 mm/kasan/generic_report.c:134 __icmp_send+0x13db/0x1400 net/ipv4/icmp.c:709 icmp_send include/net/icmp.h:47 [inline] __udp4_lib_rcv+0x1fb6/0x2c50 net/ipv4/udp.c:2323 udp_rcv+0x22/0x30 net/ipv4/udp.c:2482 ip_protocol_deliver_rcu+0x60/0x8f0 net/ipv4/ip_input.c:208 ip_local_deliver_finish+0x23b/0x390 net/ipv4/ip_input.c:234 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip_local_deliver+0x1e9/0x520 net/ipv4/ip_input.c:255 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x1e1/0x300 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip_rcv+0xe8/0x3f0 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0x115/0x1a0 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5083 process_backlog+0x206/0x750 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x4fa/0x1070 net/core/dev.c:6412 __do_softirq+0x266/0x95a kernel/softirq.c:293 run_ksoftirqd kernel/softirq.c:655 [inline] run_ksoftirqd+0x8e/0x110 kernel/softirq.c:647 smpboot_thread_fn+0x6ab/0xa10 kernel/smpboot.c:164 kthread+0x357/0x430 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Allocated by task 7716: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:511 kmem_cache_alloc_trace+0x151/0x760 mm/slab.c:3621 kmalloc include/linux/slab.h:545 [inline] kzalloc include/linux/slab.h:740 [inline] mr_table_alloc+0x5b/0x310 net/ipv4/ipmr_base.c:41 ipmr_new_table net/ipv4/ipmr.c:411 [inline] ipmr_new_table+0x11c/0x150 net/ipv4/ipmr.c:399 ipmr_rules_init net/ipv4/ipmr.c:253 [inline] ipmr_net_init+0x138/0x3f0 net/ipv4/ipmr.c:3091 ops_init+0xb6/0x410 net/core/net_namespace.c:129 setup_net+0x2c5/0x730 net/core/net_namespace.c:314 copy_net_ns+0x1d9/0x340 net/core/net_namespace.c:437 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:206 ksys_unshare+0x440/0x980 kernel/fork.c:2549 __do_sys_unshare kernel/fork.c:2617 [inline] __se_sys_unshare kernel/fork.c:2615 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2615 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88808878ed40 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3212 bytes to the left of 4096-byte region [ffff88808878ed40, ffff88808878fd40) The buggy address belongs to the page: page:ffffea000221e380 count:1 mapcount:0 mapping:ffff88812c3f0dc0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000221e588 ffffea0002588908 ffff88812c3f0dc0 raw: 0000000000000000 ffff88808878ed40 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808878df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808878e000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808878e080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808878e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808878e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================