================================================================== BUG: KASAN: use-after-free in ext4_ext_rm_leaf fs/ext4/extents.c:2596 [inline] BUG: KASAN: use-after-free in ext4_ext_remove_space+0x3a6a/0x4920 fs/ext4/extents.c:2934 Read of size 4 at addr ffff88815042fc18 by task syz-executor/21784 CPU: 0 PID: 21784 Comm: syz-executor Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x169/0x1d8 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_rm_leaf fs/ext4/extents.c:2596 [inline] ext4_ext_remove_space+0x3a6a/0x4920 fs/ext4/extents.c:2934 ext4_ext_truncate+0x169/0x1f0 fs/ext4/extents.c:4467 ext4_truncate+0xaea/0x1290 fs/ext4/inode.c:4367 ext4_evict_inode+0xf4f/0x1760 fs/ext4/inode.c:290 evict+0x478/0x910 fs/inode.c:612 iput_final fs/inode.c:1736 [inline] iput+0x638/0x7c0 fs/inode.c:1762 do_unlinkat+0x33f/0x670 fs/namei.c:4042 __do_sys_unlink fs/namei.c:4082 [inline] __se_sys_unlink fs/namei.c:4080 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4080 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f6f804dc157 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:00007ffc4d313c48 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6f804dc157 RDX: 00007ffc4d313c70 RSI: 00007ffc4d313d00 RDI: 00007ffc4d313d00 RBP: 00007ffc4d313d00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffc4d314df0 R13: 00007f6f8055fc05 R14: 00000000000d7e5a R15: 00007ffc4d315ec0 The buggy address belongs to the page: page:ffffea0005410bc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x15042f 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 22726, ts 863626910759, free_ts 864161426959 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+0x2235/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x268/0x5f0 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+0x1b1/0x300 mm/shmem.c:1584 shmem_alloc_and_acct_page+0x36f/0x7b0 mm/shmem.c:1609 shmem_getpage_gfp+0x625/0x2110 mm/shmem.c:1922 shmem_getpage mm/shmem.c:165 [inline] shmem_write_begin+0xce/0x1b0 mm/shmem.c:2501 generic_perform_write+0x2be/0x510 mm/filemap.c:3509 __generic_file_write_iter+0x24b/0x480 mm/filemap.c:3638 generic_file_write_iter+0xa9/0x1d0 mm/filemap.c:3670 __kernel_write+0x55a/0x910 fs/read_write.c:550 dump_emit+0x240/0x360 fs/coredump.c:855 dump_user_range+0x6a/0x1a0 fs/coredump.c:908 elf_core_dump+0x278a/0x2bc0 fs/binfmt_elf.c:2290 do_coredump+0x1ac9/0x27f0 fs/coredump.c:817 __seccomp_filter+0x1816/0x1990 kernel/seccomp.c:1272 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+0x12e/0x9b0 mm/page_alloc.c:3443 release_pages+0xe38/0xe80 mm/swap.c:1103 __pagevec_release+0x71/0xe0 mm/swap.c:1123 pagevec_release include/linux/pagevec.h:88 [inline] shmem_undo_range+0x6e1/0x1760 mm/shmem.c:969 shmem_truncate_range mm/shmem.c:1073 [inline] shmem_evict_inode+0x1fd/0x9c0 mm/shmem.c:1173 evict+0x478/0x910 fs/inode.c:612 iput_final fs/inode.c:1736 [inline] iput+0x638/0x7c0 fs/inode.c:1762 do_unlinkat+0x33f/0x670 fs/namei.c:4042 __do_sys_unlink fs/namei.c:4082 [inline] __se_sys_unlink fs/namei.c:4080 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4080 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff88815042fb00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88815042fb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88815042fc00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88815042fc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88815042fd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================