syzbot


KASAN: use-after-free Read in ext4_search_dir (3)

Status: moderation: reported on 2026/07/08 01:01
Subsystems: ext4
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+3d9e379dba15a7c2d8c5@syzkaller.appspotmail.com
First crash: 4d21h, last: 4d21h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision Error
c87fcad9-6248-4730-bcde-5e0ce2a2d9fe assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ✅ NetworkTrigger: ❌ PeripheralTrigger: ✅ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ✅ VMHostTrigger: ❌ KASAN: use-after-free Read in ext4_search_dir (3) 2026/07/06 00:00 2026/07/06 00:00 2026/07/06 00:47 93f579545ae410f5bccfa141d2e7bf03178f036c

			
		
Similar bugs (10)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: slab-out-of-bounds Read in ext4_search_dir origin:upstream missing-backport 19 C done 6 605d 964d 0/2 auto-obsoleted due to no activity on 2025/02/18 18:03
linux-5.15 KASAN: use-after-free Read in ext4_search_dir 19 C done 5 640d 1118d 3/3 fixed on 2024/11/08 17:20
android-54 KASAN: use-after-free Read in ext4_search_dir 19 C 17 645d 814d 0/2 auto-obsoleted due to no activity on 2025/02/18 14:16
upstream KASAN: use-after-free Read in ext4_search_dir prio:low ext4 19 C error done 20 913d 1154d 25/29 fixed on 2024/02/21 18:23
upstream KASAN: slab-out-of-bounds Read in ext4_search_dir ext4 19 C 5 196d 279d 29/29 fixed on 2026/05/06 16:40
android-6-1 KASAN: use-after-free Read in ext4_search_dir missing-backport origin:upstream 19 C error error 29 170d 990d 0/2 upstream: reported C repro on 2023/10/22 16:55
android-5-15 KASAN: use-after-free Read in ext4_search_dir 19 C 4 17d 17d 0/2 upstream: reported C repro on 2026/06/21 07:51
android-5-10 KASAN: slab-out-of-bounds Read in ext4_search_dir 19 C error 24 17d 964d 0/2 upstream: reported C repro on 2023/11/17 09:38
linux-6.1 KASAN: use-after-free Read in ext4_search_dir origin:upstream missing-backport 19 C done 1 655d 1116d 0/3 upstream: reported C repro on 2023/06/18 19:29
upstream KASAN: use-after-free Read in ext4_search_dir (2) ext4 19 C 5 664d 688d 28/29 fixed on 2024/10/22 11:57

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ext4_search_dir+0x180/0x250 fs/ext4/namei.c:1469
Read of size 1 at addr ffff88801323b3aa by task syz.0.0/5323

CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
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
 ext4_search_dir+0x180/0x250 fs/ext4/namei.c:1469
 ext4_find_inline_entry+0x502/0x650 fs/ext4/inline.c:1639
 __ext4_find_entry+0x315/0x1cd0 fs/ext4/namei.c:1542
 ext4_lookup_entry fs/ext4/namei.c:1703 [inline]
 ext4_lookup+0x17b/0x710 fs/ext4/namei.c:1769
 lookup_open fs/namei.c:4481 [inline]
 open_last_lookups fs/namei.c:4608 [inline]
 path_openat+0x111f/0x3830 fs/namei.c:4856
 do_file_open+0x23e/0x4a0 fs/namei.c:4888
 do_sys_openat2+0x115/0x200 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_open fs/open.c:1382 [inline]
 __se_sys_open fs/open.c:1378 [inline]
 __x64_sys_open+0x11e/0x150 fs/open.c:1378
 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
RIP: 0033:0x7fdc5619de59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdc56fc5fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007fdc56426090 RCX: 00007fdc5619de59
RDX: 0000000000000000 RSI: 0000000000064842 RDI: 00002000000005c0
RBP: 00007fdc56233e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fdc56426128 R14: 00007fdc56426090 R15: 00007ffea8722208
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xa96 pfn:0x1323b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000a96 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 5322, tgid 5321 (syz.0.0), ts 105785277419, free_ts 105927156983
 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+0x21fa/0x2270 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
 folio_alloc_mpol_noprof+0x39/0x160 mm/mempolicy.c:2509
 shmem_alloc_folio mm/shmem.c:1907 [inline]
 shmem_alloc_and_add_folio+0x43e/0xf60 mm/shmem.c:1949
 shmem_get_folio_gfp+0x5da/0x16d0 mm/shmem.c:2502
 shmem_get_folio mm/shmem.c:2608 [inline]
 shmem_write_begin+0x16c/0x330 mm/shmem.c:3239
 generic_perform_write+0x2d5/0x8f0 mm/filemap.c:4358
 shmem_file_write_iter+0xf8/0x120 mm/shmem.c:3414
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 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
page last free pid 69 tgid 69 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 free_unref_folios+0xd84/0x14a0 mm/page_alloc.c:3011
 shrink_folio_list+0x2b7d/0x5330 mm/vmscan.c:1513
 evict_folios+0x3821/0x4b40 mm/vmscan.c:4835
 try_to_shrink_lruvec+0xb4f/0xed0 mm/vmscan.c:4983
 shrink_one+0x233/0x730 mm/vmscan.c:5024
 shrink_many mm/vmscan.c:5087 [inline]
 lru_gen_shrink_node mm/vmscan.c:5165 [inline]
 shrink_node+0x3303/0x3b60 mm/vmscan.c:6154
 kswapd_shrink_node mm/vmscan.c:7008 [inline]
 balance_pgdat mm/vmscan.c:7186 [inline]
 kswapd+0x17b6/0x31c0 mm/vmscan.c:7462
 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

Memory state around the buggy address:
 ffff88801323b280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88801323b300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88801323b380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                  ^
 ffff88801323b400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88801323b480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/04 00:54 upstream d2c9a99135da aa437a8a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in ext4_search_dir
* Struck through repros no longer work on HEAD.