==================================================================
BUG: KASAN: use-after-free in ext4_ext_remove_space+0x3170/0x4280
Read of size 4 at addr ffff8881a98c3c18 by task syz-executor/5813

CPU: 1 UID: 0 PID: 5813 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_report+0xba/0x230
 kasan_report+0x117/0x150
 ext4_ext_remove_space+0x3170/0x4280
 ext4_ext_truncate+0x17e/0x2f0
 ext4_truncate+0xb63/0x13b0
 ext4_evict_inode+0x863/0xeb0
 evict+0x61e/0xb10
 __dentry_kill+0x1a2/0x5e0
 finish_dput+0xc9/0x480
 ovl_stack_put+0x6a/0xa0
 ovl_destroy_inode+0xaa/0x150
 evict+0x8d4/0xb10
 __dentry_kill+0x1a2/0x5e0
 shrink_kill+0xa9/0x2c0
 shrink_dentry_list+0x2e0/0x5e0
 shrink_dcache_tree+0xcf/0x310
 shrink_dcache_for_umount+0xa8/0x1f0
 generic_shutdown_super+0x6f/0x2d0
 kill_anon_super+0x3b/0x70
 deactivate_locked_super+0xbc/0x130
 cleanup_mnt+0x437/0x4d0
 task_work_run+0x1d9/0x270
 exit_to_user_mode_loop+0xed/0x480
 do_syscall_64+0x32d/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7c76d9d9d7
Code: a2 c7 05 1c fd 24 00 00 00 00 00 eb 96 e8 e1 12 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 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:00007fff0538ed48 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f7c76d9d9d7
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007fff0538ee00
RBP: 00007fff0538ee00 R08: 00007fff0538fe00 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff0538fef0
R13: 00007f7c76e32050 R14: 00000000000173eb R15: 00007fff05390fc0
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x7f1 pfn:0x1a98c3
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0006a63088 ffffea0006a63108 0000000000000000
raw: 00000000000007f1 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 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 7096, tgid 7094 (syz.3.174), ts 93825570295, free_ts 94370847975
 post_alloc_hook+0x231/0x280
 get_page_from_freelist+0x24dc/0x2580
 __alloc_frozen_pages_noprof+0x18d/0x380
 alloc_pages_mpol+0x232/0x4a0
 folio_alloc_mpol_noprof+0x39/0x70
 shmem_alloc_and_add_folio+0x445/0xf80
 shmem_get_folio_gfp+0x5a9/0x1670
 shmem_write_begin+0x16c/0x330
 generic_perform_write+0x2e2/0x8f0
 shmem_file_write_iter+0xf8/0x120
 vfs_write+0x61d/0xb90
 ksys_write+0x150/0x270
 do_syscall_64+0x14d/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 7096 tgid 7094 stack trace:
 free_unref_folios+0xed5/0x16d0
 folios_put_refs+0x789/0x8d0
 shmem_undo_range+0x52c/0x1660
 shmem_evict_inode+0x240/0x9e0
 evict+0x61e/0xb10
 __dentry_kill+0x1a2/0x5e0
 finish_dput+0xc9/0x480
 __fput+0x691/0xa70
 task_work_run+0x1d9/0x270
 exit_to_user_mode_loop+0xed/0x480
 do_syscall_64+0x32d/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8881a98c3b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881a98c3b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881a98c3c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                            ^
 ffff8881a98c3c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881a98c3d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
