EXT4-fs (loop7): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.
overlayfs: failed to resolve './file1/file0': -20
==================================================================
BUG: KASAN: use-after-free in ext4_find_extent+0xaea/0xcc0
Read of size 4 at addr ffff88811a742018 by task syz.7.123/6841

CPU: 0 UID: 0 PID: 6841 Comm: syz.7.123 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_remove_space+0x469/0x4280
 ext4_punch_hole+0x936/0xe80
 ext4_fallocate+0x370/0x3d0
 vfs_fallocate+0x669/0x7e0
 file_ioctl+0x63f/0x860
 do_vfs_ioctl+0xc26/0x1530
 __se_sys_ioctl+0x82/0x170
 do_syscall_64+0x14d/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7facb459c799
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:00007facb5399028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007facb4815fa0 RCX: 00007facb459c799
RDX: 0000200000000140 RSI: 0000000040305829 RDI: 0000000000000004
RBP: 00007facb4632c99 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007facb4816038 R14: 00007facb4815fa0 R15: 00007fff4a90f5c8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x924 pfn:0x11a742
flags: 0x17ff00000000000(node=0|zone=2|lastcpupid=0x7ff)
raw: 017ff00000000000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000924 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 6796, tgid 6795 (syz.1.113), ts 94600147297, free_ts 95198625824
 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 5809 tgid 5809 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:
 ffff88811a741f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88811a741f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811a742000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                            ^
 ffff88811a742080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88811a742100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
