syzbot


KASAN: slab-out-of-bounds Read in ext4_search_dir

Status: upstream: reported C repro on 2023/11/17 09:38
Reported-by: syzbot+ac107c9fba66d9b8ad08@syzkaller.appspotmail.com
First crash: 504d, last: 140d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (7)
Kernel Title 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 C done 6 145d 504d 0/2 auto-obsoleted due to no activity on 2025/02/18 18:03
upstream KASAN: use-after-free Read in ext4_search_dir prio:low ext4 C error done 20 453d 694d 25/28 fixed on 2024/02/21 18:23
linux-5.15 KASAN: use-after-free Read in ext4_search_dir C done 5 180d 658d 3/3 fixed on 2024/11/08 17:20
android-54 KASAN: use-after-free Read in ext4_search_dir C 17 185d 354d 0/2 auto-obsoleted due to no activity on 2025/02/18 14:16
android-6-1 KASAN: use-after-free Read in ext4_search_dir missing-backport origin:upstream C error 29 18d 530d 0/2 upstream: reported C repro on 2023/10/22 16:55
linux-6.1 KASAN: use-after-free Read in ext4_search_dir origin:upstream missing-backport C done 1 194d 655d 0/3 upstream: reported C repro on 2023/06/18 19:29
upstream KASAN: use-after-free Read in ext4_search_dir (2) ext4 C 5 204d 228d 28/28 fixed on 2024/10/22 11:57
Last patch testing requests (10)
Created Duration User Patch Repo Result
2025/02/08 10:35 12m retest repro android13-5.10-lts report log
2025/02/08 10:35 12m retest repro android13-5.10-lts report log
2025/02/08 10:35 15m retest repro android13-5.10-lts report log
2025/01/25 01:46 17m retest repro android13-5.10-lts OK log
2025/01/25 01:46 17m retest repro android13-5.10-lts OK log
2025/01/25 01:46 1h11m retest repro android13-5.10-lts OK log
2025/01/25 01:46 1h03m retest repro android13-5.10-lts OK log
2025/01/25 01:46 54m retest repro android13-5.10-lts OK log
2024/12/04 00:26 11m retest repro android13-5.10-lts OK log
2024/11/30 09:57 17m retest repro android13-5.10-lts OK log
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2024/05/30 18:28 6m bisect fix android13-5.10-lts error job log
2024/04/06 20:03 1h02m bisect fix android13-5.10-lts OK (0) job log log
2024/03/06 22:56 37m bisect fix android13-5.10-lts OK (0) job log log
2024/02/03 06:35 36m bisect fix android13-5.10-lts OK (0) job log log
2023/12/31 11:12 35m bisect fix android13-5.10-lts OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ext4_search_dir+0xf7/0x1b0 fs/ext4/namei.c:1516
Read of size 1 at addr ffff88811cb8ed0b by task syz-executor166/325

CPU: 1 PID: 325 Comm: syz-executor166 Not tainted 5.10.226-syzkaller-00709-ge5e5644ea27f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
 print_address_description+0x81/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0x179/0x1c0 mm/kasan/report.c:452
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
 ext4_search_dir+0xf7/0x1b0 fs/ext4/namei.c:1516
 ext4_find_inline_entry+0x4b6/0x5e0 fs/ext4/inline.c:1700
 __ext4_find_entry+0x2b0/0x1990 fs/ext4/namei.c:1589
 ext4_lookup_entry fs/ext4/namei.c:1744 [inline]
 ext4_lookup+0x3c6/0xaa0 fs/ext4/namei.c:1812
 __lookup_slow+0x2b9/0x400 fs/namei.c:1640
 lookup_slow+0x5a/0x80 fs/namei.c:1657
 walk_component+0x48c/0x610 fs/namei.c:1952
 lookup_last fs/namei.c:2403 [inline]
 path_lookupat+0x16d/0x450 fs/namei.c:2427
 filename_lookup+0x26a/0x6f0 fs/namei.c:2460
 user_path_at_empty+0x40/0x50 fs/namei.c:2740
 user_path_at include/linux/namei.h:60 [inline]
 do_mount fs/namespace.c:3250 [inline]
 __do_sys_mount fs/namespace.c:3461 [inline]
 __se_sys_mount+0x285/0x3b0 fs/namespace.c:3438
 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3438
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f3e5cd5c539
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 1f 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdbdf225b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f3e5cd5c539
RDX: 0000000000000000 RSI: 0000000020002ac0 RDI: 0000000000000000
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffdbdf22640
R13: 00007ffdbdf22600 R14: 00007f3e5cda007d R15: 0000000000000000

