================================================================== BUG: KASAN: use-after-free in ext4_ext_rm_leaf fs/ext4/extents.c:2602 [inline] BUG: KASAN: use-after-free in ext4_ext_remove_space+0x348b/0x40d0 fs/ext4/extents.c:2940 Read of size 4 at addr ffff888125443db8 by task syz-executor/463 CPU: 1 PID: 463 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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_rm_leaf fs/ext4/extents.c:2602 [inline] ext4_ext_remove_space+0x348b/0x40d0 fs/ext4/extents.c:2940 ext4_ext_truncate+0x200/0x320 fs/ext4/extents.c:4470 ext4_truncate+0x9be/0xfb0 fs/ext4/inode.c:4297 ext4_evict_inode+0xccf/0x1470 fs/ext4/inode.c:286 evict+0x4d7/0x8f0 fs/inode.c:708 iput_final fs/inode.c:1844 [inline] iput+0x620/0x670 fs/inode.c:1870 do_unlinkat+0x380/0x6d0 fs/namei.c:4404 __do_sys_unlink fs/namei.c:4445 [inline] __se_sys_unlink fs/namei.c:4443 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4443 x64_sys_call+0x958/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:88 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:0x7f92c31991e7 Code: 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 57 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffe3de002d8 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f92c31991e7 RDX: 00007ffe3de00300 RSI: 00007ffe3de00390 RDI: 00007ffe3de00390 RBP: 00007ffe3de00390 R08: 00007ffe3de01390 R09: 00000000ffffffff R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffe3de01480 R13: 00007f92c322c113 R14: 000000000000c5bc R15: 00007ffe3de02550 The buggy address belongs to the physical page: page:ffffea00049510c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x125443 flags: 0x4000000000000000(zone=1) 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 0x8140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO|__GFP_CMA), pid 395, tgid 395 (syz-executor), ts 48059061054, free_ts 48192193634 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2670 prep_new_page+0x1c/0x110 mm/page_alloc.c:2677 get_page_from_freelist+0x2d12/0x2d80 mm/page_alloc.c:4583 __alloc_pages+0x1d9/0x480 mm/page_alloc.c:5897 __folio_alloc+0x12/0x40 mm/page_alloc.c:5929 __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:4284 [inline] handle_pte_fault mm/memory.c:5170 [inline] __handle_mm_fault mm/memory.c:5314 [inline] handle_mm_fault+0x1972/0x26c0 mm/memory.c:5454 do_user_addr_fault+0x905/0x1050 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:1578 [inline] free_pcp_prepare mm/page_alloc.c:1652 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3618 free_unref_page_list+0x117/0x8c0 mm/page_alloc.c:3769 release_pages+0xaf2/0xb50 mm/swap.c:1048 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:315 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+0x1aa/0x370 mm/mmu_gather.c:361 unmap_region+0x2b7/0x320 mm/mmap.c:2419 do_mas_align_munmap+0xbed/0x1320 mm/mmap.c:2693 do_mas_munmap+0x241/0x2b0 mm/mmap.c:2751 __vm_munmap+0x1bd/0x330 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: ffff888125443c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888125443d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888125443d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888125443e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888125443e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 62012455635600, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 62012455609397, count = 26214 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 62012455609392, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 125844253747536, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 125844253718062, count = 29486 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 110180460175040, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 110180460160611, count = 14438 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 110180460160608, count = 16 EXT4-fs error: 23726 callbacks suppressed EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 110090555436576, count = 12385 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 110090555436576, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 112589165612224, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 112589165586022, count = 26214 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 112589165586016, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 126642230825680, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 126642230817396, count = 8292 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 126642230817392, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 62011613956752, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 62011613930549, count = 26214 EXT4-fs error: 26786 callbacks suppressed EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 53215188255072, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 53215188230192, count = 24881 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 53215188230192, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 112589990710368, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 112589990684262, count = 26122 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 112589990684256, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 109334523592400, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 109334523567977, count = 24431 EXT4-fs error (device loop2): ext4_free_blocks:6221: comm syz-executor: Freeing blocks not in datazone - block = 109334523567968, count = 16