================================================================== 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+0x2f43/0x3fb0 fs/ext4/extents.c:2940 Read of size 4 at addr ffff88812ddf5db8 by task syz-executor/462 CPU: 0 PID: 462 Comm: syz-executor Not tainted 6.1.145-syzkaller-1169984-g3b4ff5af8d36 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x71/0x210 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:427 kasan_report+0x122/0x150 mm/kasan/report.c:531 __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+0x2f43/0x3fb0 fs/ext4/extents.c:2940 ext4_ext_truncate+0x200/0x320 fs/ext4/extents.c:4470 ext4_truncate+0x9a6/0xf90 fs/ext4/inode.c:4291 ext4_evict_inode+0xcc3/0x1460 fs/ext4/inode.c:286 evict+0x493/0x890 fs/inode.c:705 iput_final fs/inode.c:1834 [inline] iput+0x620/0x670 fs/inode.c:1860 do_unlinkat+0x375/0x6b0 fs/namei.c:4396 __do_sys_unlink fs/namei.c:4437 [inline] __se_sys_unlink fs/namei.c:4435 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4435 x64_sys_call+0x958/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:88 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fa423b8df57 Code: 73 01 c3 48 c7 c1 a8 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 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd767b7f38 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa423b8df57 RDX: 00007ffd767b7f60 RSI: 00007ffd767b7ff0 RDI: 00007ffd767b7ff0 RBP: 00007ffd767b7ff0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffd767b90e0 R13: 00007fa423c10b55 R14: 000000000000cc19 R15: 00007ffd767ba1b0 The buggy address belongs to the physical page: page:ffffea0004b77d40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12ddf5 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea0004b77d48 ffffea0004b77d48 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff88812ddf5c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88812ddf5d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88812ddf5d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88812ddf5e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88812ddf5e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs (loop2): unmounting filesystem. EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 130220965612224, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 130220965586783, count = 25454 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 130220965586768, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 56311859664480, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 56311859650608, count = 13878 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 56311859650608, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 112589990710368, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 112589990684262, count = 26122 EXT4-fs error: 34866 callbacks suppressed EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 104927652638560, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 104592895498096, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 104592895472479, count = 25632 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 104592895472464, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 112589198695824, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 112589198669624, count = 26214 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 112589198669616, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 126877799852432, count = 16 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 126877799822382, count = 30060 EXT4-fs error (device loop2): ext4_free_blocks:6210: comm syz-executor: Freeing blocks not in datazone - block = 126877799822368, count = 16