The buggy address belongs to the page:
page:ffffea000472e380 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x11cb8e
flags: 0x4000000000000000()
raw: 4000000000000000 ffffea000472e3c8 ffffea000472e348 0000000000000000
raw: 0000000000000001 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 0x8100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|0x8000000), pid 259, ts 15626242853, free_ts 15961398876
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x166/0x180 mm/page_alloc.c:2462
 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348
 __alloc_pages include/linux/gfp.h:544 [inline]
 __alloc_pages_node include/linux/gfp.h:557 [inline]
 alloc_pages_node include/linux/gfp.h:571 [inline]
 alloc_pages include/linux/gfp.h:590 [inline]
 do_anonymous_page mm/memory.c:3935 [inline]
 handle_pte_fault+0x1782/0x3e30 mm/memory.c:4758
 __handle_mm_fault mm/memory.c:4916 [inline]
 handle_mm_fault+0x11d6/0x1a10 mm/memory.c:5330
 do_user_addr_fault arch/x86/mm/fault.c:1362 [inline]
 handle_page_fault arch/x86/mm/fault.c:1428 [inline]
 exc_page_fault+0x2a6/0x5b0 arch/x86/mm/fault.c:1484
 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1349 [inline]
 free_pcp_prepare mm/page_alloc.c:1421 [inline]
 free_unref_page_prepare+0x2ae/0x2d0 mm/page_alloc.c:3336
 free_unref_page_list+0x122/0xb20 mm/page_alloc.c:3443
 release_pages+0xea0/0xef0 mm/swap.c:1103
 free_pages_and_swap_cache+0x8a/0xa0 mm/swap_state.c:356
 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
 tlb_flush_mmu mm/mmu_gather.c:247 [inline]
 tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:326
 exit_mmap+0x312/0x5c0 mm/mmap.c:3357
 __mmput+0x95/0x2d0 kernel/fork.c:1153
 mmput+0x59/0x170 kernel/fork.c:1176
 exit_mm kernel/exit.c:539 [inline]
 do_exit+0xbda/0x2a50 kernel/exit.c:850
 do_group_exit+0x141/0x310 kernel/exit.c:985
 __do_sys_exit_group kernel/exit.c:996 [inline]
 __se_sys_exit_group kernel/exit.c:994 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:994
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
 ffff88811cb8ec00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88811cb8ec80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811cb8ed00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff88811cb8ed80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88811cb8ee00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/18 12:48 android13-5.10-lts e5e5644ea27f 666f77ed .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/18 12:06 android13-5.10-lts e5e5644ea27f 666f77ed .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/18 11:44 android13-5.10-lts e5e5644ea27f 666f77ed .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/27 11:18 android13-5.10-lts e5e5644ea27f 65e8686b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: slab-out-of-bounds Read in ext4_search_dir
2024/10/05 18:34 android13-5.10-lts e5e5644ea27f d7906eff .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: slab-out-of-bounds Read in ext4_search_dir
2023/11/17 09:36 android13-5.10-lts d30b996835c0 cb976f63 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: slab-out-of-bounds Read in ext4_search_dir
2024/11/15 14:25 android13-5.10-lts 6a01908517df f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/11/01 06:55 android13-5.10-lts e5e5644ea27f 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/30 20:11 android13-5.10-lts e5e5644ea27f fb888278 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/27 15:46 android13-5.10-lts e5e5644ea27f 65e8686b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/27 05:13 android13-5.10-lts e5e5644ea27f 65e8686b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/27 04:15 android13-5.10-lts e5e5644ea27f 65e8686b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/27 03:07 android13-5.10-lts e5e5644ea27f 65e8686b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/08 00:14 android13-5.10-lts e5e5644ea27f d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/05 18:58 android13-5.10-lts e5e5644ea27f d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/05 18:12 android13-5.10-lts e5e5644ea27f d7906eff .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/09/10 21:33 android13-5.10-lts 1c5354a314ea 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/09/02 00:25 android13-5.10-lts 1c5354a314ea 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/07/25 06:41 android13-5.10-lts fd58936f3c1f d1a1b0ca .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/07/25 06:11 android13-5.10-lts fd58936f3c1f d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/04/15 07:06 android13-5.10-lts 4e1bc8d8e8ae c8349e48 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
* Struck through repros no longer work on HEAD.