==================================================================
BUG: KASAN: use-after-free in io_wq_worker_running+0x114/0x130
Read of size 4 at addr ffff88801d720804 by task iou-wrk-17053/17109

CPU: 0 PID: 17109 Comm: iou-wrk-17053 Not tainted 6.1.0-syzkaller-09960-g12521a5d5cb7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 dump_stack_lvl+0x100/0x178
 print_report+0x167/0x46c
 kasan_report+0xbf/0x1e0
 io_wq_worker_running+0x114/0x130
 schedule_preempt_disabled+0x13/0x20
 __mutex_lock+0x914/0x12e0
 io_wq_submit_work+0x5f0/0xd80
 io_worker_handle_work+0x6d4/0x19b0
 io_wqe_worker+0x675/0xe50
 ret_from_fork+0x1f/0x30
 </TASK>

Allocated by task 17053:
 kasan_save_stack+0x20/0x40
 kasan_set_track+0x25/0x30
 __kasan_kmalloc+0xa5/0xb0
 create_io_worker+0x109/0x630
 io_wqe_enqueue+0x6d0/0xbe0
 io_queue_iowq+0x282/0x5b0
 io_queue_sqe_fallback+0xf7/0x190
 io_submit_sqes+0x11df/0x1f90
 __do_sys_io_uring_enter+0xc80/0x2540
 do_syscall_64+0x38/0xb0
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Freed by task 17109:
 kasan_save_stack+0x20/0x40
 kasan_set_track+0x25/0x30
 kasan_save_free_info+0x2e/0x40
 ____kasan_slab_free+0x15e/0x1b0
 slab_free_freelist_hook+0x10b/0x1e0
 __kmem_cache_free+0xaf/0x3c0
 io_queue_worker_create+0x53d/0x640
 io_wqe_dec_running+0x1e5/0x240
 io_wq_worker_sleeping+0xa6/0xc0
 schedule+0x178/0x1c0
 schedule_preempt_disabled+0x13/0x20
 __mutex_lock+0x914/0x12e0
 io_wq_submit_work+0x5f0/0xd80
 io_worker_handle_work+0x6d4/0x19b0
 io_wqe_worker+0x675/0xe50
 ret_from_fork+0x1f/0x30

Last potentially related work creation:
 kasan_save_stack+0x20/0x40
 __kasan_record_aux_stack+0xbf/0xd0
 task_work_add+0x7f/0x290
 io_queue_worker_create+0x3fd/0x640
 io_wqe_dec_running+0x1e5/0x240
 io_wq_worker_sleeping+0xa6/0xc0
 schedule+0x178/0x1c0
 schedule_preempt_disabled+0x13/0x20
 __mutex_lock+0x914/0x12e0
 io_wq_submit_work+0x5f0/0xd80
 io_worker_handle_work+0x6d4/0x19b0
 io_wqe_worker+0x675/0xe50
 ret_from_fork+0x1f/0x30

The buggy address belongs to the object at ffff88801d720800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 4 bytes inside of
 512-byte region [ffff88801d720800, ffff88801d720a00)

The buggy address belongs to the physical page:
page:ffffea000075c800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d720
head:ffffea000075c800 order:2 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0
anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffff888012441c80 0000000000000000 0000000000000001
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 8843, tgid 8800 (syz-executor.7), ts 81242339850, free_ts 79371908689
 get_page_from_freelist+0x10aa/0x2d40
 __alloc_pages+0x1c8/0x5c0
 allocate_slab+0xa1/0x340
 ___slab_alloc+0x89a/0x1400
 __slab_alloc.constprop.0+0x56/0xa0
 __kmem_cache_alloc_node+0x128/0x430
 kmalloc_node_trace+0x22/0x60
 create_io_worker+0x109/0x630
 io_wqe_enqueue+0x6d0/0xbe0
 io_queue_iowq+0x282/0x5b0
 io_queue_sqe_fallback+0xf7/0x190
 io_submit_sqes+0x11df/0x1f90
 __do_sys_io_uring_enter+0xc80/0x2540
 do_syscall_64+0x38/0xb0
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
page last free stack trace:
 free_pcp_prepare+0x44c/0x9a0
 free_unref_page+0x1c/0x4d0
 __unfreeze_partials+0x18d/0x1b0
 qlist_free_all+0x6a/0x170
 kasan_quarantine_reduce+0x188/0x1d0
 __kasan_slab_alloc+0x68/0x90
 kmem_cache_alloc+0x15b/0x400
 getname_flags.part.0+0x50/0x4d0
 getname+0x90/0xe0
 do_sys_openat2+0xf5/0x4c0
 __x64_sys_openat+0x175/0x210
 do_syscall_64+0x38/0xb0
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Memory state around the buggy address:
 ffff88801d720700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88801d720780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88801d720800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88801d720880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88801d720900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
