================================================================== BUG: KASAN: use-after-free in __write_once_size include/linux/compiler.h:221 [inline] BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:748 [inline] BUG: KASAN: use-after-free in hlist_del_rcu include/linux/rculist.h:455 [inline] BUG: KASAN: use-after-free in __xfrm_policy_unlink+0x4b1/0x5c0 net/xfrm/xfrm_policy.c:2217 Write of size 8 at addr ffff8880a439c980 by task kworker/u4:11/25563 CPU: 1 PID: 25563 Comm: kworker/u4:11 Not tainted 5.2.0-rc6+ #48 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net 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:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:137 __write_once_size include/linux/compiler.h:221 [inline] __hlist_del include/linux/list.h:748 [inline] hlist_del_rcu include/linux/rculist.h:455 [inline] __xfrm_policy_unlink+0x4b1/0x5c0 net/xfrm/xfrm_policy.c:2217 xfrm_policy_flush+0x331/0x460 net/xfrm/xfrm_policy.c:1794 xfrm_policy_fini+0x49/0x3a0 net/xfrm/xfrm_policy.c:4080 xfrm_net_exit+0x1d/0x70 net/xfrm/xfrm_policy.c:4142 ops_exit_list.isra.0+0xaa/0x150 net/core/net_namespace.c:165 cleanup_net+0x4e2/0xa40 net/core/net_namespace.c:575 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 25802: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 kmem_cache_alloc_trace+0x151/0x750 mm/slab.c:3555 kmalloc include/linux/slab.h:547 [inline] kzalloc include/linux/slab.h:742 [inline] dropmon_net_event+0x285/0x470 net/core/drop_monitor.c:326 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] register_netdevice+0xa4d/0xff0 net/core/dev.c:8762 register_netdev+0x30/0x50 net/core/dev.c:8851 vti6_init_net+0x518/0x820 net/ipv6/ip6_vti.c:1122 ops_init+0xb3/0x410 net/core/net_namespace.c:130 setup_net+0x2cc/0x880 net/core/net_namespace.c:327 copy_net_ns+0x1df/0x340 net/core/net_namespace.c:456 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:103 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:202 ksys_unshare+0x440/0x980 kernel/fork.c:2670 __do_sys_unshare kernel/fork.c:2738 [inline] __se_sys_unshare kernel/fork.c:2736 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2736 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kfree+0xcf/0x220 mm/slab.c:3755 __rcu_reclaim kernel/rcu/rcu.h:215 [inline] rcu_do_batch kernel/rcu/tree.c:2092 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2310 [inline] rcu_core+0xcc7/0x1500 kernel/rcu/tree.c:2291 __do_softirq+0x25c/0x94c kernel/softirq.c:292 The buggy address belongs to the object at ffff8880a439c980 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8880a439c980, ffff8880a439c9c0) The buggy address belongs to the page: page:ffffea000290e700 refcount:1 mapcount:0 mapping:ffff8880aa400340 index:0xffff8880a439c180 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002628548 ffffea0001b48bc8 ffff8880aa400340 raw: ffff8880a439c180 ffff8880a439c000 000000010000001d 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a439c880: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ffff8880a439c900: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff8880a439c980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8880a439ca00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a439ca80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================