[ 11.201976][ T66] ================================================================== [ 11.202221][ T66] BUG: KASAN: slab-use-after-free in cleanup_net+0x932/0xa40 [ 11.202414][ T66] Read of size 8 at addr ffff8880050f00f8 by task kworker/u16:1/66 [ 11.202608][ T66] [ 11.202684][ T66] CPU: 2 UID: 0 PID: 66 Comm: kworker/u16:1 Not tainted 6.12.0-virtme #1 [ 11.202887][ T66] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 11.203056][ T66] Workqueue: netns cleanup_net [ 11.203203][ T66] Call Trace: [ 11.203301][ T66] [ 11.203368][ T66] dump_stack_lvl+0x82/0xd0 [ 11.203504][ T66] print_address_description.constprop.0+0x2c/0x3b0 [ 11.203681][ T66] ? cleanup_net+0x932/0xa40 [ 11.203808][ T66] print_report+0xb4/0x270 [ 11.203936][ T66] ? kasan_addr_to_slab+0x25/0x80 [ 11.204067][ T66] kasan_report+0xbd/0xf0 [ 11.204163][ T66] ? cleanup_net+0x932/0xa40 [ 11.204296][ T66] cleanup_net+0x932/0xa40 [ 11.204423][ T66] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 11.204551][ T66] ? __pfx_cleanup_net+0x10/0x10 [ 11.204679][ T66] ? trace_lock_acquire+0x148/0x1f0 [ 11.204807][ T66] ? lock_acquire+0x32/0xc0 [ 11.204939][ T66] ? process_one_work+0xe0b/0x16d0 [ 11.205067][ T66] process_one_work+0xe55/0x16d0 [ 11.205197][ T66] ? __pfx___lock_release+0x10/0x10 [ 11.205337][ T66] ? __pfx_process_one_work+0x10/0x10 [ 11.205469][ T66] ? assign_work+0x16c/0x240 [ 11.205594][ T66] worker_thread+0x58c/0xce0 [ 11.205721][ T66] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 11.205877][ T66] ? __pfx_worker_thread+0x10/0x10 [ 11.206003][ T66] ? __pfx_worker_thread+0x10/0x10 [ 11.206139][ T66] kthread+0x28a/0x350 [ 11.206250][ T66] ? __pfx_kthread+0x10/0x10 [ 11.206380][ T66] ret_from_fork+0x31/0x70 [ 11.206507][ T66] ? __pfx_kthread+0x10/0x10 [ 11.206639][ T66] ret_from_fork_asm+0x1a/0x30 [ 11.206769][ T66] [ 11.206868][ T66] [ 11.206935][ T66] Allocated by task 227: [ 11.207038][ T66] kasan_save_stack+0x24/0x50 [ 11.207188][ T66] kasan_save_track+0x14/0x30 [ 11.207327][ T66] __kasan_slab_alloc+0x59/0x70 [ 11.207457][ T66] kmem_cache_alloc_noprof+0x10b/0x350 [ 11.207589][ T66] copy_net_ns+0xc6/0x340 [ 11.207682][ T66] create_new_namespaces+0x35f/0x920 [ 11.207805][ T66] unshare_nsproxy_namespaces+0x8d/0x130 [ 11.207940][ T66] ksys_unshare+0x2a9/0x660 [ 11.208075][ T66] __x64_sys_unshare+0x31/0x40 [ 11.208203][ T66] do_syscall_64+0xc1/0x1d0 [ 11.208333][ T66] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 11.208490][ T66] [ 11.208555][ T66] Freed by task 66: [ 11.208657][ T66] kasan_save_stack+0x24/0x50 [ 11.208785][ T66] kasan_save_track+0x14/0x30 [ 11.208910][ T66] kasan_save_free_info+0x3b/0x60 [ 11.209032][ T66] __kasan_slab_free+0x38/0x50 [ 11.209161][ T66] kmem_cache_free+0xf8/0x330 [ 11.209295][ T66] cleanup_net+0x5a8/0xa40 [ 11.209420][ T66] process_one_work+0xe55/0x16d0 [ 11.209545][ T66] worker_thread+0x58c/0xce0 [ 11.209666][ T66] kthread+0x28a/0x350 [ 11.209759][ T66] ret_from_fork+0x31/0x70 [ 11.209881][ T66] ret_from_fork_asm+0x1a/0x30 [ 11.210020][ T66] [ 11.210086][ T66] The buggy address belongs to the object at ffff8880050f0040 [ 11.210086][ T66] which belongs to the cache net_namespace of size 5696 [ 11.210422][ T66] The buggy address is located 184 bytes inside of [ 11.210422][ T66] freed 5696-byte region [ffff8880050f0040, ffff8880050f1680) [ 11.210719][ T66] [ 11.210783][ T66] The buggy address belongs to the physical page: [ 11.210934][ T66] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880050f2fc0 pfn:0x50f0 [ 11.211197][ T66] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 11.211413][ T66] flags: 0x80000000000240(workingset|head|node=0|zone=1) [ 11.211589][ T66] page_type: f5(slab) [ 11.211703][ T66] raw: 0080000000000240 ffff88800195f240 ffff888001962088 ffff888001962088 [ 11.211946][ T66] raw: ffff8880050f2fc0 0000000000050002 00000001f5000000 0000000000000000 [ 11.212166][ T66] head: 0080000000000240 ffff88800195f240 ffff888001962088 ffff888001962088 [ 11.212412][ T66] head: ffff8880050f2fc0 0000000000050002 00000001f5000000 0000000000000000 [ 11.212628][ T66] head: 0080000000000003 ffffea0000143c01 ffffffffffffffff 0000000000000000 [ 11.212846][ T66] head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 [ 11.213064][ T66] page dumped because: kasan: bad access detected [ 11.213226][ T66] [ 11.213292][ T66] Memory state around the buggy address: [ 11.213411][ T66] ffff8880050eff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.213599][ T66] ffff8880050f0000: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 11.213782][ T66] >ffff8880050f0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.213971][ T66] ^ [ 11.214162][ T66] ffff8880050f0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.214337][ T66] ffff8880050f0180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.214514][ T66] ================================================================== [ 11.214776][ T66] Disabling lock debugging due to kernel taint