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

CPU: 1 UID: 0 PID: 9142 Comm: syz.4.398 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_destroy_inline_data+0x83/0xe0
 ext4_do_writepages+0x526/0x4610
 ext4_writepages+0x205/0x350
 do_writepages+0x32e/0x550
 file_write_and_wait_range+0x23e/0x340
 generic_buffers_fsync_noflush+0x6c/0x180
 ext4_sync_file+0x332/0xb20
 ext4_buffered_write_iter+0x2ca/0x3a0
 ext4_file_write_iter+0x298/0x1bc0
 iter_file_splice_write+0x975/0x10e0
 direct_splice_actor+0x101/0x160
 splice_direct_to_actor+0x5a8/0xcc0
 do_splice_direct+0x181/0x270
 do_sendfile+0x4da/0x7e0
 __se_sys_sendfile64+0xd9/0x190
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f991bd8ec29
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:00007f991cbf0038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f991bfd5fa0 RCX: 00007f991bd8ec29
RDX: 0000200000000080 RSI: 0000000000000004 RDI: 0000000000000004
RBP: 00007f991be11e41 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000040e8 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f991bfd6038 R14: 00007f991bfd5fa0 R15: 00007ffecf73bfd8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:2 mapcount:0 mapping:ffff88801dc8fb80 index:0x2 pfn:0x11c926
memcg:ffff88801b6f2700
aops:def_blk_aops ino:700004 dentry name(?):""
flags: 0x57ff58000004234(referenced|dirty|lru|workingset|private|node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff58000004234 ffff8881000e9bd0 ffff8881000e9bd0 ffff88801dc8fb80
raw: 0000000000000002 ffff88811aa19000 00000002ffffffff ffff88801b6f2700
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 9142, tgid 9141 (syz.4.398), ts 206114478114, free_ts 206110814220
 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_get_inode_loc+0x81/0xf0
 ext4_xattr_ibody_get+0x111/0x510
 ext4_xattr_get+0x123/0x6a0
 vfs_getxattr_alloc+0x42e/0x580
 ima_read_xattr+0x38/0x60
 process_measurement+0xfd7/0x1a40
page last free pid 9142 tgid 9141 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
 fput_close_sync+0x119/0x200
 __x64_sys_close+0x7f/0x110
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff88811c926d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88811c926e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88811c926e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                        ^
 ffff88811c926f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88811c926f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
