==================================================================
BUG: KASAN: use-after-free in ext4_find_extent+0xaea/0xcc0
Read of size 4 at addr ffff88811e2eb018 by task syz.4.69/6453

CPU: 1 UID: 0 PID: 6453 Comm: syz.4.69 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_find_extent+0xaea/0xcc0
 ext4_ext_map_blocks+0x283/0x58b0
 ext4_map_query_blocks+0x13b/0xa00
 ext4_map_blocks+0x444/0x11d0
 _ext4_get_block+0x1e3/0x470
 ext4_block_write_begin+0xb14/0x1950
 ext4_write_begin+0xb40/0x18c0
 ext4_da_write_begin+0x355/0xd80
 generic_perform_write+0x2e2/0x8f0
 ext4_buffered_write_iter+0xce/0x3a0
 ext4_file_write_iter+0x298/0x1bf0
 vfs_write+0x61d/0xb90
 __x64_sys_pwrite64+0x199/0x230
 do_syscall_64+0x14d/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd68319c799
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:00007fd683fd1028 EFLAGS: 00000246 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffda RBX: 00007fd683415fa0 RCX: 00007fd68319c799
RDX: 0000000000000001 RSI: 0000200000000000 RDI: 000000000000000a
RBP: 00007fd683232c99 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000004fed0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd683416038 R14: 00007fd683415fa0 R15: 00007ffedb677138
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x220 pfn:0x11e2eb
flags: 0x17ff00000000000(node=0|zone=2|lastcpupid=0x7ff)
raw: 017ff00000000000 ffffea000478bb08 ffffea000478ba88 0000000000000000
raw: 0000000000000220 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 6453, tgid 6452 (syz.4.69), ts 88870541546, free_ts 89120043505
 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 6453 tgid 6452 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
 fput_close_sync+0x11f/0x240
 __x64_sys_close+0x7e/0x110
 do_syscall_64+0x14d/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff88811e2eaf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88811e2eaf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811e2eb000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                            ^
 ffff88811e2eb080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88811e2eb100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
