loop0: detected capacity change from 0 to 512 ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0xa87/0x1fa0 fs/ext4/xattr.c:1710 Read of size 18446744073709551584 at addr ffff888122b8afc8 by task syz-executor.0/3552 CPU: 0 PID: 3552 Comm: syz-executor.0 Not tainted 6.1.124-syzkaller-1167536-g7658169f5f5f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x158/0x4e0 mm/kasan/report.c:427 kasan_report+0x13c/0x170 mm/kasan/report.c:531 kasan_check_range+0x294/0x2a0 mm/kasan/generic.c:189 memmove+0x2d/0x70 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0xa87/0x1fa0 fs/ext4/xattr.c:1710 ext4_xattr_ibody_set+0x24e/0x6d0 fs/ext4/xattr.c:2220 ext4_xattr_move_to_block fs/ext4/xattr.c:2623 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2691 [inline] ext4_expand_extra_isize_ea+0x1147/0x1c40 fs/ext4/xattr.c:2783 __ext4_expand_extra_isize+0x31a/0x420 fs/ext4/inode.c:5938 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5981 [inline] __ext4_mark_inode_dirty+0x4bb/0x7d0 fs/ext4/inode.c:6059 ext4_inline_data_truncate+0x552/0xd60 fs/ext4/inline.c:2050 ext4_truncate+0x337/0xfb0 fs/ext4/inode.c:4246 ext4_process_orphan+0x1d3/0x2f0 fs/ext4/orphan.c:339 ext4_orphan_cleanup+0xa50/0x11b0 fs/ext4/orphan.c:474 __ext4_fill_super fs/ext4/super.c:5509 [inline] ext4_fill_super+0x7d3d/0x8450 fs/ext4/super.c:5640 get_tree_bdev+0x440/0x680 fs/super.c:1368 ext4_get_tree+0x1c/0x20 fs/ext4/super.c:5670 vfs_get_tree+0x88/0x290 fs/super.c:1575 do_new_mount+0x2ba/0xb30 fs/namespace.c:3056 path_mount+0x671/0x1070 fs/namespace.c:3386 do_mount fs/namespace.c:3399 [inline] __do_sys_mount fs/namespace.c:3607 [inline] __se_sys_mount+0x2c4/0x3b0 fs/namespace.c:3584 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3584 x64_sys_call+0x49d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:166 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fc97367f46a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc9731feef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fc9731fef80 RCX: 00007fc97367f46a RDX: 0000000020000180 RSI: 00000000200000c0 RDI: 00007fc9731fef40 RBP: 0000000020000180 R08: 00007fc9731fef80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000200000c0 R13: 00007fc9731fef40 R14: 000000000000046a R15: 0000000020000300 The buggy address belongs to the physical page: page:ffffea00048ae280 refcount:3 mapcount:1 mapping:ffff88810b984950 index:0x1 pfn:0x122b8a memcg:ffff8881118d2000 aops:def_blk_aops ino:700000 flags: 0x660000000002205e(referenced|uptodate|dirty|lru|workingset|private|mappedtodisk|zone=1) raw: 660000000002205e ffff888111a78290 ffffea00043fac48 ffff88810b984950 raw: 0000000000000001 ffff8881197359d8 0000000300000000 ffff8881118d2000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 3553, tgid 3551 (syz-executor.0), ts 65607066567, free_ts 65607015697 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x213/0x220 mm/page_alloc.c:2605 prep_new_page+0x1b/0x110 mm/page_alloc.c:2612 get_page_from_freelist+0x2f41/0x2fc0 mm/page_alloc.c:4477 __alloc_pages+0x234/0x610 mm/page_alloc.c:5775 __folio_alloc+0x15/0x40 mm/page_alloc.c:5807 __folio_alloc_node include/linux/gfp.h:245 [inline] folio_alloc include/linux/gfp.h:274 [inline] filemap_alloc_folio include/linux/pagemap.h:513 [inline] page_cache_ra_unbounded+0x2cb/0x800 mm/readahead.c:260 do_page_cache_ra mm/readahead.c:312 [inline] page_cache_ra_order+0x987/0xc40 mm/readahead.c:576 do_sync_mmap_readahead+0x97c/0xcc0 mm/filemap.c:3163 filemap_fault+0x744/0x11a0 mm/filemap.c:3255 __do_fault mm/memory.c:4359 [inline] do_read_fault mm/memory.c:4725 [inline] do_fault+0xbc5/0x1f10 mm/memory.c:4861 handle_pte_fault mm/memory.c:5157 [inline] __handle_mm_fault mm/memory.c:5299 [inline] handle_mm_fault+0x189f/0x30e0 mm/memory.c:5439 faultin_page mm/gup.c:1009 [inline] __get_user_pages+0x377/0xf20 mm/gup.c:1233 populate_vma_page_range mm/gup.c:1590 [inline] __mm_populate+0x375/0x570 mm/gup.c:1704 mm_populate include/linux/mm.h:3061 [inline] vm_mmap_pgoff+0x290/0x430 mm/util.c:530 ksys_mmap_pgoff+0x15d/0x1e0 mm/mmap.c:1520 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x103/0x120 arch/x86/kernel/sys_x86_64.c:86 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1513 [inline] free_pcp_prepare mm/page_alloc.c:1587 [inline] free_unref_page_prepare+0x9f1/0xa00 mm/page_alloc.c:3526 free_unref_page+0xb2/0x5c0 mm/page_alloc.c:3622 free_the_page mm/page_alloc.c:798 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5864 pte_free include/asm-generic/pgalloc.h:102 [inline] do_fault+0x13d2/0x1f10 mm/memory.c:4869 handle_pte_fault mm/memory.c:5157 [inline] __handle_mm_fault mm/memory.c:5299 [inline] handle_mm_fault+0x189f/0x30e0 mm/memory.c:5439 faultin_page mm/gup.c:1009 [inline] __get_user_pages+0x377/0xf20 mm/gup.c:1233 populate_vma_page_range mm/gup.c:1590 [inline] __mm_populate+0x375/0x570 mm/gup.c:1704 mm_populate include/linux/mm.h:3061 [inline] vm_mmap_pgoff+0x290/0x430 mm/util.c:530 ksys_mmap_pgoff+0x15d/0x1e0 mm/mmap.c:1520 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x103/0x120 arch/x86/kernel/sys_x86_64.c:86 x64_sys_call+0x67/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888122b8ae80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888122b8af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888122b8af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888122b8b000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888122b8b080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs error (device loop0): ext4_xattr_ibody_find:2186: inode #12: comm syz-executor.0: corrupted in-inode xattr EXT4-fs warning (device loop0): ext4_xattr_set_entry:1723: inode #12: comm syz-executor.0: unable to update i_inline_off EXT4-fs warning (device loop0): ext4_expand_extra_isize_ea:2809: Unable to expand inode 12. Delete some EAs or run e2fsck. EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop0): mounted filesystem without journal. Quota mode: writeback.