================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x1390/0x3d30 fs/ext4/xattr.c:1747 Read of size 18446744073709551588 at addr ffff8880558450c4 by task syz.4.668/8723 CPU: 1 PID: 8723 Comm: syz.4.668 Not tainted 5.15.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 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+0x1390/0x3d30 fs/ext4/xattr.c:1747 ext4_xattr_ibody_set+0x112/0x330 fs/ext4/xattr.c:2252 ext4_xattr_move_to_block fs/ext4/xattr.c:2639 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2707 [inline] ext4_expand_extra_isize_ea+0xf9a/0x19a0 fs/ext4/xattr.c:2799 __ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:5886 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5929 [inline] __ext4_mark_inode_dirty+0x469/0x700 fs/ext4/inode.c:6007 ext4_dirty_inode+0xbf/0x100 fs/ext4/inode.c:6039 __mark_inode_dirty+0x2b0/0xc60 fs/fs-writeback.c:2464 mark_inode_dirty include/linux/fs.h:2467 [inline] ext4_setattr+0x90e/0x19e0 fs/ext4/inode.c:5592 notify_change+0xbcd/0xee0 fs/attr.c:505 chmod_common+0x24c/0x3f0 fs/open.c:582 do_fchmodat+0xca/0x190 fs/open.c:621 __do_sys_chmod fs/open.c:639 [inline] __se_sys_chmod fs/open.c:637 [inline] __x64_sys_chmod+0x5c/0x70 fs/open.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f5186ceb969 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:00007f5184b32038 EFLAGS: 00000246 ORIG_RAX: 000000000000005a RAX: ffffffffffffffda RBX: 00007f5186f13080 RCX: 00007f5186ceb969 RDX: 0000000000000000 RSI: 0000000000000130 RDI: 0000200000000000 RBP: 00007f5186d6dab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f5186f13080 R15: 00007ffd5834ede8 The buggy address belongs to the page: page:ffffea0001561140 refcount:2 mapcount:0 mapping:ffff888016c91470 index:0x2 pfn:0x55845 memcg:ffff88802ac24000 aops:def_blk_aops ino:700004 flags: 0xfff00000002014(uptodate|lru|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002014 ffffea000165f648 ffffea0001744048 ffff888016c91470 raw: 0000000000000002 ffff88804f52be80 00000002ffffffff ffff88802ac24000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x108c48(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), pid 8703, ts 254249567111, free_ts 254242152875 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 __page_cache_alloc+0xd2/0x3f0 mm/filemap.c:1022 pagecache_get_page+0x986/0xef0 mm/filemap.c:1940 find_or_create_page include/linux/pagemap.h:420 [inline] grow_dev_page fs/buffer.c:949 [inline] grow_buffers fs/buffer.c:1014 [inline] __getblk_slow fs/buffer.c:1041 [inline] __getblk_gfp+0x249/0xb70 fs/buffer.c:1336 sb_getblk include/linux/buffer_head.h:361 [inline] __ext4_get_inode_loc+0x461/0xcd0 fs/ext4/inode.c:4326 __ext4_get_inode_loc_noinmem fs/ext4/inode.c:4434 [inline] __ext4_iget+0x447/0x3cc0 fs/ext4/inode.c:4684 ext4_lookup+0x3b9/0x840 fs/ext4/namei.c:1858 __lookup_slow+0x27d/0x3d0 fs/namei.c:1663 lookup_slow+0x53/0x70 fs/namei.c:1680 walk_component+0x319/0x460 fs/namei.c:1976 lookup_last fs/namei.c:2431 [inline] path_lookupat+0x169/0x440 fs/namei.c:2455 filename_lookup+0x1e2/0x4f0 fs/namei.c:2484 user_path_at_empty+0x40/0x190 fs/namei.c:2883 user_path_at include/linux/namei.h:57 [inline] path_setxattr+0xae/0x280 fs/xattr.c:625 __do_sys_setxattr fs/xattr.c:646 [inline] __se_sys_setxattr fs/xattr.c:642 [inline] __x64_sys_setxattr+0xb7/0xd0 fs/xattr.c:642 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x122/0x7e0 mm/page_alloc.c:3433 release_pages+0x184b/0x1bb0 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x164/0x2e0 mm/mmu_gather.c:338 exit_mmap+0x3a6/0x5f0 mm/mmap.c:3206 __mmput+0x115/0x3b0 kernel/fork.c:1127 exit_mm+0x567/0x6c0 kernel/exit.c:550 do_exit+0x599/0x20a0 kernel/exit.c:861 do_group_exit+0x12e/0x300 kernel/exit.c:996 __do_sys_exit_group kernel/exit.c:1007 [inline] __se_sys_exit_group kernel/exit.c:1005 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1005 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888055844f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888055845000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888055845080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888055845100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888055845180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================