KASAN: use-after-free Read in ext4_find_extent (2)

Status: upstream: reported C repro on 2025/05/31 08:45
Bug presence: origin:lts
[Documentation on labels]
Reported-by: syzbot+869401e856e234844286@syzkaller.appspotmail.com
First crash: 483d, last: 3d03h
Fix bisection: the issue occurs on the latest tested release (bisect log)
  
▶ ▼ Bug presence (4)
Date Name Commit Repro Result
2026/07/30 android14-6.1 (ToT) c9d3e2fd9c49 C Failed due to an error; will retry later
2025/06/01 lts (merge base) 02b72ccb5f9d C [report] KASAN: use-after-free Read in ext4_find_extent
2026/07/30 lts (merge base) 228da13e907e C Didn't crash
2025/06/01 upstream (ToT) cd2e103d57e5 C Didn't crash
▶ ▼ Similar bugs (12)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 KASAN: use-after-free Read in ext4_find_extent 19 syz, C 2 492d 590d 0/2 upstream: reported C repro on 2025/02/13 21:05
android-5-10 KASAN: use-after-free Read in ext4_find_extent ext4 19 syz, C error inconclusive 149 7d03h 1370d 0/2 upstream: reported C repro on 2022/12/26 07:59
android-6-1 KASAN: use-after-free Read in ext4_find_extent missing-backport 19 syz, C error done 3 699d 1196d 0/2 auto-obsoleted due to no activity on 2025/02/04 04:57
linux-5.15 KASAN: use-after-free Read in ext4_find_extent origin:lts-only 19 syz, C inconclusive 7 87d 1165d 0/3 upstream: reported C repro on 2023/07/19 14:49
linux-6.6 KASAN: use-after-free Read in ext4_find_extent 19 syz, C error 8 274d 275d 0/2 auto-obsoleted due to no activity on 2026/04/15 02:12
upstream KASAN: use-after-free Read in ext4_find_extent ext4 19 2 1802d 1863d 0/29 auto-closed as invalid on 2022/02/17 05:19
linux-6.1 KASAN: use-after-free Read in ext4_find_extent origin:upstream missing-backport 19 syz, C done 69 184d 1104d 0/3 upstream: reported C repro on 2023/09/19 00:11
android-5-15 KASAN: use-after-free Read in ext4_find_extent ext4 origin:lts 19 syz, C error 144 6d03h 1370d 0/2 upstream: reported C repro on 2022/12/26 07:59
upstream KASAN: use-after-free Read in ext4_find_extent (2) ext4 19 syz, C error 2 1241d 1365d 22/29 fixed on 2023/06/08 14:41
upstream KASAN: use-after-free Read in ext4_find_extent (4) prio:high ext4 19 syz, C done error 307 181d 635d 0/29 auto-obsoleted due to no activity on 2026/06/22 22:43
upstream KASAN: use-after-free Read in ext4_find_extent (3) prio:low ext4 19 syz, C error done 31 1005d 1187d 25/29 fixed on 2024/01/30 23:26
android-54 KASAN: slab-out-of-bounds Read in ext4_find_extent ext4 17 syz, C 1 1184d 1370d 0/2 auto-obsoleted due to no activity on 2023/10/08 03:20
▶ ▼ Last patch testing requests (10)
Created Duration User Patch Repo Result
2026/08/29 04:02 2m retest repro android14-6.1 error job log
2026/08/29 04:02 8m retest repro android14-6.1 error job log
2026/08/29 04:02 2m retest repro android14-6.1 error job log
2026/08/29 04:02 2m retest repro android14-6.1 error job log
2026/08/29 04:02 2m retest repro android14-6.1 error job log
2026/08/26 09:52 6m retest repro android14-6.1 error job log
2026/08/26 09:52 7m retest repro android14-6.1 error job log
2026/08/26 09:52 7m retest repro android14-6.1 error job log
2026/08/26 09:52 3m retest repro android14-6.1 error job log
2026/08/26 09:52 4m retest repro android14-6.1 error job log
▶ ▼ Fix bisection attempts (5)
Created Duration User Patch Repo Result
2026/08/16 22:32 1h23m bisect fix android14-6.1 OK (0) job log
2026/07/13 13:23 1h33m bisect fix android14-6.1 OK (0) job log log
2026/06/12 12:38 1h09m bisect fix android14-6.1 OK (0) job log log
2025/07/31 06:27 1h21m bisect fix android14-6.1 OK (0) job log log
2025/06/30 20:17 1h08m bisect fix android14-6.1 OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:837 [inline]
BUG: KASAN: use-after-free in ext4_find_extent+0xbfb/0xe30 fs/ext4/extents.c:953
Read of size 4 at addr ffff888125129380 by task kworker/u4:0/8

