==================================================================
BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x92b/0x1ed0
Read of size 18446744073709551600 at addr ffff8881a21176b8 by task syz.6.240/7265

CPU: 1 UID: 0 PID: 7265 Comm: syz.6.240 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_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 kasan_check_range+0x264/0x2c0
 __asan_memmove+0x29/0x70
 ext4_xattr_set_entry+0x92b/0x1ed0
 ext4_xattr_ibody_set+0x262/0x710
 ext4_destroy_inline_data_nolock+0x23a/0x5f0
 ext4_convert_inline_data_to_extent+0x549/0xde0
 ext4_write_begin+0x349/0x1850
 generic_perform_write+0x2d5/0x8f0
 ext4_buffered_write_iter+0xcb/0x370
 ext4_file_write_iter+0x947/0x1c70
 iter_file_splice_write+0xa31/0x1240
 direct_splice_actor+0x101/0x160
 splice_direct_to_actor+0x57b/0xcb0
 do_splice_direct+0x195/0x290
 do_sendfile+0x52e/0x7c0
 __se_sys_sendfile64+0x144/0x1a0
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f85f979ce59
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:00007f85fa637028 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f85f9a15fa0 RCX: 00007f85f979ce59
RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000005
RBP: 00007f85f9832e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020fffe82 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f85f9a16038 R14: 00007f85f9a15fa0 R15: 00007fffda188e08
 </TASK>

The buggy address belongs to the physical page:
page: refcount:2 mapcount:0 mapping:ffff888107849fc0 index:0xc pfn:0x1a2117
memcg:ffff88810b696b00
aops:def_blk_aops ino:700006 dentry name(?):""
flags: 0x57ff58000004234(referenced|dirty|lru|workingset|private|node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff58000004234 ffffea0005b8b9c8 ffffea0006884588 ffff888107849fc0
raw: 000000000000000c ffff8881a6819c40 00000002ffffffff ffff88810b696b00
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Movable, gfp_mask 0x148c48(GFP_NOFS|__GFP_MOVABLE|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL), pid 7265, tgid 7264 (syz.6.240), ts 127021427008, free_ts 127016677506
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x21fa/0x2270
 __alloc_frozen_pages_noprof+0x18d/0x380
 alloc_pages_mpol+0x212/0x380
 alloc_pages_noprof+0xac/0x2a0
 folio_alloc_noprof+0x1e/0x30
 filemap_alloc_folio_noprof+0x111/0x470
 __filemap_get_folio_mpol+0x402/0x1000
 bdev_getblk+0x1f4/0x6e0
 __ext4_get_inode_loc+0x56c/0xf40
 ext4_reserve_inode_write+0x18b/0x360
 __ext4_mark_inode_dirty+0x13e/0x700
 ext4_mkdir+0x4fa/0xca0
 vfs_mkdir+0x406/0x620
 filename_mkdirat+0x285/0x510
 __se_sys_mkdir+0x34/0x150
page last free pid 7265 tgid 7264 stack trace:
 free_unref_folios+0xd84/0x14a0
 folios_put_refs+0x9e9/0xb30
 shmem_undo_range+0x4e6/0x15d0
 shmem_evict_inode+0x280/0xa80
 evict+0x624/0xb50
 dentry_kill+0x1b9/0x880
 finish_dput+0x1a/0x260
 __fput+0x675/0xa50
 fput_close_sync+0x11f/0x240
 __x64_sys_close+0x7e/0x110
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8881a2117580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8881a2117600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881a2117680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                        ^
 ffff8881a2117700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8881a2117780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
