EXT4-fs (loop6): stripe (2) is not aligned with cluster size (16), stripe is disabled
EXT4-fs (loop6): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.
==================================================================
BUG: KASAN: use-after-free in ext4_find_extent+0xae6/0xcc0
Read of size 4 at addr ffff8881318a5e18 by task syz.6.483/8414

CPU: 1 UID: 0 PID: 8414 Comm: syz.6.483 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+0x189/0x250
 print_report+0xca/0x240
 kasan_report+0x118/0x150
 ext4_find_extent+0xae6/0xcc0
 ext4_ext_map_blocks+0x288/0x6ac0
 ext4_map_blocks+0x860/0x1740
 _ext4_get_block+0x200/0x4c0
 ext4_get_block_unwritten+0x2e/0x100
 ext4_block_write_begin+0x993/0x1710
 ext4_page_mkwrite+0x760/0x1190
 do_page_mkwrite+0x14d/0x310
 do_wp_page+0x268d/0x5800
 __handle_mm_fault+0x1033/0x5440
 handle_mm_fault+0x40a/0x8e0
 do_user_addr_fault+0x764/0x1390
 exc_page_fault+0x76/0xf0
 asm_exc_page_fault+0x26/0x30
RIP: 0010:rep_movs_alternative+0x75/0x90
Code: 05 c3 cc cc cc cc 48 8b 06 48 89 07 48 8d 47 08 48 83 e0 f8 48 29 f8 48 01 c7 48 01 c6 48 29 c1 48 89 c8 48 c1 e9 03 83 e0 07 <f3> 48 a5 89 c1 85 c9 75 91 c3 cc cc cc cc 48 8d 0c c8 eb 86 cc cc
RSP: 0018:ffffc90002bafb98 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000841 RCX: 00000000000000f0
RDX: 0000000000000000 RSI: ffff88811fd200c0 RDI: 0000200000001000
RBP: ffff88811fd20000 R08: ffff88811fd20840 R09: 1ffff11023fa4108
R10: dffffc0000000000 R11: ffffed1023fa4109 R12: 0000200000001781
R13: 00007ffffffff000 R14: ffff88811fd20000 R15: 0000200000000f40
 _copy_to_user+0x8a/0xb0
 do_getxattr+0x22a/0x320
 filename_getxattr+0x111/0x210
 __x64_sys_lgetxattr+0x1c6/0x210
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fcf3998ebe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fcf3a768038 EFLAGS: 00000246 ORIG_RAX: 00000000000000c0
RAX: ffffffffffffffda RBX: 00007fcf39bc5fa0 RCX: 00007fcf3998ebe9
RDX: 0000200000000f40 RSI: 0000200000000280 RDI: 0000200000000240
RBP: 00007fcf39a11e19 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffff92 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fcf39bc6038 R14: 00007fcf39bc5fa0 R15: 00007ffdea68e428
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xd1 pfn:0x1318a5
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0004c62908 ffffea0004c62988 0000000000000000
raw: 00000000000000d1 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 8398, tgid 8397 (syz.9.472), ts 195890260900, free_ts 197143572103
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 folio_alloc_mpol_noprof+0x39/0x70
 shmem_alloc_and_add_folio+0x447/0xf60
 shmem_get_folio_gfp+0x59d/0x1660
 shmem_write_begin+0xf7/0x2b0
 generic_perform_write+0x2c5/0x900
 shmem_file_write_iter+0xf8/0x120
 vfs_write+0x5c9/0xb30
 ksys_write+0x145/0x250
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 8296 tgid 8296 stack trace:
 free_unref_folios+0xdbd/0x1520
 folios_put_refs+0x559/0x640
 shmem_undo_range+0x49e/0x14b0
 shmem_evict_inode+0x272/0xa70
 evict+0x504/0x9c0
 __dentry_kill+0x209/0x660
 dput+0x19f/0x2b0
 __fput+0x68e/0xa70
 task_work_run+0x1d4/0x260
 exit_to_user_mode_loop+0xec/0x110
 do_syscall_64+0x2bd/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8881318a5d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881318a5d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881318a5e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                            ^
 ffff8881318a5e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881318a5f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
