EXT4-fs error (device loop1): ext4_free_blocks:5701: comm syz.1.17: Freeing blocks not in datazone - block = 60773342086493, count = 5211 ================================================================== BUG: KASAN: use-after-free in ext4_ext_store_pblock fs/ext4/ext4_extents.h:255 [inline] BUG: KASAN: use-after-free in ext4_ext_rm_leaf fs/ext4/extents.c:2692 [inline] BUG: KASAN: use-after-free in ext4_ext_remove_space+0x2933/0x4570 fs/ext4/extents.c:2934 Write of size 4 at addr ffff88813329e850 by task syz.1.17/524 CPU: 1 PID: 524 Comm: syz.1.17 Not tainted 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_store4_noabort+0x17/0x20 mm/kasan/report_generic.c:313 ext4_ext_store_pblock fs/ext4/ext4_extents.h:255 [inline] ext4_ext_rm_leaf fs/ext4/extents.c:2692 [inline] ext4_ext_remove_space+0x2933/0x4570 fs/ext4/extents.c:2934 ext4_ext_truncate+0x169/0x1f0 fs/ext4/extents.c:4467 ext4_truncate+0xb21/0x12d0 fs/ext4/inode.c:4373 ext4_truncate_failed_write fs/ext4/truncate.h:20 [inline] ext4_write_begin+0xda5/0x1690 fs/ext4/inode.c:1276 ext4_da_write_begin+0x478/0xf10 fs/ext4/inode.c:3033 generic_perform_write+0x2ce/0x540 mm/filemap.c:3509 ext4_buffered_write_iter+0x4b8/0x640 fs/ext4/file.c:271 ext4_file_write_iter+0x53f/0x1980 fs/ext4/file.c:-1 call_write_iter include/linux/fs.h:2066 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0x758/0xdc0 fs/read_write.c:605 ksys_write+0x149/0x250 fs/read_write.c:658 __do_sys_write fs/read_write.c:670 [inline] __se_sys_write fs/read_write.c:667 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:667 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f3f51f688f9 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:00007f3f519af028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f3f52197080 RCX: 00007f3f51f688f9 RDX: 0000000000040010 RSI: 0000400000000180 RDI: 0000000000000006 RBP: 00007f3f51ffa1bc R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3f52197080 R15: 00007ffc488afd48 The buggy address belongs to the page: page:ffffea0004cca780 refcount:1 mapcount:1 mapping:0000000000000000 index:0x400000b74 pfn:0x13329e anon flags: 0x4000000000080014(uptodate|lru|swapbacked) raw: 4000000000080014 ffffea0004cca748 ffffea0004cca7c8 ffff8881108a7679 raw: 0000000400000b74 0000000000000000 0000000100000000 ffff88810ced4000 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88810ced4000 page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x8100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|0x8000000), pid 510, ts 47733416964, free_ts 47605921247 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] do_anonymous_page mm/memory.c:3963 [inline] handle_pte_fault+0x1719/0x3750 mm/memory.c:4786 __handle_mm_fault mm/memory.c:4944 [inline] handle_mm_fault+0xf81/0x1710 mm/memory.c:5358 do_user_addr_fault+0x5a8/0xc90 arch/x86/mm/fault.c:1362 handle_page_fault arch/x86/mm/fault.c:1428 [inline] exc_page_fault+0x5a/0xc0 arch/x86/mm/fault.c:1484 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571 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 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:356 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x17e/0x310 mm/mmu_gather.c:326 exit_mmap+0x329/0x590 mm/mmap.c:3387 __mmput+0x93/0x2f0 kernel/fork.c:1153 mmput+0x4e/0x150 kernel/fork.c:1176 exit_mm kernel/exit.c:539 [inline] do_exit+0x9ec/0x2500 kernel/exit.c:859 do_group_exit+0x141/0x310 kernel/exit.c:986 get_signal+0xf7d/0x12e0 kernel/signal.c:2793 arch_do_signal_or_restart+0xe2/0x11d0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0xa2/0xe0 kernel/entry/common.c:169 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:199 syscall_exit_to_user_mode+0x1d/0x40 kernel/entry/common.c:274 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56 Memory state around the buggy address: ffff88813329e700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813329e780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88813329e800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88813329e880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813329e900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs error (device loop1): ext4_free_blocks:5701: comm syz.1.17: Freeing blocks not in datazone - block = 131201685063441, count = 16144 EXT4-fs error (device loop1): ext4_free_blocks:5701: comm syz.1.17: Freeing blocks not in datazone - block = 3418275058153, count = 673 EXT4-fs error (device loop1): ext4_free_blocks:5701: comm syz.1.17: Freeing blocks not in datazone - block = 146132197776029, count = 28395 EXT4-fs error (device loop1): ext4_free_blocks:5701: comm syz.1.17: Freeing blocks not in datazone - block = 111074554508984, count = 15527 EXT4-fs error (device loop1): ext4_free_blocks:5701: comm syz.1.17: Freeing blocks not in datazone - block = 18440372005207, count = 1466 EXT4-fs error (device loop1): ext4_free_blocks:5701: comm syz.1.17: Freeing blocks not in datazone - block = 260072906061061, count = 19238 EXT4-fs error (device loop1): ext4_free_blocks:5701: comm syz.1.17: Freeing blocks not in datazone - block = 178245510106835, count = 10332 EXT4-fs error (device loop1): ext4_free_blocks:5701: comm syz.1.17: Freeing blocks not in datazone - block = 117851022462544, count = 27785