loop0: detected capacity change from 0 to 512 ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x13c0/0x3ef0 fs/ext4/xattr.c:1732 Read of size 18446744073709551584 at addr ffff888125e47fc8 by task syz-executor.0/3485 CPU: 1 PID: 3485 Comm: syz-executor.0 Not tainted 6.1.75-syzkaller-1151070-g68c821783c76 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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+0x13c0/0x3ef0 fs/ext4/xattr.c:1732 ext4_xattr_ibody_set+0x124/0x390 fs/ext4/xattr.c:2237 ext4_xattr_move_to_block fs/ext4/xattr.c:2624 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2692 [inline] ext4_expand_extra_isize_ea+0x1147/0x1c40 fs/ext4/xattr.c:2784 __ext4_expand_extra_isize+0x31a/0x420 fs/ext4/inode.c:5921 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5964 [inline] __ext4_mark_inode_dirty+0x4bb/0x7d0 fs/ext4/inode.c:6042 ext4_inline_data_truncate+0x552/0xd60 fs/ext4/inline.c:2031 ext4_truncate+0x337/0xfb0 fs/ext4/inode.c:4235 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:5520 [inline] ext4_fill_super+0x7d46/0x8460 fs/ext4/super.c:5651 get_tree_bdev+0x440/0x680 fs/super.c:1357 ext4_get_tree+0x1c/0x20 fs/ext4/super.c:5681 vfs_get_tree+0x88/0x290 fs/super.c:1564 do_new_mount+0x2ba/0xb30 fs/namespace.c:3051 path_mount+0x671/0x1070 fs/namespace.c:3381 do_mount fs/namespace.c:3394 [inline] __do_sys_mount fs/namespace.c:3602 [inline] __se_sys_mount+0x2c4/0x3b0 fs/namespace.c:3579 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3579 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f4fc567f46a 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:00007f4fc640fef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f4fc640ff80 RCX: 00007f4fc567f46a RDX: 0000000020000180 RSI: 00000000200000c0 RDI: 00007f4fc640ff40 RBP: 0000000020000180 R08: 00007f4fc640ff80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000200000c0 R13: 00007f4fc640ff40 R14: 000000000000046a R15: 0000000020000300 The buggy address belongs to the physical page: page:ffffea00049791c0 refcount:3 mapcount:1 mapping:ffff888100549c50 index:0x1 pfn:0x125e47 memcg:ffff888109fac000 aops:def_blk_aops ino:700000 flags: 0x560000000002205e(referenced|uptodate|dirty|lru|workingset|private|mappedtodisk|zone=1) raw: 560000000002205e ffffea00047ee788 ffffea00047308c8 ffff888100549c50 raw: 0000000000000001 ffff888112b4b888 0000000300000000 ffff888109fac000 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 3485, tgid 3484 (syz-executor.0), ts 53862176030, free_ts 53854112718 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x213/0x220 mm/page_alloc.c:2590 prep_new_page+0x1b/0x110 mm/page_alloc.c:2597 get_page_from_freelist+0x27ea/0x2870 mm/page_alloc.c:4425 __alloc_pages+0x3a1/0x780 mm/page_alloc.c:5712 __folio_alloc+0x15/0x40 mm/page_alloc.c:5744 __folio_alloc_node include/linux/gfp.h:245 [inline] folio_alloc include/linux/gfp.h:274 [inline] filemap_alloc_folio include/linux/pagemap.h:507 [inline] __filemap_get_folio+0x827/0xae0 mm/filemap.c:1983 pagecache_get_page+0x2f/0x110 mm/folio-compat.c:110 find_or_create_page include/linux/pagemap.h:648 [inline] grow_dev_page fs/buffer.c:989 [inline] grow_buffers fs/buffer.c:1054 [inline] __getblk_slow fs/buffer.c:1081 [inline] __getblk_gfp+0x205/0x7d0 fs/buffer.c:1376 sb_getblk include/linux/buffer_head.h:356 [inline] __ext4_get_inode_loc+0x4ed/0xe40 fs/ext4/inode.c:4502 __ext4_get_inode_loc_noinmem fs/ext4/inode.c:4615 [inline] __ext4_iget+0x4ff/0x3ee0 fs/ext4/inode.c:4837 __ext4_fill_super fs/ext4/super.c:5386 [inline] ext4_fill_super+0x669c/0x8460 fs/ext4/super.c:5651 get_tree_bdev+0x440/0x680 fs/super.c:1357 ext4_get_tree+0x1c/0x20 fs/ext4/super.c:5681 vfs_get_tree+0x88/0x290 fs/super.c:1564 do_new_mount+0x2ba/0xb30 fs/namespace.c:3051 path_mount+0x671/0x1070 fs/namespace.c:3381 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1498 [inline] free_pcp_prepare mm/page_alloc.c:1572 [inline] free_unref_page_prepare+0x83d/0x850 mm/page_alloc.c:3498 free_unref_page_list+0xf1/0x7b0 mm/page_alloc.c:3646 release_pages+0xf7f/0xfe0 mm/swap.c:1063 free_pages_and_swap_cache+0x8a/0xa0 mm/swap_state.c:314 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu mm/mmu_gather.c:261 [inline] tlb_finish_mmu+0x1e0/0x3f0 mm/mmu_gather.c:361 unmap_region+0x2c1/0x310 mm/mmap.c:2405 do_mas_align_munmap+0xd05/0x1400 mm/mmap.c:2672 do_mas_munmap+0x23e/0x2b0 mm/mmap.c:2730 __vm_munmap+0x263/0x3a0 mm/mmap.c:3020 __do_sys_munmap mm/mmap.c:3046 [inline] __se_sys_munmap mm/mmap.c:3042 [inline] __x64_sys_munmap+0x6b/0x80 mm/mmap.c:3042 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888125e47e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888125e47f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888125e47f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888125e48000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888125e48080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop0): ext4_xattr_ibody_find:2213: inode #12: comm syz-executor.0: corrupted in-inode xattr EXT4-fs warning (device loop0): ext4_xattr_set_entry:1745: inode #12: comm syz-executor.0: unable to update i_inline_off EXT4-fs warning (device loop0): ext4_expand_extra_isize_ea:2810: 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.