EXT4-fs (loop2): mounted filesystem without journal. Quota mode: none. ================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:847 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xac5/0xca0 fs/ext4/extents.c:962 Read of size 4 at addr ffff888122075018 by task syz.2.45/459 CPU: 0 PID: 459 Comm: syz.2.45 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: __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:847 [inline] ext4_find_extent+0xac5/0xca0 fs/ext4/extents.c:962 ext4_ext_map_blocks+0x207/0x6200 fs/ext4/extents.c:4228 ext4_map_blocks+0x9d8/0x1b70 fs/ext4/inode.c:679 ext4_alloc_file_blocks+0x372/0xb60 fs/ext4/extents.c:4581 ext4_zero_range+0x449/0xd00 fs/ext4/extents.c:4698 ext4_fallocate+0x539/0x1d20 fs/ext4/extents.c:4833 vfs_fallocate+0x4c5/0x5a0 fs/open.c:324 ksys_fallocate fs/open.c:347 [inline] __do_sys_fallocate fs/open.c:355 [inline] __se_sys_fallocate fs/open.c:353 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:353 x64_sys_call+0x7fa/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:286 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 RIP: 0033:0x7f8567f9ce59 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:00007f85669f7028 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f8568215fa0 RCX: 00007f8567f9ce59 RDX: 0000000000003ffd RSI: 0000000000000011 RDI: 0000000000000006 RBP: 00007f8568032d6f R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000e68d R11: 0000000000000246 R12: 0000000000000000 R13: 00007f8568216038 R14: 00007f8568215fa0 R15: 00007ffe84e93258 The buggy address belongs to the physical page: page:ffffea0004881d40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x122075 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea0004881d88 ffffea0004882488 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 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 459, tgid 458 (syz.2.45), ts 33880266787, free_ts 33883381966 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2672 prep_new_page+0x1c/0x110 mm/page_alloc.c:2679 get_page_from_freelist+0x2d12/0x2d80 mm/page_alloc.c:4585 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5926 __folio_alloc+0x12/0x40 mm/page_alloc.c:5959 __folio_alloc_node include/linux/gfp.h:245 [inline] folio_alloc include/linux/gfp.h:274 [inline] shmem_alloc_folio mm/shmem.c:1597 [inline] shmem_alloc_and_acct_folio+0x6dd/0x8c0 mm/shmem.c:1622 shmem_get_folio_gfp+0x119f/0x2230 mm/shmem.c:1951 shmem_get_folio mm/shmem.c:2082 [inline] shmem_write_begin+0xea/0x2c0 mm/shmem.c:2567 generic_perform_write+0x32d/0x740 mm/filemap.c:3914 __generic_file_write_iter+0x17a/0x230 mm/filemap.c:4013 generic_file_write_iter+0xae/0x310 mm/filemap.c:4042 call_write_iter include/linux/fs.h:2282 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x603/0xce0 fs/read_write.c:584 ksys_write+0x149/0x250 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:646 x64_sys_call+0x27b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1580 [inline] free_pcp_prepare mm/page_alloc.c:1654 [inline] free_unref_page_prepare+0x7f8/0x800 mm/page_alloc.c:3620 free_unref_page_list+0x117/0x8c0 mm/page_alloc.c:3771 release_pages+0xc93/0xcf0 mm/swap.c:1053 __pagevec_release+0x71/0xe0 mm/swap.c:1073 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] shmem_undo_range+0x574/0x1540 mm/shmem.c:951 shmem_truncate_range mm/shmem.c:1067 [inline] shmem_evict_inode+0x255/0xa50 mm/shmem.c:1176 evict+0x4d7/0x8f0 fs/inode.c:708 iput_final fs/inode.c:1844 [inline] iput+0x620/0x670 fs/inode.c:1870 dentry_unlink_inode+0x33d/0x3f0 fs/dcache.c:405 __dentry_kill+0x460/0x670 fs/dcache.c:611 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1 dput+0x42/0x80 fs/dcache.c:918 __fput+0x5be/0x8f0 fs/file_table.c:328 ____fput+0x15/0x20 fs/file_table.c:348 task_work_run+0x1e1/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0x9b/0xb0 kernel/entry/common.c:177 Memory state around the buggy address: ffff888122074f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888122074f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888122075000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888122075080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888122075100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop2): ext4_ext_split:1085: inode #15: comm syz.2.45: p_ext > EXT_MAX_EXTENT! BUG: unable to handle page fault for address: ffffffffffffff93 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 7012067 P4D 7012067 PUD 7014067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 459 Comm: syz.2.45 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 RIP: 0010:ext4_ext_drop_refs fs/ext4/extents.c:119 [inline] RIP: 0010:ext4_free_ext_path fs/ext4/extents.c:128 [inline] RIP: 0010:ext4_ext_map_blocks+0x2e59/0x6200 fs/ext4/extents.c:4497 Code: 40 01 00 00 4d 85 f6 0f 84 bc 00 00 00 48 89 5c 24 20 49 8d 7e 08 48 89 f8 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 38 16 00 00 <41> 0f b7 46 08 c1 e0 04 48 8d 04 40 48 89 44 24 08 49 8d 46 28 48 RSP: 0018:ffffc900108cf760 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000080000 RDX: ffffc90001e5c000 RSI: 000000000007ffff RDI: ffffffffffffff93 RBP: ffffc900108cfa10 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52002119e24 R12: dffffc0000000000 R13: 1ffff92002119f18 R14: ffffffffffffff8b R15: 0000000000000000 FS: 00007f85669f76c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffff93 CR3: 00000001350c8000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_map_blocks+0x9d8/0x1b70 fs/ext4/inode.c:679 ext4_alloc_file_blocks+0x372/0xb60 fs/ext4/extents.c:4581 ext4_zero_range+0x449/0xd00 fs/ext4/extents.c:4698 ext4_fallocate+0x539/0x1d20 fs/ext4/extents.c:4833 vfs_fallocate+0x4c5/0x5a0 fs/open.c:324 ksys_fallocate fs/open.c:347 [inline] __do_sys_fallocate fs/open.c:355 [inline] __se_sys_fallocate fs/open.c:353 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:353 x64_sys_call+0x7fa/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:286 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 RIP: 0033:0x7f8567f9ce59 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:00007f85669f7028 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f8568215fa0 RCX: 00007f8567f9ce59 RDX: 0000000000003ffd RSI: 0000000000000011 RDI: 0000000000000006 RBP: 00007f8568032d6f R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000e68d R11: 0000000000000246 R12: 0000000000000000 R13: 00007f8568216038 R14: 00007f8568215fa0 R15: 00007ffe84e93258 Modules linked in: CR2: ffffffffffffff93 ---[ end trace 0000000000000000 ]--- RIP: 0010:ext4_ext_drop_refs fs/ext4/extents.c:119 [inline] RIP: 0010:ext4_free_ext_path fs/ext4/extents.c:128 [inline] RIP: 0010:ext4_ext_map_blocks+0x2e59/0x6200 fs/ext4/extents.c:4497 Code: 40 01 00 00 4d 85 f6 0f 84 bc 00 00 00 48 89 5c 24 20 49 8d 7e 08 48 89 f8 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 38 16 00 00 <41> 0f b7 46 08 c1 e0 04 48 8d 04 40 48 89 44 24 08 49 8d 46 28 48 RSP: 0018:ffffc900108cf760 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000080000 RDX: ffffc90001e5c000 RSI: 000000000007ffff RDI: ffffffffffffff93 RBP: ffffc900108cfa10 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52002119e24 R12: dffffc0000000000 R13: 1ffff92002119f18 R14: ffffffffffffff8b R15: 0000000000000000 FS: 00007f85669f76c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffff93 CR3: 00000001350c8000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 40 01 00 rex add %eax,(%rax) 3: 00 4d 85 add %cl,-0x7b(%rbp) 6: f6 0f 84 testb $0x84,(%rdi) 9: bc 00 00 00 48 mov $0x48000000,%esp e: 89 5c 24 20 mov %ebx,0x20(%rsp) 12: 49 8d 7e 08 lea 0x8(%r14),%rdi 16: 48 89 f8 mov %rdi,%rax 19: 48 c1 e8 03 shr $0x3,%rax 1d: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax 22: 84 c0 test %al,%al 24: 0f 85 38 16 00 00 jne 0x1662 * 2a: 41 0f b7 46 08 movzwl 0x8(%r14),%eax <-- trapping instruction 2f: c1 e0 04 shl $0x4,%eax 32: 48 8d 04 40 lea (%rax,%rax,2),%rax 36: 48 89 44 24 08 mov %rax,0x8(%rsp) 3b: 49 8d 46 28 lea 0x28(%r14),%rax 3f: 48 rex.W