syzbot


KASAN: use-after-free Read in ext4_search_dir

Status: upstream: reported C repro on 2026/06/21 07:51
Reported-by: syzbot+380275cfdeccde2504de@syzkaller.appspotmail.com
First crash: 5d11h, last: 5d10h
Similar bugs (9)
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 593d 952d 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 628d 1106d 3/3 fixed on 2024/11/08 17:20
android-54 KASAN: use-after-free Read in ext4_search_dir 19 C 17 633d 802d 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 901d 1142d 25/29 fixed on 2024/02/21 18:23
upstream KASAN: slab-out-of-bounds Read in ext4_search_dir ext4 19 C 5 183d 267d 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 158d 978d 0/2 upstream: reported C repro on 2023/10/22 16:55
android-5-10 KASAN: slab-out-of-bounds Read in ext4_search_dir 19 C error 24 5d09h 952d 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 642d 1103d 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 652d 676d 28/29 fixed on 2024/10/22 11:57

Sample crash report:
EXT4-fs: Warning: mounting with data=journal disables delayed allocation, dioread_nolock, O_DIRECT and fast_commit support!
EXT4-fs (loop2): encrypted files will use data=ordered instead of data journaling mode
EXT4-fs (loop2): 1 truncate cleaned up
EXT4-fs (loop2): mounted filesystem without journal. Opts: noblock_validity,max_batch_time=0x0000000000000002,resuid=0x0000000000000000,block_validity,stripe=0x0000000000000009,nombcache,,errors=continue. Quota mode: none.
==================================================================
BUG: KASAN: use-after-free in ext4_search_dir+0xf8/0x1c0 fs/ext4/namei.c:1544
Read of size 1 at addr ffff88811cfbbc86 by task syz.2.17/374

CPU: 1 PID: 374 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:427 [inline]
 kasan_report+0x10f/0x150 mm/kasan/report.c:444
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
 ext4_search_dir+0xf8/0x1c0 fs/ext4/namei.c:1544
 ext4_find_inline_entry+0x4f2/0x630 fs/ext4/inline.c:1748
 __ext4_find_entry+0x307/0x1a10 fs/ext4/namei.c:1617
 ext4_lookup_entry fs/ext4/namei.c:1774 [inline]
 ext4_lookup+0x382/0x930 fs/ext4/namei.c:1842
 lookup_one_qstr_excl+0x114/0x250 fs/namei.c:1571
 filename_create+0x23d/0x440 fs/namei.c:3844
 do_mkdirat+0x5c/0x4d0 fs/namei.c:4088
 __do_sys_mkdirat fs/namei.c:4113 [inline]
 __se_sys_mkdirat fs/namei.c:4111 [inline]
 __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4111
 x64_sys_call+0x37e/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fe09b646cc7
Code: 00 66 90 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 db f7 ff ff 66 2e 0f 1f 84 00 00 00 00 00 90 b8 02 01 00 00 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:00007ffd6b0a2f48 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007ffd6b0a2fd0 RCX: 00007fe09b646cc7
RDX: 00000000000001ff RSI: 0000200000000080 RDI: 00000000ffffff9c
RBP: 0000200000000140 R08: 0000200000000080 R09: 0000000000000000
R10: 0000200000000140 R11: 0000000000000246 R12: 0000200000000080
R13: 00007ffd6b0a2f90 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

The buggy address belongs to the page:
page:ffffea000473eec0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11cfbb
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea000473ef08 ffffea000473ee88 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 358, ts 20456228996, free_ts 20527138634
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611
 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4485
 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5822
 vm_area_alloc_pages mm/vmalloc.c:-1 [inline]
 __vmalloc_area_node mm/vmalloc.c:2981 [inline]
 __vmalloc_node_range+0x507/0xad0 mm/vmalloc.c:3147
 vmalloc_user+0x73/0x80 mm/vmalloc.c:3298
 kcov_mmap+0x2b/0x130 kernel/kcov.c:474
 call_mmap include/linux/fs.h:2217 [inline]
 mmap_file+0x60/0xb0 mm/util.c:1099
 __mmap_region mm/mmap.c:1808 [inline]
 mmap_region+0xe42/0x1700 mm/mmap.c:2959
 do_mmap+0x812/0xf10 mm/mmap.c:1598
 vm_mmap_pgoff+0x1d6/0x410 mm/util.c:555
 ksys_mmap_pgoff+0x161/0x1d0 mm/mmap.c:1647
 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline]
 __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
 __x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86
 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1472 [inline]
 free_pcp_prepare mm/page_alloc.c:1544 [inline]
 free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534
 free_unref_page+0xae/0x540 mm/page_alloc.c:3616
 free_the_page mm/page_alloc.c:805 [inline]
 __free_pages+0x6c/0x100 mm/page_alloc.c:5898
 __vunmap+0x801/0x980 mm/vmalloc.c:2660
 __vfree mm/vmalloc.c:2709 [inline]
 vfree+0x8b/0xc0 mm/vmalloc.c:2740
 kcov_put kernel/kcov.c:417 [inline]
 kcov_close+0x2b/0x50 kernel/kcov.c:519
 __fput+0x22b/0x900 fs/file_table.c:311
 ____fput+0x15/0x20 fs/file_table.c:339
 task_work_run+0x127/0x190 kernel/task_work.c:188
 exit_task_work include/linux/task_work.h:33 [inline]
 do_exit+0xb70/0x29a0 kernel/exit.c:890
 do_group_exit+0x149/0x310 kernel/exit.c:1004
 get_signal+0x64f/0x1430 kernel/signal.c:2907
 arch_do_signal_or_restart+0xe2/0x1100 arch/x86/kernel/signal.c:867
 handle_signal_work kernel/entry/common.c:154 [inline]
 exit_to_user_mode_loop+0xa7/0xe0 kernel/entry/common.c:178
 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307

Memory state around the buggy address:
 ffff88811cfbbb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88811cfbbc00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811cfbbc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff88811cfbbd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88811cfbbd80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/06/21 08:30 android13-5.15-lts b4be5dda13e9 43bfcdb0 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (corrupt fs)] ci2-android-5-15 KASAN: use-after-free Read in ext4_search_dir
2026/06/21 08:04 android13-5.15-lts b4be5dda13e9 43bfcdb0 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (corrupt fs)] ci2-android-5-15 KASAN: use-after-free Read in ext4_search_dir
2026/06/21 07:41 android13-5.15-lts b4be5dda13e9 43bfcdb0 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (corrupt fs)] ci2-android-5-15 KASAN: use-after-free Read in ext4_search_dir
2026/06/21 07:16 android13-5.15-lts b4be5dda13e9 43bfcdb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_search_dir
* Struck through repros no longer work on HEAD.