CPU: 1 PID: 8 Comm: kworker/u4:0 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Workqueue: writeback wb_workfn (flush-7:3)
Call Trace:
 <TASK>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x71/0x200 mm/kasan/report.c:316
 print_report+0x4a/0x60 mm/kasan/report.c:420
 kasan_report+0x122/0x150 mm/kasan/report.c:524
 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350
 ext4_ext_binsearch fs/ext4/extents.c:837 [inline]
 ext4_find_extent+0xbfb/0xe30 fs/ext4/extents.c:953
 ext4_ext_map_blocks+0x20c/0x60e0 fs/ext4/extents.c:4187
 ext4_map_blocks+0x9d1/0x1a80 fs/ext4/inode.c:681
 mpage_map_one_extent fs/ext4/inode.c:2437 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2490 [inline]
 ext4_writepages+0x13eb/0x30a0 fs/ext4/inode.c:2858
 do_writepages+0x3ab/0x600 mm/page-writeback.c:2494
 __writeback_single_inode+0xd9/0xb10 fs/fs-writeback.c:1622
 writeback_sb_inodes+0x9fd/0x1610 fs/fs-writeback.c:1913
 wb_writeback+0x3eb/0x990 fs/fs-writeback.c:2089
 wb_do_writeback fs/fs-writeback.c:2236 [inline]
 wb_workfn+0x378/0xeb0 fs/fs-writeback.c:2276
 process_one_work+0x717/0xc30 kernel/workqueue.c:2302
 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
 kthread+0x281/0x320 kernel/kthread.c:386
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

The buggy address belongs to the physical page:
page:ffffea0004944a40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x125129
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea0004944a88 ffffea000494cc48 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 0x8140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO|__GFP_CMA), pid 289, tgid 289 (sshd-session), ts 27560945827, free_ts 27608654565
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2680
 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587
 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931
 __folio_alloc+0x12/0x40 mm/page_alloc.c:5964
 __folio_alloc_node include/linux/gfp.h:245 [inline]
 folio_alloc include/linux/gfp.h:274 [inline]
 alloc_page_vma include/linux/gfp.h:283 [inline]
 do_anonymous_page mm/memory.c:4286 [inline]
 handle_pte_fault mm/memory.c:5181 [inline]
 __handle_mm_fault mm/memory.c:5325 [inline]
 handle_mm_fault+0x1989/0x26b0 mm/memory.c:5465
 do_user_addr_fault+0x900/0x1030 arch/x86/mm/fault.c:1321
 handle_page_fault arch/x86/mm/fault.c:1464 [inline]
 exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1517
 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:608
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1581 [inline]
 free_pcp_prepare mm/page_alloc.c:1655 [inline]
 free_unref_page_prepare+0x81b/0x820 mm/page_alloc.c:3622
 free_unref_page_list+0x117/0x8d0 mm/page_alloc.c:3773
 release_pages+0xc7e/0xce0 mm/swap.c:1053
 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:316
 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:254 [inline]
 tlb_flush_mmu mm/mmu_gather.c:261 [inline]
 tlb_finish_mmu+0x1b2/0x380 mm/mmu_gather.c:361
 unmap_region+0x2b7/0x320 mm/mmap.c:2419
 do_mas_align_munmap+0xbf3/0x1330 mm/mmap.c:2693
 do_mas_munmap+0x23d/0x2b0 mm/mmap.c:2751
 __vm_munmap+0x1af/0x310 mm/mmap.c:3050
 __do_sys_munmap mm/mmap.c:3076 [inline]
 __se_sys_munmap mm/mmap.c:3072 [inline]
 __x64_sys_munmap+0x6b/0x80 mm/mmap.c:3072
 x64_sys_call+0x8a/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:12
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
 ffff888125129280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888125129300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888125129380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff888125129400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888125129480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
