syzbot


KASAN: use-after-free Read in ext4_find_extent

Status: upstream: reported C repro on 2025/12/25 19:30
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+754d2fe5fcb2b2f41715@syzkaller.appspotmail.com
First crash: 19d, last: 18d
Bug presence (1)
Date Name Commit Repro Result
2026/01/13 upstream (ToT) b71e635feefc C [report] KASAN: use-after-free Read in ext4_find_extent
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 C 2 236d 334d 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 C error inconclusive 74 3d17h 1114d 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 C error done 3 443d 940d 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 C inconclusive 7 21d 909d 0/3 upstream: reported C repro on 2023/07/19 14:49
upstream KASAN: use-after-free Read in ext4_find_extent ext4 19 2 1546d 1607d 0/29 auto-closed as invalid on 2022/02/17 05:19
android-6-1 KASAN: use-after-free Read in ext4_find_extent (2) origin:lts 19 C 20 14d 227d 0/2 upstream: reported C repro on 2025/05/31 08:45
linux-6.1 KASAN: use-after-free Read in ext4_find_extent origin:upstream missing-backport 19 C done 62 108d 848d 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 C error 106 9d18h 1114d 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 C error 2 985d 1109d 22/29 fixed on 2023/06/08 14:41
upstream KASAN: use-after-free Read in ext4_find_extent (4) ext4 19 C done 216 1d01h 379d 0/29 upstream: reported C repro on 2024/12/30 20:06
upstream KASAN: use-after-free Read in ext4_find_extent (3) prio:low ext4 19 C error done 31 749d 931d 25/29 fixed on 2024/01/30 23:26
android-54 KASAN: slab-out-of-bounds Read in ext4_find_extent ext4 17 C 1 928d 1114d 0/2 auto-obsoleted due to no activity on 2023/10/08 03:20

Sample crash report:
EXT4-fs (loop3): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.
==================================================================
BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:837 [inline]
BUG: KASAN: use-after-free in ext4_find_extent+0xbd0/0xe00 fs/ext4/extents.c:953
Read of size 4 at addr ffff8880573be018 by task syz.3.20/5951

CPU: 0 PID: 5951 Comm: syz.3.20 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:364 [inline]
 print_report+0xac/0x220 mm/kasan/report.c:468
 kasan_report+0x117/0x150 mm/kasan/report.c:581
 ext4_ext_binsearch fs/ext4/extents.c:837 [inline]
 ext4_find_extent+0xbd0/0xe00 fs/ext4/extents.c:953
 ext4_ext_map_blocks+0x260/0x6450 fs/ext4/extents.c:4163
 ext4_map_blocks+0x9d5/0x1b70 fs/ext4/inode.c:652
 ext4_iomap_alloc fs/ext4/inode.c:3360 [inline]
 ext4_iomap_begin+0x7be/0xad0 fs/ext4/inode.c:3410
 iomap_iter+0x6b1/0xec0 fs/iomap/iter.c:91
 __iomap_dio_rw+0xb9c/0x1c40 fs/iomap/direct-io.c:658
 iomap_dio_rw+0x45/0xa0 fs/iomap/direct-io.c:748
 ext4_dio_write_iter fs/ext4/file.c:577 [inline]
 ext4_file_write_iter+0x13ff/0x1870 fs/ext4/file.c:696
 do_iter_readv_writev fs/read_write.c:-1 [inline]
 do_iter_write+0x79a/0xc70 fs/read_write.c:860
 iter_file_splice_write+0x66f/0xc50 fs/splice.c:736
 do_splice_from fs/splice.c:933 [inline]
 direct_splice_actor+0xe8/0x130 fs/splice.c:1142
 splice_direct_to_actor+0x2f0/0x870 fs/splice.c:1088
 do_splice_direct+0x1b7/0x2c0 fs/splice.c:1194
 do_sendfile+0x5dc/0xf70 fs/read_write.c:1254
 __do_sys_sendfile64 fs/read_write.c:1322 [inline]
 __se_sys_sendfile64+0x13f/0x190 fs/read_write.c:1308
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7ff807d8f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff808bc8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007ff807fe5fa0 RCX: 00007ff807d8f749
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 00007ff807e13f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020fffe82 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ff807fe6038 R14: 00007ff807fe5fa0 R15: 00007ffde6818448
 </TASK>

The buggy address belongs to the physical page:
page:ffffea00015cef80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x573be
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000000 dead000000000100 dead000000000122 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 0x8(__GFP_MOVABLE), pid 1, tgid 1 (swapper/0), ts 25364861386, free_ts 26689978221
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
 split_map_pages+0x27b/0x4d0 mm/compaction.c:97
 isolate_freepages_range+0x3e0/0x430 mm/compaction.c:775
 alloc_contig_range+0x5b2/0x860 mm/page_alloc.c:6244
 __alloc_contig_pages mm/page_alloc.c:6267 [inline]
 alloc_contig_pages+0x47c/0x580 mm/page_alloc.c:6347
 debug_vm_pgtable_alloc_huge_page+0xbf/0x110 mm/debug_vm_pgtable.c:1087
 init_args+0x724/0x9b0 mm/debug_vm_pgtable.c:1269
 debug_vm_pgtable+0xc1/0x410 mm/debug_vm_pgtable.c:1307
 do_one_initcall+0x1fd/0x750 init/main.c:1250
 do_initcall_level+0x137/0x1f0 init/main.c:1312
 do_initcalls+0x69/0xd0 init/main.c:1328
 kernel_init_freeable+0x3d2/0x570 init/main.c:1565
 kernel_init+0x1d/0x1c0 init/main.c:1455
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1154 [inline]
 free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336
 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429
 free_contig_range+0xa1/0x160 mm/page_alloc.c:6369
 destroy_args+0x80/0x850 mm/debug_vm_pgtable.c:1015
 debug_vm_pgtable+0x3cc/0x410 mm/debug_vm_pgtable.c:1400
 do_one_initcall+0x1fd/0x750 init/main.c:1250
 do_initcall_level+0x137/0x1f0 init/main.c:1312
 do_initcalls+0x69/0xd0 init/main.c:1328
 kernel_init_freeable+0x3d2/0x570 init/main.c:1565
 kernel_init+0x1d/0x1c0 init/main.c:1455
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Memory state around the buggy address:
 ffff8880573bdf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880573bdf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880573be000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                            ^
 ffff8880573be080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880573be100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/26 10:25 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in ext4_find_extent
2025/12/26 08:39 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in ext4_find_extent
2025/12/26 05:38 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in ext4_find_extent
2025/12/26 01:33 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in ext4_find_extent
2025/12/26 00:01 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in ext4_find_extent
2025/12/25 22:16 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in ext4_find_extent
2025/12/26 03:57 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in ext4_find_extent
2025/12/25 19:30 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: use-after-free Read in ext4_find_extent
* Struck through repros no longer work on HEAD.