==================================================================
BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x9c1/0x1e20
Read of size 18446744073709551600 at addr ffff888128af65d0 by task syz.4.502/8318

CPU: 1 UID: 0 PID: 8318 Comm: syz.4.502 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
 kasan_check_range+0x2b0/0x2c0
 __asan_memmove+0x29/0x70
 ext4_xattr_set_entry+0x9c1/0x1e20
 ext4_xattr_ibody_set+0x254/0x6a0
 ext4_destroy_inline_data_nolock+0x214/0x5b0
 ext4_convert_inline_data_to_extent+0x540/0xdd0
 ext4_write_begin+0x382/0x19a0
 ext4_da_write_begin+0x445/0xda0
 generic_perform_write+0x2c5/0x900
 ext4_buffered_write_iter+0xce/0x3a0
 ext4_file_write_iter+0x298/0x1bc0
 aio_write+0x535/0x7a0
 io_submit_one+0x78b/0x1310
 __se_sys_io_submit+0x185/0x2f0
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5a2ef8ebe9
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:00007f5a2fdcb038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1
RAX: ffffffffffffffda RBX: 00007f5a2f1c6090 RCX: 00007f5a2ef8ebe9
RDX: 0000200000000540 RSI: 000000000000003b RDI: 00007f5a2fdcc000
RBP: 00007f5a2f011e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5a2f1c6128 R14: 00007f5a2f1c6090 R15: 00007ffe0f174288
 </TASK>

The buggy address belongs to the physical page:
page: refcount:3 mapcount:0 mapping:ffff88810341f000 index:0x2 pfn:0x128af6
memcg:ffff88811ae81a00
aops:def_blk_aops ino:700004 dentry name(?):""
flags: 0x57ff18000004204(referenced|workingset|private|node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff18000004204 0000000000000000 dead000000000122 ffff88810341f000
raw: 0000000000000002 ffff88803832e488 00000003ffffffff ffff88811ae81a00
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 8318, tgid 8299 (syz.4.502), ts 208303185016, free_ts 207968397050
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 alloc_pages_noprof+0xa9/0x190
 folio_alloc_noprof+0x1e/0x30
 filemap_alloc_folio_noprof+0xdf/0x470
 __filemap_get_folio+0x3f2/0xaf0
 bdev_getblk+0x1ad/0x660
 __ext4_get_inode_loc+0x561/0x1040
 ext4_reserve_inode_write+0x18b/0x360
 __ext4_mark_inode_dirty+0x15b/0x700
 ext4_dirty_inode+0xd0/0x110
 __mark_inode_dirty+0x2ec/0xe10
 file_modified_flags+0x4b0/0x560
 ext4_write_checks+0x240/0x2c0
page last free pid 5858 tgid 5858 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:
 ffff888128af6480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888128af6500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888128af6580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                                 ^
 ffff888128af6600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888128af6680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
