==================================================================
BUG: KASAN: use-after-free in radix_tree_next_slot include/linux/radix-tree.h:422 [inline]
BUG: KASAN: use-after-free in idr_for_each+0x1a8/0x1c4 lib/idr.c:202
Read of size 8 at addr ffff0000311b02f8 by task syz-executor.1/12161

CPU: 0 PID: 12161 Comm: syz-executor.1 Not tainted 5.11.0-rc7-syzkaller-00090-gdcc0b49040c7 #0
Hardware name: linux,dummy-virt (DT)
Call trace:
 dump_backtrace+0x0/0x3e0 arch/arm64/include/asm/pointer_auth.h:76
 show_stack+0x18/0x70 arch/arm64/kernel/stacktrace.c:196
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x110/0x188 lib/dump_stack.c:120
 print_address_description.constprop.0+0x2c/0x300 mm/kasan/report.c:230
 __kasan_report mm/kasan/report.c:396 [inline]
 kasan_report+0x1e8/0x200 mm/kasan/report.c:413
 __asan_report_load8_noabort+0x34/0x60 mm/kasan/report_generic.c:309
 radix_tree_next_slot include/linux/radix-tree.h:422 [inline]
 idr_for_each+0x1a8/0x1c4 lib/idr.c:202
 io_ring_ctx_wait_and_kill+0x16c/0x4d0 fs/io_uring.c:8798
 io_uring_release+0x34/0x54 fs/io_uring.c:8823
 __fput+0x1a0/0x6b0 fs/file_table.c:280
 ____fput+0x10/0x20 fs/file_table.c:313
 task_work_run+0xd4/0x20c kernel/task_work.c:140
 exit_task_work include/linux/task_work.h:30 [inline]
 do_exit+0x940/0x2330 kernel/exit.c:825
 do_group_exit+0xcc/0x23c kernel/exit.c:922
 get_signal+0x354/0x1924 kernel/signal.c:2773
 do_signal arch/arm64/kernel/signal.c:882 [inline]
 do_notify_resume+0x2b8/0x25fc arch/arm64/kernel/signal.c:936
 work_pending+0xc/0x35c

Allocated by task 12161:
 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:121
 kasan_save_stack+0x28/0x5c mm/kasan/common.c:38
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:401 [inline]
 ____kasan_kmalloc.constprop.0+0x8c/0xb4 mm/kasan/common.c:429
 __kasan_slab_alloc+0x18/0x2c mm/kasan/common.c:437
 kasan_slab_alloc include/linux/kasan.h:209 [inline]
 slab_post_alloc_hook mm/slab.h:512 [inline]
 slab_alloc_node mm/slub.c:2892 [inline]
 slab_alloc mm/slub.c:2900 [inline]
 kmem_cache_alloc+0x1cc/0x5c4 mm/slub.c:2905
 radix_tree_node_alloc.constprop.0+0xec/0x3a0 lib/radix-tree.c:274
 idr_get_free+0x2e8/0x910 lib/radix-tree.c:1504
 idr_alloc_u32+0x120/0x280 lib/idr.c:46
 idr_alloc_cyclic+0xe8/0x1b4 lib/idr.c:125
 io_register_personality fs/io_uring.c:9870 [inline]
 __io_uring_register fs/io_uring.c:10099 [inline]
 __do_sys_io_uring_register fs/io_uring.c:10149 [inline]
 __se_sys_io_uring_register fs/io_uring.c:10131 [inline]
 __arm64_sys_io_uring_register+0x780/0x3de0 fs/io_uring.c:10131
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:49 [inline]
 el0_svc_common.constprop.0+0x110/0x3c0 arch/arm64/kernel/syscall.c:159
 do_el0_svc_compat+0x40/0x80 arch/arm64/kernel/syscall.c:204
 el0_svc_compat+0x20/0x30 arch/arm64/kernel/entry-common.c:442
 el0_sync_compat_handler+0x90/0x140 arch/arm64/kernel/entry-common.c:451
 el0_sync_compat+0x178/0x180 arch/arm64/kernel/entry.S:708

Freed by task 9153:
 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:121
 kasan_save_stack+0x28/0x5c mm/kasan/common.c:38
 kasan_set_track+0x28/0x40 mm/kasan/common.c:46
 kasan_set_free_info+0x28/0x50 mm/kasan/generic.c:356
 ____kasan_slab_free+0xf0/0x154 mm/kasan/common.c:362
 __kasan_slab_free+0x14/0x20 mm/kasan/common.c:369
 kasan_slab_free include/linux/kasan.h:192 [inline]
 slab_free_hook mm/slub.c:1547 [inline]
 slab_free_freelist_hook+0x8c/0x240 mm/slub.c:1580
 slab_free mm/slub.c:3143 [inline]
 kmem_cache_free+0xc4/0x5ac mm/slub.c:3159
 radix_tree_node_rcu_free+0x78/0xb0 lib/radix-tree.c:302
 rcu_do_batch kernel/rcu/tree.c:2489 [inline]
 rcu_core+0x860/0xe10 kernel/rcu/tree.c:2723
 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2736
 _stext+0x400/0x10cc

