syzbot


KASAN: slab-use-after-free Read in shrink_dcache_tree

Status: upstream: reported on 2026/06/17 17:08
Subsystems: fs
Labels: prio:high actionable
[Documentation on labels]
Reported-by: syzbot+000c800a02097aaa10ed@syzkaller.appspotmail.com
First crash: 6d04h, last: 23h53m
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
07cc94e7-aaf2-4f31-b4c2-53a9263d0c7b moderation Actionable: ✅ KASAN: slab-use-after-free Read in shrink_dcache_tree 2026/06/17 15:05 2026/06/17 16:58 2026/06/17 17:07 b62b3ded1759f79b37600c5ffe2b0a81b919b0b0

			
		
983c5dd6-156a-4d3a-9cb2-3b4f51c008d9 assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ KASAN: slab-use-after-free Read in shrink_dcache_tree 2026/06/15 00:05 2026/06/15 00:05 2026/06/15 00:33 4f06757f683a802254a4c8edbfe67ff801904c5e

			
		
Discussions (2)
Title Replies (including bot) Last reply
[PATCH V2] locking/rt: Fix the incorrect RCU protection in rt_spin_unlock() 2 (2) 2026/06/19 12:58
[syzbot] [fs?] KASAN: slab-use-after-free Read in shrink_dcache_tree 7 (8) 2026/06/19 12:46

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:132 [inline]
BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x40/0x60 kernel/locking/spinlock.c:166
Read of size 1 at addr ffff88803fe3ae90 by task kdevtmpfs/34

CPU: 1 UID: 0 PID: 34 Comm: kdevtmpfs Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 __kasan_check_byte+0x2a/0x40 mm/kasan/common.c:574
 kasan_check_byte include/linux/kasan.h:402 [inline]
 lock_acquire+0x84/0x350 kernel/locking/lockdep.c:5844
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:132 [inline]
 _raw_spin_lock_irqsave+0x40/0x60 kernel/locking/spinlock.c:166
 rt_mutex_slowunlock+0xbf/0x8b0 kernel/locking/rtmutex.c:1430
 spin_unlock include/linux/spinlock_rt.h:109 [inline]
 shrink_dcache_tree+0x30e/0x410 fs/dcache.c:1754
 vfs_rmdir+0x43c/0x6f0 fs/namei.c:5381
 dev_rmdir drivers/base/devtmpfs.c:262 [inline]
 delete_path drivers/base/devtmpfs.c:287 [inline]
 handle_remove drivers/base/devtmpfs.c:352 [inline]
 handle drivers/base/devtmpfs.c:386 [inline]
 devtmpfs_work_loop+0xb7e/0xdf0 drivers/base/devtmpfs.c:399
 devtmpfsd+0x4d/0x50 drivers/base/devtmpfs.c:441
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Allocated by task 34:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 unpoison_slab_object mm/kasan/common.c:340 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4614 [inline]
 slab_alloc_node mm/slub.c:4941 [inline]
 kmem_cache_alloc_lru_noprof+0x354/0x6b0 mm/slub.c:4974
 __d_alloc+0x37/0x6f0 fs/dcache.c:1902
 d_alloc+0x4b/0x190 fs/dcache.c:1981
 lookup_one_qstr_excl+0xd8/0x360 fs/namei.c:1806
 __start_dirop fs/namei.c:2920 [inline]
 start_dirop fs/namei.c:2942 [inline]
 filename_create+0x20e/0x370 fs/namei.c:4951
 start_creating_path+0x39/0x150 fs/namei.c:4974
 handle_create drivers/base/devtmpfs.c:227 [inline]
 handle drivers/base/devtmpfs.c:384 [inline]
 devtmpfs_work_loop+0x7d7/0xdf0 drivers/base/devtmpfs.c:399
 devtmpfsd+0x4d/0x50 drivers/base/devtmpfs.c:441
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Freed by task 21:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2699 [inline]
 slab_free mm/slub.c:6400 [inline]
 kmem_cache_free+0x187/0x6c0 mm/slub.c:6527
 rcu_do_batch kernel/rcu/tree.c:2645 [inline]
 rcu_core kernel/rcu/tree.c:2897 [inline]
 rcu_cpu_kthread+0x99e/0x1470 kernel/rcu/tree.c:2985
 smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
 __call_rcu_common kernel/rcu/tree.c:3159 [inline]
 call_rcu+0xee/0x890 kernel/rcu/tree.c:3279
 dentry_kill+0x4ed/0x890 fs/dcache.c:845
 finish_dput+0x1a/0x260 fs/dcache.c:1001
 path_put+0x39/0x60 fs/namei.c:722
 do_utimes_path fs/utimes.c:100 [inline]
 do_utimes+0x1c6/0x2c0 fs/utimes.c:139
 __do_sys_utimensat fs/utimes.c:158 [inline]
 __se_sys_utimensat fs/utimes.c:142 [inline]
 __x64_sys_utimensat+0x15e/0x240 fs/utimes.c:142
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88803fe3adc0
 which belongs to the cache dentry of size 376
