================================================================== BUG: KASAN: slab-use-after-free in radix_tree_descend lib/radix-tree.c:88 [inline] BUG: KASAN: slab-use-after-free in radix_tree_next_chunk+0x987/0xb20 lib/radix-tree.c:1195 Read of size 1 at addr ffff888057233c80 by task syz.6.4886/24508 CPU: 1 UID: 0 PID: 24508 Comm: syz.6.4886 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 radix_tree_descend lib/radix-tree.c:88 [inline] radix_tree_next_chunk+0x987/0xb20 lib/radix-tree.c:1195 idr_get_next_ul+0x227/0x2e0 lib/idr.c:236 idr_get_next+0x9b/0x150 lib/idr.c:267 afs_dynroot_readdir_cells fs/afs/dynroot.c:293 [inline] afs_dynroot_readdir+0x72b/0xb70 fs/afs/dynroot.c:352 iterate_dir+0x296/0xaf0 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:410 [inline] __se_sys_getdents64 fs/readdir.c:396 [inline] __x64_sys_getdents64+0x13c/0x2c0 fs/readdir.c:396 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7feb1ef8eec9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007feb1fdca038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007feb1f1e5fa0 RCX: 00007feb1ef8eec9 RDX: 0000000000000055 RSI: 00002000000007c0 RDI: 0000000000000003 RBP: 00007feb1f011f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007feb1f1e6038 R14: 00007feb1f1e5fa0 R15: 00007ffec7a7e5c8 Allocated by task 24508: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:342 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:368 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4946 [inline] slab_alloc_node mm/slub.c:5245 [inline] kmem_cache_alloc_noprof+0x250/0x6e0 mm/slub.c:5252 radix_tree_node_alloc.constprop.0+0x7c/0x350 lib/radix-tree.c:276 idr_get_free+0x528/0xa30 lib/radix-tree.c:1506 idr_alloc_u32+0x190/0x2f0 lib/idr.c:46 idr_alloc_cyclic+0x10b/0x230 lib/idr.c:125 afs_alloc_cell fs/afs/cell.c:203 [inline] afs_lookup_cell+0xe68/0x1680 fs/afs/cell.c:265 afs_dynroot_lookup_cell fs/afs/dynroot.c:111 [inline] afs_dynroot_lookup+0x2e2/0xa90 fs/afs/dynroot.c:159 __lookup_slow+0x251/0x460 fs/namei.c:1816 lookup_slow fs/namei.c:1833 [inline] walk_component+0x353/0x5b0 fs/namei.c:2151 lookup_last fs/namei.c:2652 [inline] path_lookupat+0x142/0x6d0 fs/namei.c:2676 filename_lookup+0x224/0x5f0 fs/namei.c:2705 do_linkat+0x14c/0x5a0 fs/namei.c:4991 __do_sys_link fs/namei.c:5045 [inline] __se_sys_link fs/namei.c:5043 [inline] __x64_sys_link+0x7d/0xa0 fs/namei.c:5043 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 24481: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 __kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2514 [inline] slab_free mm/slub.c:6566 [inline] kmem_cache_free+0x2d4/0x6c0 mm/slub.c:6676 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x799/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:559 __call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3123 radix_tree_node_free lib/radix-tree.c:310 [inline] delete_node+0x1fc/0x8d0 lib/radix-tree.c:573 __radix_tree_delete+0x193/0x3d0 lib/radix-tree.c:1379 radix_tree_delete_item+0xea/0x230 lib/radix-tree.c:1430 afs_cell_destroy+0x1db/0x310 fs/afs/cell.c:523 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x799/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 The buggy address belongs to the object at ffff888057233c80 which belongs to the cache radix_tree_node of size 576 The buggy address is located 0 bytes inside of freed 576-byte region [ffff888057233c80, ffff888057233ec0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57230 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88802934dd01 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b071000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080170017 00000000f5000000 ffff88802934dd01 head: 00fff00000000040 ffff88801b071000 dead000000000100 dead000000000122 head: 0000000000000000 0000000080170017 00000000f5000000 ffff88802934dd01 head: 00fff00000000002 ffffea00015c8c01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Reclaimable, gfp_mask 0x52810(GFP_NOWAIT|__GFP_RECLAIMABLE|__GFP_NORETRY|__GFP_COMP), pid 6251, tgid 6250 (syz.0.68), ts 98070770466, free_ts 15564256623 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x10a3/0x3a30 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x25f/0x2470 mm/page_alloc.c:5183 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3030 [inline] allocate_slab mm/slub.c:3203 [inline] new_slab+0x24a/0x360 mm/slub.c:3257 ___slab_alloc+0xdc4/0x1ae0 mm/slub.c:4627 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4746 __slab_alloc_node mm/slub.c:4822 [inline] slab_alloc_node mm/slub.c:5233 [inline] kmem_cache_alloc_lru_noprof+0x443/0x6e0 mm/slub.c:5264 xas_alloc+0x34f/0x460 lib/xarray.c:378 xas_create+0x72b/0x1460 lib/xarray.c:685 xas_store+0x90/0x1910 lib/xarray.c:795 shmem_add_to_page_cache+0x7b3/0xa70 mm/shmem.c:905 shmem_alloc_and_add_folio+0x668/0xc20 mm/shmem.c:1936 shmem_get_folio_gfp+0x67f/0x1610 mm/shmem.c:2533 shmem_fault+0x1fe/0xa30 mm/shmem.c:2734 __do_fault+0x10d/0x490 mm/memory.c:5280 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0x7df/0x1160 mm/page_alloc.c:2906 __free_pages mm/page_alloc.c:5302 [inline] free_contig_range+0x183/0x4b0 mm/page_alloc.c:7146 destroy_args+0xb69/0x12e0 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x1a32/0x3640 mm/debug_vm_pgtable.c:1345 do_one_initcall+0x120/0x6e0 init/main.c:1283 do_initcall_level init/main.c:1345 [inline] do_initcalls init/main.c:1361 [inline] do_basic_setup init/main.c:1380 [inline] kernel_init_freeable+0x5c2/0x910 init/main.c:1593 kernel_init+0x1c/0x2b0 init/main.c:1483 ret_from_fork+0x56a/0x730 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888057233b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888057233c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888057233c80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888057233d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888057233d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================