[ 11.367351][ T279] ip (279) used greatest stack depth: 24152 bytes left [ 16.186706][ T11] ================================================================== [ 16.186937][ T11] BUG: KASAN: slab-use-after-free in cleanup_net+0xa5d/0xb90 [ 16.187130][ T11] Read of size 8 at addr ffff8880051000f8 by task kworker/u16:0/11 [ 16.187308][ T11] [ 16.187372][ T11] CPU: 0 UID: 0 PID: 11 Comm: kworker/u16:0 Not tainted 6.12.0-virtme #1 [ 16.187571][ T11] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 16.187726][ T11] Workqueue: netns cleanup_net [ 16.187856][ T11] Call Trace: [ 16.187953][ T11] [ 16.188019][ T11] dump_stack_lvl+0x82/0xd0 [ 16.188152][ T11] print_address_description.constprop.0+0x2c/0x3b0 [ 16.188312][ T11] ? cleanup_net+0xa5d/0xb90 [ 16.188439][ T11] print_report+0xb4/0x270 [ 16.188561][ T11] ? kasan_addr_to_slab+0x25/0x80 [ 16.188685][ T11] kasan_report+0xbd/0xf0 [ 16.188789][ T11] ? cleanup_net+0xa5d/0xb90 [ 16.188915][ T11] cleanup_net+0xa5d/0xb90 [ 16.189039][ T11] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 16.189165][ T11] ? __pfx_cleanup_net+0x10/0x10 [ 16.189289][ T11] ? trace_lock_acquire+0x148/0x1f0 [ 16.189417][ T11] ? lock_acquire+0x32/0xc0 [ 16.189540][ T11] ? process_one_work+0xe0b/0x16d0 [ 16.189669][ T11] process_one_work+0xe55/0x16d0 [ 16.189794][ T11] ? __pfx___lock_release+0x10/0x10 [ 16.189918][ T11] ? __pfx_process_one_work+0x10/0x10 [ 16.190044][ T11] ? assign_work+0x16c/0x240 [ 16.190171][ T11] worker_thread+0x58c/0xce0 [ 16.190298][ T11] ? __pfx_worker_thread+0x10/0x10 [ 16.190423][ T11] kthread+0x28a/0x350 [ 16.190519][ T11] ? __pfx_kthread+0x10/0x10 [ 16.190646][ T11] ret_from_fork+0x31/0x70 [ 16.190776][ T11] ? __pfx_kthread+0x10/0x10 [ 16.190900][ T11] ret_from_fork_asm+0x1a/0x30 [ 16.191032][ T11] [ 16.191123][ T11] [ 16.191193][ T11] Allocated by task 274: [ 16.191291][ T11] kasan_save_stack+0x24/0x50 [ 16.191423][ T11] kasan_save_track+0x14/0x30 [ 16.191548][ T11] __kasan_slab_alloc+0x59/0x70 [ 16.191680][ T11] kmem_cache_alloc_noprof+0x10b/0x350 [ 16.191806][ T11] copy_net_ns+0xc6/0x540 [ 16.191898][ T11] create_new_namespaces+0x35f/0x920 [ 16.192025][ T11] unshare_nsproxy_namespaces+0x8a/0x1b0 [ 16.192149][ T11] ksys_unshare+0x2c4/0x6e0 [ 16.192277][ T11] __x64_sys_unshare+0x31/0x40 [ 16.192403][ T11] do_syscall_64+0xc1/0x1d0 [ 16.192530][ T11] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 16.192688][ T11] [ 16.192752][ T11] Freed by task 11: [ 16.192844][ T11] kasan_save_stack+0x24/0x50 [ 16.192969][ T11] kasan_save_track+0x14/0x30 [ 16.193091][ T11] kasan_save_free_info+0x3b/0x60 [ 16.193213][ T11] __kasan_slab_free+0x38/0x50 [ 16.193336][ T11] kmem_cache_free+0xf8/0x330 [ 16.193461][ T11] cleanup_net+0x5a8/0xb90 [ 16.193585][ T11] process_one_work+0xe55/0x16d0 [ 16.193708][ T11] worker_thread+0x58c/0xce0 [ 16.193833][ T11] kthread+0x28a/0x350 [ 16.193930][ T11] ret_from_fork+0x31/0x70 [ 16.194055][ T11] ret_from_fork_asm+0x1a/0x30 [ 16.194179][ T11] [ 16.194244][ T11] Last potentially related work creation: [ 16.194369][ T11] kasan_save_stack+0x24/0x50 [ 16.194499][ T11] __kasan_record_aux_stack+0x8e/0xa0 [ 16.194624][ T11] insert_work+0x34/0x230 [ 16.194718][ T11] __queue_work+0x5fd/0xa40 [ 16.194844][ T11] queue_delayed_work_on+0x8c/0xa0 [ 16.194970][ T11] __inet_insert_ifa+0x751/0xb10 [ 16.195099][ T11] inetdev_event+0xb18/0xcf0 [ 16.195225][ T11] notifier_call_chain+0xcd/0x150 [ 16.195350][ T11] __dev_notify_flags+0xe6/0x250 [ 16.195475][ T11] dev_change_flags+0xec/0x160 [ 16.195600][ T11] do_setlink.constprop.0+0x79d/0x2300 [ 16.195730][ T11] rtnl_newlink+0x6de/0xa80 [ 16.195856][ T11] rtnetlink_rcv_msg+0x712/0xc10 [ 16.195980][ T11] netlink_rcv_skb+0x130/0x360 [ 16.196111][ T11] netlink_unicast+0x44b/0x710 [ 16.196237][ T11] netlink_sendmsg+0x723/0xbe0 [ 16.196363][ T11] ____sys_sendmsg+0x7ac/0xa10 [ 16.196489][ T11] ___sys_sendmsg+0xee/0x170 [ 16.196615][ T11] __sys_sendmsg+0x109/0x1a0 [ 16.196748][ T11] do_syscall_64+0xc1/0x1d0 [ 16.196873][ T11] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 16.197032][ T11] [ 16.197098][ T11] The buggy address belongs to the object at ffff888005100040 [ 16.197098][ T11] which belongs to the cache net_namespace of size 6528 [ 16.197424][ T11] The buggy address is located 184 bytes inside of [ 16.197424][ T11] freed 6528-byte region [ffff888005100040, ffff8880051019c0) [ 16.197738][ T11] [ 16.197803][ T11] The buggy address belongs to the physical page: [ 16.197953][ T11] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888005103640 pfn:0x5100 [ 16.198203][ T11] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 16.198391][ T11] flags: 0x80000000000240(workingset|head|node=0|zone=1) [ 16.198548][ T11] page_type: f5(slab) [ 16.198648][ T11] raw: 0080000000000240 ffff888001975240 ffff88800197a088 ffff88800197a088 [ 16.198867][ T11] raw: ffff888005103640 0000000000040002 00000001f5000000 0000000000000000 [ 16.199083][ T11] head: 0080000000000240 ffff888001975240 ffff88800197a088 ffff88800197a088 [ 16.199301][ T11] head: ffff888005103640 0000000000040002 00000001f5000000 0000000000000000 [ 16.199533][ T11] head: 0080000000000003 ffffea0000144001 ffffffffffffffff 0000000000000000 [ 16.199748][ T11] head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 [ 16.199971][ T11] page dumped because: kasan: bad access detected [ 16.200125][ T11] [ 16.200190][ T11] Memory state around the buggy address: [ 16.200311][ T11] ffff8880050fff80: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.200500][ T11] ffff888005100000: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 16.200674][ T11] >ffff888005100080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.200859][ T11] ^ [ 16.201053][ T11] ffff888005100100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.201241][ T11] ffff888005100180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.201423][ T11] ================================================================== [ 16.201619][ T11] Disabling lock debugging due to kernel taint [ 57.202070][ T1345] br0: port 1(vx10) entered blocking state [ 57.202301][ T1345] br0: port 1(vx10) entered disabled state [ 57.202526][ T1345] vx10: entered allmulticast mode [ 57.203472][ T1345] vx10: entered promiscuous mode [ 58.117939][ T1372] vx10: left allmulticast mode [ 58.118197][ T1372] vx10: left promiscuous mode [ 58.118700][ T1372] br0: port 1(vx10) entered disabled state