The buggy address is located 208 bytes inside of
 freed 376-byte region [ffff88803fe3adc0, ffff88803fe3af38)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88803fe3b658 pfn:0x3fe3a
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88803fe3bef1
flags: 0x80000000000240(workingset|head|node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000240 ffff88801c68c780 ffffea00017f0210 ffffea0000f85910
raw: ffff88803fe3b658 000000080012000b 00000000f5000000 ffff88803fe3bef1
head: 0080000000000240 ffff88801c68c780 ffffea00017f0210 ffffea0000f85910
head: ffff88803fe3b658 000000080012000b 00000000f5000000 ffff88803fe3bef1
head: 0080000000000001 ffffffffffffff81 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000002
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_RECLAIMABLE|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6241, tgid 6241 (dhcpcd-run-hook), ts 122101795334, free_ts 118807954191
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0x265c/0x26e0 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
 alloc_slab_page mm/slub.c:3288 [inline]
 allocate_slab+0x76/0x5d0 mm/slub.c:3406
 new_slab mm/slub.c:3452 [inline]
 refill_objects+0x2d9/0x350 mm/slub.c:7333
 refill_sheaf mm/slub.c:2826 [inline]
 __pcs_replace_empty_main+0x331/0x690 mm/slub.c:4698
 alloc_from_pcs mm/slub.c:4796 [inline]
 slab_alloc_node mm/slub.c:4929 [inline]
 kmem_cache_alloc_lru_noprof+0x46b/0x6b0 mm/slub.c:4974
 __d_alloc+0x37/0x6f0 fs/dcache.c:1902
 d_alloc_parallel+0xe3/0x1630 fs/dcache.c:2761
 __lookup_slow+0x82/0x2f0 fs/namei.c:1904
 lookup_slow+0x53/0x70 fs/namei.c:1936
 walk_component fs/namei.c:2282 [inline]
 link_path_walk+0xd1e/0x18d0 fs/namei.c:2656
 path_lookupat+0xe4/0x8c0 fs/namei.c:2812
 filename_lookup+0x256/0x5d0 fs/namei.c:2842
 vfs_statx+0xfc/0x200 fs/stat.c:353
 vfs_fstatat+0x11b/0x170 fs/stat.c:373
page last free pid 5605 tgid 5605 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 __free_frozen_pages+0x10af/0x1190 mm/page_alloc.c:2950
 __slab_free+0x252/0x2a0 mm/slub.c:5762
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4614 [inline]
 slab_alloc_node mm/slub.c:4941 [inline]
 kmem_cache_alloc_noprof+0x354/0x6c0 mm/slub.c:4955
 alloc_filename fs/namei.c:147 [inline]
 do_getname+0x2e/0x250 fs/namei.c:187
 getname_flags fs/namei.c:230 [inline]
 getname include/linux/fs.h:2532 [inline]
 class_filename_constructor include/linux/fs.h:2559 [inline]
 __do_sys_unlinkat fs/namei.c:5607 [inline]
 __se_sys_unlinkat+0x4f/0x1a0 fs/namei.c:5602
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff88803fe3ad80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
 ffff88803fe3ae00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88803fe3ae80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                         ^
 ffff88803fe3af00: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa
 ffff88803fe3af80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/06/18 18:55 linux-next ec039126b7fa a776b0d0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in shrink_dcache_tree
2026/06/13 13:50 linux-next c425609d6ac4 1d2f3589 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in shrink_dcache_tree
* Struck through repros no longer work on HEAD.