team0 (unregistering): Port device team_slave_0 removed bond0 (unregistering): Releasing backup interface bond_slave_1 bond0 (unregistering): Releasing backup interface bond_slave_0 bond0 (unregistering): Released all slaves ================================================================== BUG: KASAN: use-after-free in __write_once_size include/linux/compiler.h:220 [inline] BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:702 [inline] BUG: KASAN: use-after-free in hlist_del_init include/linux/list.h:717 [inline] BUG: KASAN: use-after-free in __xfrm_policy_unlink+0x977/0xa00 net/xfrm/xfrm_policy.c:2213 Write of size 8 at addr ffff8880871655e8 by task kworker/u4:10/13025 CPU: 1 PID: 13025 Comm: kworker/u4:10 Not tainted 5.0.0-rc3+ #24 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+0x1db/0x2d0 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_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:140 __write_once_size include/linux/compiler.h:220 [inline] __hlist_del include/linux/list.h:702 [inline] hlist_del_init include/linux/list.h:717 [inline] __xfrm_policy_unlink+0x977/0xa00 net/xfrm/xfrm_policy.c:2213 xfrm_policy_flush+0x331/0x460 net/xfrm/xfrm_policy.c:1789 xfrm_policy_fini+0xbf/0x640 net/xfrm/xfrm_policy.c:3866 xfrm_net_exit+0x1d/0x70 net/xfrm/xfrm_policy.c:3928 ops_exit_list.isra.0+0xb0/0x160 net/core/net_namespace.c:153 cleanup_net+0x51d/0xb10 net/core/net_namespace.c:551 process_one_work+0xd0c/0x1ce0 kernel/workqueue.c:2153 worker_thread+0x143/0x14a0 kernel/workqueue.c:2296 kthread+0x357/0x430 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Allocated by task 780: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:496 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:504 __do_kmalloc mm/slab.c:3711 [inline] __kmalloc+0x15c/0x740 mm/slab.c:3720 kmalloc include/linux/slab.h:550 [inline] sock_kmalloc net/core/sock.c:2017 [inline] sock_kmalloc+0x166/0x200 net/core/sock.c:2008 af_alg_alloc_areq+0x7c/0x300 crypto/af_alg.c:1097 _aead_recvmsg crypto/algif_aead.c:157 [inline] aead_recvmsg+0x49d/0x1b40 crypto/algif_aead.c:334 sock_recvmsg_nosec net/socket.c:794 [inline] sock_recvmsg net/socket.c:801 [inline] sock_recvmsg+0xd0/0x110 net/socket.c:797 sock_read_iter+0x3ba/0x5a0 net/socket.c:878 call_read_iter include/linux/fs.h:1856 [inline] do_iter_readv_writev+0x799/0xbc0 fs/read_write.c:678 do_iter_read+0x27c/0x660 fs/read_write.c:919 vfs_readv+0x175/0x1c0 fs/read_write.c:983 do_readv+0x11a/0x300 fs/read_write.c:1016 __do_sys_readv fs/read_write.c:1103 [inline] __se_sys_readv fs/read_write.c:1100 [inline] __x64_sys_readv+0x75/0xb0 fs/read_write.c:1100 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 780: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:458 kasan_slab_free+0xe/0x10 mm/kasan/common.c:466 __cache_free mm/slab.c:3487 [inline] kfree+0xcf/0x230 mm/slab.c:3806 __sock_kfree_s net/core/sock.c:2038 [inline] sock_kfree_s+0x29/0x70 net/core/sock.c:2044 af_alg_free_resources+0x71/0x90 crypto/af_alg.c:1033 _aead_recvmsg crypto/algif_aead.c:321 [inline] aead_recvmsg+0x979/0x1b40 crypto/algif_aead.c:334 sock_recvmsg_nosec net/socket.c:794 [inline] sock_recvmsg net/socket.c:801 [inline] sock_recvmsg+0xd0/0x110 net/socket.c:797 sock_read_iter+0x3ba/0x5a0 net/socket.c:878 call_read_iter include/linux/fs.h:1856 [inline] do_iter_readv_writev+0x799/0xbc0 fs/read_write.c:678 do_iter_read+0x27c/0x660 fs/read_write.c:919 vfs_readv+0x175/0x1c0 fs/read_write.c:983 do_readv+0x11a/0x300 fs/read_write.c:1016 __do_sys_readv fs/read_write.c:1103 [inline] __se_sys_readv fs/read_write.c:1100 [inline] __x64_sys_readv+0x75/0xb0 fs/read_write.c:1100 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888087165240 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 936 bytes inside of 1024-byte region [ffff888087165240, ffff888087165640) The buggy address belongs to the page: page:ffffea00021c5900 count:1 mapcount:0 mapping:ffff88812c3f0ac0 index:0xffff8880871656c0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002553d08 ffffea00025a0688 ffff88812c3f0ac0 raw: ffff8880871656c0 ffff888087164040 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888087165480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888087165500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888087165580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888087165600: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888087165680: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================