================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0xa2f/0x1e90 fs/ext4/xattr.c:1719 Read of size 18446744073709551552 at addr ffff88804612c2e8 by task syz.8.1993/11989 CPU: 1 PID: 11989 Comm: syz.8.1993 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:0x7fb4ded8e929 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:00007fb4dfbef038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fb4defb5fa0 RCX: 00007fb4ded8e929 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 00002000000000c0 RBP: 00007fb4dee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb4defb5fa0 R15: 00007ffc12a12318 The buggy address belongs to the physical page: page:ffffea0001184b00 refcount:2 mapcount:0 mapping:ffff888148d3bef8 index:0x2 pfn:0x4612c memcg:ffff8880585f8000 aops:def_blk_aops ino:700008 flags: 0xfff5800000205e(referenced|uptodate|dirty|lru|workingset|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff5800000205e ffffea0001280fc8 ffffea00013fc988 ffff888148d3bef8 raw: 0000000000000002 ffff888073bebe80 00000002ffffffff ffff8880585f8000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x148c40(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL), pid 11990, tgid 11987 (syz.8.1993), ts 760396205138, free_ts 749535647798 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_gfp include/linux/buffer_head.h:363 [inline] ext4_sb_breadahead_unmovable+0x68/0xe0 fs/ext4/super.c:257 __ext4_get_inode_loc+0xaf6/0xdf0 fs/ext4/inode.c:4595 __ext4_get_inode_loc_noinmem fs/ext4/inode.c:4625 [inline] __ext4_iget+0x447/0x3cc0 fs/ext4/inode.c:4867 __ext4_fill_super fs/ext4/super.c:5402 [inline] ext4_fill_super+0x60fd/0x8110 fs/ext4/super.c:5666 get_tree_bdev+0x3f1/0x610 fs/super.c:1366 vfs_get_tree+0x88/0x270 fs/super.c:1573 do_new_mount+0x24a/0xa40 fs/namespace.c:3054 do_mount fs/namespace.c:3397 [inline] __do_sys_mount fs/namespace.c:3605 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3582 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_pages_ok+0xb46/0xc40 mm/page_alloc.c:1715 free_large_kmalloc+0xfd/0x190 mm/slab_common.c:913 rcu_do_batch kernel/rcu/tree.c:2297 [inline] rcu_core+0x9c0/0x16a0 kernel/rcu/tree.c:2557 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 __do_softirq kernel/softirq.c:630 [inline] invoke_softirq kernel/softirq.c:470 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691 Memory state around the buggy address: ffff88804612c180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804612c200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804612c280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88804612c300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804612c380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================