Last potentially related work creation:
 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:121
 kasan_save_stack+0x28/0x5c mm/kasan/common.c:38
 kasan_record_aux_stack+0xf8/0x130 mm/kasan/generic.c:344
 __call_rcu kernel/rcu/tree.c:2965 [inline]
 call_rcu+0xf4/0x5f0 kernel/rcu/tree.c:3038
 radix_tree_node_free lib/radix-tree.c:308 [inline]
 delete_node+0x300/0x510 lib/radix-tree.c:571
 __radix_tree_delete+0x134/0x3dc lib/radix-tree.c:1377
 radix_tree_delete_item+0xbc/0x1bc lib/radix-tree.c:1428
 idr_remove+0x4c/0x6c lib/idr.c:154
 io_remove_personalities+0x18/0x154 fs/io_uring.c:8743
 idr_for_each+0xec/0x1c4 lib/idr.c:208
 io_ring_ctx_wait_and_kill+0x16c/0x4d0 fs/io_uring.c:8798
 io_uring_release+0x34/0x54 fs/io_uring.c:8823
 __fput+0x1a0/0x6b0 fs/file_table.c:280
 ____fput+0x10/0x20 fs/file_table.c:313
 task_work_run+0xd4/0x20c kernel/task_work.c:140
 exit_task_work include/linux/task_work.h:30 [inline]
 do_exit+0x940/0x2330 kernel/exit.c:825
 do_group_exit+0xcc/0x23c kernel/exit.c:922
 get_signal+0x354/0x1924 kernel/signal.c:2773
 do_signal arch/arm64/kernel/signal.c:882 [inline]
 do_notify_resume+0x2b8/0x25fc arch/arm64/kernel/signal.c:936
 work_pending+0xc/0x35c

Second to last potentially related work creation:
 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:121
 kasan_save_stack+0x28/0x5c mm/kasan/common.c:38
 kasan_record_aux_stack+0xf8/0x130 mm/kasan/generic.c:344
 __call_rcu kernel/rcu/tree.c:2965 [inline]
 call_rcu+0xf4/0x5f0 kernel/rcu/tree.c:3038
 xa_node_free lib/xarray.c:258 [inline]
 xas_delete_node lib/xarray.c:494 [inline]
 update_node lib/xarray.c:756 [inline]
 xas_store+0x66c/0x1280 lib/xarray.c:841
 page_cache_delete+0x1b8/0x550 mm/filemap.c:138
 __delete_from_page_cache mm/filemap.c:239 [inline]
 delete_from_page_cache+0xe8/0x1a0 mm/filemap.c:274
 truncate_inode_page+0x70/0xbc mm/truncate.c:228
 shmem_undo_range+0x540/0xecc mm/shmem.c:949
 shmem_truncate_range mm/shmem.c:1058 [inline]
 shmem_evict_inode+0x2d8/0x830 mm/shmem.c:1158
 evict+0x1fc/0x4c0 fs/inode.c:577
 iput_final fs/inode.c:1653 [inline]
 iput fs/inode.c:1679 [inline]
 iput+0x44c/0x7b4 fs/inode.c:1665
 dentry_unlink_inode+0x21c/0x404 fs/dcache.c:374
 __dentry_kill+0x298/0x560 fs/dcache.c:579
 dentry_kill fs/dcache.c:705 [inline]
 dput+0x44c/0x870 fs/dcache.c:885
 __fput+0x240/0x6b0 fs/file_table.c:293
 ____fput+0x10/0x20 fs/file_table.c:313
 task_work_run+0xd4/0x20c kernel/task_work.c:140
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 do_notify_resume+0x12e4/0x25fc arch/arm64/kernel/signal.c:939
 work_pending+0xc/0x35c

The buggy address belongs to the object at ffff0000311b02c0
 which belongs to the cache radix_tree_node of size 576
The buggy address is located 56 bytes inside of
 576-byte region [ffff0000311b02c0, ffff0000311b0500)
The buggy address belongs to the page:
page:000000000f7bfa64 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x711b0
head:000000000f7bfa64 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x1ffc00000010200(slab|head)
raw: 01ffc00000010200 fffffc0000697900 0000000400000004 ffff00000cc0c900
raw: 0000000000000000 0000000080170017 00000001ffffffff ffff000018062e01
page dumped because: kasan: bad access detected
pages's memcg:ffff000018062e01

Memory state around the buggy address:
 ffff0000311b0180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff0000311b0200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff0000311b0280: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
                                                                ^
 ffff0000311b0300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff0000311b0380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================