EXT4-fs error (device loop3): ext4_map_blocks:747: inode #15: block 36: comm kworker/u4:0: lblock 36 mapped to illegal pblock 36 (length 13)
EXT4-fs (loop3): Delayed block allocation failed for inode 15 at logical offset 36 with max blocks 13 with error 117
EXT4-fs (loop3): This should not happen!! Data will be lost

EXT4-fs error (device loop3): __ext4_get_inode_loc:4522: comm kworker/u4:0: Invalid inode table block 1061109567 in block_group 0
EXT4-fs error (device loop3): __ext4_get_inode_loc:4522: comm kworker/u4:0: Invalid inode table block 1061109567 in block_group 0
EXT4-fs error (device loop3): __ext4_get_inode_loc:4522: comm kworker/u4:0: Invalid inode table block 1061109567 in block_group 0
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
device veth1_macvtap left promiscuous mode
device veth0_vlan left promiscuous mode
EXT4-fs (loop1): Delayed block allocation failed for inode 15 at logical offset 36 with max blocks 28 with error 117
EXT4-fs (loop1): This should not happen!! Data will be lost


Crashes (36):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/23 23:18 android14-6.1 f26a1f4f9013 abce1216 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/03/26 18:36 android14-6.1 c0665c721df9 766b6434 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/02/26 16:51 android14-6.1 6bfa51973214 ffa54287 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/02/23 16:46 android14-6.1 34c1a8e17200 6beca497 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/02/16 11:10 android14-6.1 edbe3e111301 1e62d198 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/02/15 18:42 android14-6.1 edbe3e111301 1e62d198 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/02/05 08:55 android14-6.1 775f23d50ca8 ea10c935 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/01/17 19:05 android14-6.1 f8a5ad1fcf13 20d37d28 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/10/24 04:04 android14-6.1 22c0b7236c43 c0460fcd .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/10/24 03:23 android14-6.1 22c0b7236c43 c0460fcd .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/10/24 02:37 android14-6.1 22c0b7236c43 c0460fcd .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/09/29 02:17 android14-6.1 5303560ee8cf 001c9061 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/09/03 14:52 android14-6.1 79ccb6ecf51e 96a211bc .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/08/03 17:31 android14-6.1 3b4ff5af8d36 7368264b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/05/31 08:37 android14-6.1 db710ea87c32 3d2f584d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/05/03 17:15 android14-6.1 1e4e23ff0f90 a0d91488 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/05/03 09:50 android14-6.1 1e4e23ff0f90 a0d91488 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/11/22 21:09 android14-6.1 eba111621724 4fb8ef37 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/05/13 04:02 android14-6.1 17b41c3753e0 a0949470 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/03/26 18:05 android14-6.1 c0665c721df9 766b6434 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/03/08 15:12 android14-6.1 6bfa51973214 5cb44a80 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/02/20 15:56 android14-6.1 edbe3e111301 17d780d6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/02/12 06:48 android14-6.1 edbe3e111301 76a109e2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2026/02/12 06:48 android14-6.1 edbe3e111301 76a109e2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/12/30 18:59 android14-6.1 5e6db7045704 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/12/30 18:59 android14-6.1 5e6db7045704 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/12/30 18:58 android14-6.1 5e6db7045704 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/12/30 18:57 android14-6.1 5e6db7045704 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/12/01 12:36 android14-6.1 a92da54b7708 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/11/30 15:55 android14-6.1 a92da54b7708 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/09/14 09:34 android14-6.1 0429b7af308c e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/08/28 01:48 android14-6.1 47b374a18638 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/08/28 01:48 android14-6.1 47b374a18638 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/08/28 01:46 android14-6.1 47b374a18638 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/08/28 01:46 android14-6.1 47b374a18638 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
2025/05/31 08:03 android14-6.1 db710ea87c32 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in ext4_find_extent
* Struck through repros no longer work on HEAD.