================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0xa2f/0x1e90 fs/ext4/xattr.c:1720 Read of size 18446744073709551576 at addr ffff888047d5e2d0 by task syz.5.1047/10117 CPU: 0 PID: 10117 Comm: syz.5.1047 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189 memmove+0x25/0x60 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0xa2f/0x1e90 fs/ext4/xattr.c:1720 ext4_xattr_ibody_set+0x250/0x690 fs/ext4/xattr.c:2230 ext4_xattr_move_to_block fs/ext4/xattr.c:2633 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2701 [inline] ext4_expand_extra_isize_ea+0x10e5/0x19b0 fs/ext4/xattr.c:2793 __ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:5980 ext4_try_to_expand_extra_isize fs/ext4/inode.c:6023 [inline] __ext4_mark_inode_dirty+0x47f/0x770 fs/ext4/inode.c:6101 ext4_dirty_inode+0xbf/0x100 fs/ext4/inode.c:6133 __mark_inode_dirty+0x2eb/0xe90 fs/fs-writeback.c:2443 generic_update_time fs/inode.c:1946 [inline] inode_update_time fs/inode.c:1959 [inline] touch_atime+0x3a7/0x620 fs/inode.c:2031 file_accessed include/linux/fs.h:2600 [inline] filemap_read+0x2d0b/0x2f80 mm/filemap.c:2836 generic_file_read_iter+0x115/0x670 mm/filemap.c:2941 __kernel_read+0x2dc/0x6b0 fs/read_write.c:428 integrity_kernel_read+0x86/0xd0 security/integrity/iint.c:228 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0x96b/0x17c0 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x4b3/0xac0 security/integrity/ima/ima_api.c:293 process_measurement+0xfae/0x1a10 security/integrity/ima/ima_main.c:351 ima_file_check+0xc2/0x100 security/integrity/ima/ima_main.c:534 do_open fs/namei.c:3636 [inline] path_openat+0x2679/0x2e70 fs/namei.c:3791 do_filp_open+0x1c1/0x3c0 fs/namei.c:3818 do_sys_openat2+0x142/0x490 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1347 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7ffb2d78f749 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:00007ffb2b9d5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007ffb2d9e6180 RCX: 00007ffb2d78f749 RDX: 0000000000008042 RSI: 00002000000000c0 RDI: ffffffffffffff9c RBP: 00007ffb2d813f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffb2d9e6218 R14: 00007ffb2d9e6180 R15: 00007ffe0b7cd938 The buggy address belongs to the physical page: page:ffffea00011f5780 refcount:2 mapcount:0 mapping:ffff8880178287f8 index:0x2 pfn:0x47d5e memcg:ffff8880262d0000 aops:def_blk_aops ino:700005 flags: 0xfff5800000205e(referenced|uptodate|dirty|lru|workingset|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff5800000205e ffffea00017a5308 ffffea00014fc988 ffff8880178287f8 raw: 0000000000000002 ffff88807064aae0 00000002ffffffff ffff8880262d0000 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_NOFAIL|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 10107, tgid 10103 (syz.5.1047), ts 499735622344, free_ts 499723772208 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 folio_alloc+0x1c/0x60 mm/mempolicy.c:2292 filemap_alloc_folio+0xdb/0x460 mm/filemap.c:999 __filemap_get_folio+0x697/0xdd0 mm/filemap.c:1993 pagecache_get_page+0x26/0x250 mm/folio-compat.c:110 find_or_create_page include/linux/pagemap.h:648 [inline] grow_dev_page fs/buffer.c:946 [inline] grow_buffers fs/buffer.c:1011 [inline] __getblk_slow fs/buffer.c:1038 [inline] __getblk_gfp+0x2d8/0xb20 fs/buffer.c:1333 sb_getblk include/linux/buffer_head.h:356 [inline] __ext4_get_inode_loc+0x474/0xdf0 fs/ext4/inode.c:4518 ext4_get_inode_loc fs/ext4/inode.c:4646 [inline] ext4_reserve_inode_write+0x10a/0x290 fs/ext4/inode.c:5919 __ext4_mark_inode_dirty+0x16e/0x770 fs/ext4/inode.c:6096 __ext4_new_inode+0x3085/0x3a20 fs/ext4/ialloc.c:1350 ext4_create+0x22a/0x460 fs/ext4/namei.c:2883 lookup_open fs/namei.c:3490 [inline] open_last_lookups fs/namei.c:3558 [inline] path_openat+0x1187/0x2e70 fs/namei.c:3788 do_filp_open+0x1c1/0x3c0 fs/namei.c:3818 do_sys_openat2+0x142/0x490 fs/open.c:1320 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3525 release_pages+0x1f92/0x2200 mm/swap.c:1035 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu+0xff/0x210 mm/mmu_gather.c:261 tlb_finish_mmu+0xbd/0x1c0 mm/mmu_gather.c:361 exit_mmap+0x343/0x8e0 mm/mmap.c:3262 __mmput+0x118/0x3c0 kernel/fork.c:1200 exit_mm+0x1e6/0x2c0 kernel/exit.c:565 do_exit+0x8c1/0x2400 kernel/exit.c:867 do_group_exit+0x217/0x2d0 kernel/exit.c:1022 __do_sys_exit_group kernel/exit.c:1033 [inline] __se_sys_exit_group kernel/exit.c:1031 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1031 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888047d5e180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888047d5e200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888047d5e280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888047d5e300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888047d5e380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================