================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0xa2f/0x1e90 fs/ext4/xattr.c:1719 Read of size 18446744073709551552 at addr ffff8880341142e8 by task syz.0.326/6182 CPU: 1 PID: 6182 Comm: syz.0.326 Not tainted 6.1.141-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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/0x220 mm/kasan/report.c:427 kasan_report+0x10b/0x140 mm/kasan/report.c:531 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:1719 ext4_xattr_ibody_set+0x250/0x690 fs/ext4/xattr.c:2229 ext4_xattr_move_to_block fs/ext4/xattr.c:2632 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2700 [inline] ext4_expand_extra_isize_ea+0x10e5/0x19b0 fs/ext4/xattr.c:2792 __ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:5965 ext4_try_to_expand_extra_isize fs/ext4/inode.c:6008 [inline] __ext4_mark_inode_dirty+0x47f/0x770 fs/ext4/inode.c:6086 ext4_setattr+0x1457/0x19f0 fs/ext4/inode.c:5596 notify_change+0xc74/0xf40 fs/attr.c:499 do_truncate+0x197/0x220 fs/open.c:65 handle_truncate fs/namei.c:3285 [inline] do_open fs/namei.c:3630 [inline] path_openat+0x27f2/0x2e70 fs/namei.c:3783 do_filp_open+0x1c1/0x3c0 fs/namei.c:3810 do_sys_openat2+0x142/0x490 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_creat fs/open.c:1412 [inline] __se_sys_creat fs/open.c:1406 [inline] __x64_sys_creat+0x8c/0xb0 fs/open.c:1406 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:0x7f3067b8e929 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:00007f306898d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f3067db6160 RCX: 00007f3067b8e929 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 00002000000000c0 RBP: 00007f3067c10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3067db6160 R15: 00007ffcfcfbc828 The buggy address belongs to the physical page: page:ffffea0000d04500 refcount:3 mapcount:0 mapping:ffff88801788c9f8 index:0x2 pfn:0x34114 memcg:ffff88807677e000 aops:def_blk_aops ino:700000 flags: 0xfff5800000a056(referenced|uptodate|lru|workingset|private|writeback|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff5800000a056 ffffea0001946988 ffff8880783001f8 ffff88801788c9f8 raw: 0000000000000002 ffff888045844740 00000003ffffffff ffff88807677e000 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 6182, tgid 6125 (syz.0.326), ts 241845729498, free_ts 0 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:646 [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:4512 ext4_get_inode_loc fs/ext4/inode.c:4640 [inline] ext4_reserve_inode_write+0x10a/0x290 fs/ext4/inode.c:5904 __ext4_mark_inode_dirty+0x16e/0x770 fs/ext4/inode.c:6081 __ext4_new_inode+0x3085/0x3a20 fs/ext4/ialloc.c:1350 ext4_create+0x22a/0x460 fs/ext4/namei.c:2883 lookup_open fs/namei.c:3482 [inline] open_last_lookups fs/namei.c:3550 [inline] path_openat+0x1187/0x2e70 fs/namei.c:3780 do_filp_open+0x1c1/0x3c0 fs/namei.c:3810 do_sys_openat2+0x142/0x490 fs/open.c:1318 page_owner free stack trace missing Memory state around the buggy address: ffff888034114180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888034114200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888034114280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888034114300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888034114380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================