EXT4-fs error (device loop7): ext4_mb_mark_diskspace_used:3885: comm syz.7.1853: Allocating blocks 497-513 which overlap fs metadata EXT4-fs (loop7): pa ffff88814d8a75e8: logic 128, phys. 385, len 8 EXT4-fs error (device loop7): ext4_mb_release_inode_pa:4902: group 0, free 0, pa_free 1 ================================================================== BUG: KASAN: use-after-free in ext4_ext_rm_leaf fs/ext4/extents.c:2601 [inline] BUG: KASAN: use-after-free in ext4_ext_remove_space+0x3496/0x40d0 fs/ext4/extents.c:2939 Read of size 4 at addr ffff888174a4bc18 by task syz.7.1853/5479 CPU: 0 PID: 5479 Comm: syz.7.1853 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_rm_leaf fs/ext4/extents.c:2601 [inline] ext4_ext_remove_space+0x3496/0x40d0 fs/ext4/extents.c:2939 ext4_ext_truncate+0x1a3/0x250 fs/ext4/extents.c:4479 ext4_truncate+0x9be/0xfb0 fs/ext4/inode.c:4287 ext4_truncate_failed_write fs/ext4/truncate.h:22 [inline] ext4_write_begin+0xad4/0x12e0 fs/ext4/inode.c:1276 ext4_da_write_begin+0x321/0xbf0 fs/ext4/inode.c:2988 generic_perform_write+0x2b7/0x690 mm/filemap.c:3870 ext4_buffered_write_iter+0x4ed/0x670 fs/ext4/file.c:270 ext4_file_write_iter+0x440/0x1540 fs/ext4/file.c:-1 call_write_iter include/linux/fs.h:2212 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x835/0xfd0 fs/read_write.c:594 ksys_pwrite64 fs/read_write.c:701 [inline] __do_sys_pwrite64 fs/read_write.c:711 [inline] __se_sys_pwrite64 fs/read_write.c:708 [inline] __x64_sys_pwrite64+0x197/0x220 fs/read_write.c:708 x64_sys_call+0xa6/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:19 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7eff55a42799 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:00007eff5449d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007eff55cbbfa0 RCX: 00007eff55a42799 RDX: 00000000200000c1 RSI: 00002000000000c0 RDI: 0000000000000006 RBP: 00007eff55ad8c99 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000009000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007eff55cbc038 R14: 00007eff55cbbfa0 R15: 00007fffd92c3288 The buggy address belongs to the page: page:ffffea0005d292c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x174a4b flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea0005d29308 ffffea0005d29288 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 5445, ts 154749115580, free_ts 155222481581 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2d3a/0x2dc0 mm/page_alloc.c:4485 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5822 __alloc_pages_node include/linux/gfp.h:595 [inline] alloc_pages_node include/linux/gfp.h:609 [inline] alloc_pages include/linux/gfp.h:622 [inline] shmem_alloc_page mm/shmem.c:1591 [inline] shmem_alloc_and_acct_page+0x4a2/0x8d0 mm/shmem.c:1616 shmem_getpage_gfp+0xfe5/0x2310 mm/shmem.c:1912 shmem_getpage mm/shmem.c:156 [inline] shmem_fallocate+0x882/0xd20 mm/shmem.c:2764 vfs_fallocate+0x4b4/0x590 fs/open.c:309 ksys_fallocate fs/open.c:332 [inline] __do_sys_fallocate fs/open.c:340 [inline] __se_sys_fallocate fs/open.c:338 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:338 x64_sys_call+0x7ec/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:286 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534 free_unref_page_list+0x13a/0x9d0 mm/page_alloc.c:3671 release_pages+0x1006/0x1060 mm/swap.c:1015 __pagevec_release+0x71/0xe0 mm/swap.c:1035 pagevec_release include/linux/pagevec.h:81 [inline] shmem_undo_range+0x595/0x1470 mm/shmem.c:969 shmem_fallocate+0xc06/0xd20 mm/shmem.c:2769 vfs_fallocate+0x4b4/0x590 fs/open.c:309 ksys_fallocate fs/open.c:332 [inline] __do_sys_fallocate fs/open.c:340 [inline] __se_sys_fallocate fs/open.c:338 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:338 x64_sys_call+0x7ec/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:286 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888174a4bb00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888174a4bb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888174a4bc00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888174a4bc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888174a4bd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================