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

CPU: 0 UID: 0 PID: 6926 Comm: syz.9.148 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_destroy_inline_data+0x83/0xe0
 ext4_do_writepages+0x57f/0x44a0
 ext4_writepages+0x1fe/0x4e0
 do_writepages+0x338/0x560
 file_write_and_wait_range+0x36e/0x440
 ext4_sync_file+0x252/0xa40
 ext4_buffered_write_iter+0x471/0x540
 ext4_file_write_iter+0xae4/0x1cd0
 do_iter_readv_writev+0x612/0x8c0
 vfs_writev+0x343/0x990
 do_pwritev+0x1a9/0x2d0
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4e3eb9f559
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:00007f4e3fae1028 EFLAGS: 00000246 ORIG_RAX: 0000000000000148
RAX: ffffffffffffffda RBX: 00007f4e3ee25fa0 RCX: 00007f4e3eb9f559
RDX: 0000000000000001 RSI: 0000200000011ec0 RDI: 0000000000000005
RBP: 00007f4e3ec36b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000e7b R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4e3ee26038 R14: 00007f4e3ee25fa0 R15: 00007fffcc5fb3b8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:2 mapcount:0 mapping:ffff8881078708c0 index:0x2 pfn:0x11a517
memcg:ffff88816a6a8e80
aops:def_blk_aops ino:700009 dentry name(?):""
flags: 0x17ff58000000234(referenced|dirty|lru|workingset|node=0|zone=2|lastcpupid=0x7ff)
raw: 017ff58000000234 ffff8881125182a8 ffff8881125182a8 ffff8881078708c0
raw: 0000000000000002 ffff888115cef7e0 00000002ffffffff ffff88816a6a8e80
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 6926, tgid 6925 (syz.9.148), ts 99681348216
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x220f/0x2280
 __alloc_frozen_pages_noprof+0x1fe/0x410
 alloc_pages_mpol+0x21e/0x390
 alloc_pages_noprof+0xb1/0x2b0
 folio_alloc_noprof+0x1e/0x30
 filemap_alloc_folio_noprof+0x111/0x460
 __filemap_get_folio_mpol+0x3fd/0xff0
 bdev_getblk+0x1ec/0x670
 __ext4_get_inode_loc+0x56c/0xf40
 ext4_get_inode_loc+0x81/0xf0
 ext4_xattr_ibody_get+0x113/0x4b0
 ext4_xattr_get+0x121/0x690
 __vfs_getxattr+0x412/0x440
 cap_inode_need_killpriv+0x45/0x60
 security_inode_need_killpriv+0x85/0x240
page last free pid 6926 tgid 6925 ts 99509123090 stack trace:
 free_unref_folios+0xdc6/0x14e0
 folios_put_refs+0x9e9/0xb30
 shmem_undo_range+0x547/0x15d0
 shmem_evict_inode+0x240/0xb00
 evict+0x624/0xb50
 dentry_kill+0x1b9/0x910
 finish_dput+0x1a/0x260
 __fput+0x65b/0xa40
 fput_close_sync+0x11f/0x240
 __se_sys_close+0xa2/0x160
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff88811a517d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88811a517e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88811a517e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                        ^
 ffff88811a517f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88811a517f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
