================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:826 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:945 Read of size 4 at addr ffff88813e40b8e8 by task syz.3.2285/7909 CPU: 1 PID: 7909 Comm: syz.3.2285 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0xe2/0x130 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_binsearch fs/ext4/extents.c:826 [inline] ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:945 ext4_ext_remove_space+0x2f0/0x4570 fs/ext4/extents.c:2829 ext4_punch_hole+0x6f8/0xad0 fs/ext4/inode.c:4223 ext4_fallocate+0x271/0x1a70 fs/ext4/extents.c:4758 vfs_fallocate+0x4b4/0x590 fs/open.c:310 madvise_remove mm/madvise.c:880 [inline] madvise_vma_behavior mm/madvise.c:904 [inline] madvise_walk_vmas mm/madvise.c:1131 [inline] do_madvise+0x1443/0x1d70 mm/madvise.c:1308 __do_sys_madvise mm/madvise.c:1322 [inline] __se_sys_madvise mm/madvise.c:1320 [inline] __x64_sys_madvise+0xa9/0xc0 mm/madvise.c:1320 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f907a86af79 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:00007f90792a5028 EFLAGS: 00000246 ORIG_RAX: 000000000000001c RAX: ffffffffffffffda RBX: 00007f907aae5090 RCX: 00007f907a86af79 RDX: 0000000000000009 RSI: 0000000000600002 RDI: 0000200000000000 RBP: 00007f907a9017e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f907aae5128 R14: 00007f907aae5090 R15: 00007ffd3fb31f08 The buggy address belongs to the page: page:ffffea0004f902c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x13e40b flags: 0x4000000000000000() raw: 4000000000000000 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 0x100cca(GFP_HIGHUSER_MOVABLE), pid 7693, ts 302449159155, free_ts 303379503560 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x223b/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x290/0x620 mm/page_alloc.c:5370 __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] shmem_alloc_page+0x1fd/0x380 mm/shmem.c:1584 shmem_alloc_and_acct_page+0x3b7/0x820 mm/shmem.c:1609 shmem_getpage_gfp+0x625/0x2120 mm/shmem.c:1922 shmem_getpage mm/shmem.c:165 [inline] shmem_fallocate+0x841/0xc40 mm/shmem.c:2824 vfs_fallocate+0x4b4/0x590 fs/open.c:310 ksys_fallocate fs/open.c:333 [inline] __do_sys_fallocate fs/open.c:341 [inline] __se_sys_fallocate fs/open.c:339 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:339 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb 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+0x2b7/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x129/0x9c0 mm/page_alloc.c:3443 release_pages+0xe52/0xea0 mm/swap.c:1103 __pagevec_release+0x71/0xe0 mm/swap.c:1123 pagevec_release include/linux/pagevec.h:88 [inline] shmem_undo_range+0x74a/0x1810 mm/shmem.c:969 shmem_truncate_range mm/shmem.c:1073 [inline] shmem_evict_inode+0x210/0xa00 mm/shmem.c:1173 evict+0x4ae/0x930 fs/inode.c:612 iput_final fs/inode.c:1736 [inline] iput+0x638/0x7c0 fs/inode.c:1762 do_unlinkat+0x347/0x680 fs/namei.c:4050 __do_sys_unlink fs/namei.c:4090 [inline] __se_sys_unlink fs/namei.c:4088 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4088 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff88813e40b780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88813e40b800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88813e40b880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88813e40b900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88813e40b980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ------------[ cut here ]------------ kernel BUG at fs/ext4/extents.c:3181! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 7909 Comm: syz.3.2285 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 RIP: 0010:ext4_split_extent_at+0xe65/0xe90 fs/ext4/extents.c:3181 Code: 71 cf d2 ff e9 f1 fb ff ff 89 d9 80 e1 07 fe c1 38 c1 0f 8c fe fb ff ff 48 89 df e8 35 cf d2 ff e9 f1 fb ff ff e8 5b 4e 98 ff <0f> 0b e8 54 4e 98 ff 0f 0b e8 4d 4e 98 ff 0f 0b e8 46 4e 98 ff 0f RSP: 0018:ffffc90000bf74a0 EFLAGS: 00010283 RAX: ffffffff81cc67f5 RBX: 1ffff11027c867b7 RCX: 0000000000080000 RDX: ffffc90004948000 RSI: 0000000000056ffd RDI: 0000000000056ffe RBP: ffffc90000bf7610 R08: 0000000000000000 R09: 0000000050000028 R10: dffffc0000000000 R11: fffffbfff0dcf448 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f90792a56c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f20cd54c000 CR3: 0000000112e2f000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_force_split_extent_at fs/ext4/extents.c:318 [inline] ext4_ext_remove_space+0x631/0x4570 fs/ext4/extents.c:2875 ext4_punch_hole+0x6f8/0xad0 fs/ext4/inode.c:4223 ext4_fallocate+0x271/0x1a70 fs/ext4/extents.c:4758 vfs_fallocate+0x4b4/0x590 fs/open.c:310 madvise_remove mm/madvise.c:880 [inline] madvise_vma_behavior mm/madvise.c:904 [inline] madvise_walk_vmas mm/madvise.c:1131 [inline] do_madvise+0x1443/0x1d70 mm/madvise.c:1308 __do_sys_madvise mm/madvise.c:1322 [inline] __se_sys_madvise mm/madvise.c:1320 [inline] __x64_sys_madvise+0xa9/0xc0 mm/madvise.c:1320 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f907a86af79 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:00007f90792a5028 EFLAGS: 00000246 ORIG_RAX: 000000000000001c RAX: ffffffffffffffda RBX: 00007f907aae5090 RCX: 00007f907a86af79 RDX: 0000000000000009 RSI: 0000000000600002 RDI: 0000200000000000 RBP: 00007f907a9017e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f907aae5128 R14: 00007f907aae5090 R15: 00007ffd3fb31f08 Modules linked in: ---[ end trace 6425a2a43314daa2 ]--- RIP: 0010:ext4_split_extent_at+0xe65/0xe90 fs/ext4/extents.c:3181 Code: 71 cf d2 ff e9 f1 fb ff ff 89 d9 80 e1 07 fe c1 38 c1 0f 8c fe fb ff ff 48 89 df e8 35 cf d2 ff e9 f1 fb ff ff e8 5b 4e 98 ff <0f> 0b e8 54 4e 98 ff 0f 0b e8 4d 4e 98 ff 0f 0b e8 46 4e 98 ff 0f RSP: 0018:ffffc90000bf74a0 EFLAGS: 00010283 RAX: ffffffff81cc67f5 RBX: 1ffff11027c867b7 RCX: 0000000000080000 RDX: ffffc90004948000 RSI: 0000000000056ffd RDI: 0000000000056ffe RBP: ffffc90000bf7610 R08: 0000000000000000 R09: 0000000050000028 R10: dffffc0000000000 R11: fffffbfff0dcf448 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f90792a56c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9cc4eec198 CR3: 0000000112e2f000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400