================================================================== 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 ffff00001a70d378 by task syz-executor.1/5861 CPU: 1 PID: 5861 Comm: syz-executor.1 Not tainted 5.11.0-rc6-syzkaller-00274-g825b5991a46e #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+0x3cc/0x25fc arch/arm64/kernel/signal.c:936 work_pending+0xc/0x35c Allocated by task 5861: 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+0x1c4/0x5c0 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 18: 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+0x3cc/0x25fc arch/arm64/kernel/signal.c:936 work_pending+0xc/0x35c The buggy address belongs to the object at ffff00001a70d340 which belongs to the cache radix_tree_node of size 576 The buggy address is located 56 bytes inside of 576-byte region [ffff00001a70d340, ffff00001a70d580) The buggy address belongs to the page: page:0000000034d330f6 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5a70c head:0000000034d330f6 order:1 compound_mapcount:0 flags: 0x1ffc00000010200(slab|head) raw: 01ffc00000010200 dead000000000100 dead000000000122 ffff00000cc0ca80 raw: 0000000000000000 00000000800b000b 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff00001a70d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff00001a70d280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff00001a70d300: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ^ ffff00001a70d380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff00001a70d400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================