================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x11f7/0x36c0 fs/ext4/xattr.c:1762 Read of size 18446744073709551552 at addr ffff8881215c12e8 by task syz-executor.0/455 CPU: 0 PID: 455 Comm: syz-executor.0 Not tainted 5.10.237-syzkaller-1007464-g7e2543346ff7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0xe2/0x130 mm/kasan/report.c:452 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x280/0x290 mm/kasan/generic.c:189 memmove+0x2d/0x70 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0x11f7/0x36c0 fs/ext4/xattr.c:1762 ext4_xattr_ibody_set+0x122/0x360 fs/ext4/xattr.c:2243 ext4_xattr_set_handle+0xa7c/0x12a0 fs/ext4/xattr.c:2400 ext4_xattr_set+0x1ec/0x320 fs/ext4/xattr.c:2513 ext4_xattr_trusted_set+0x3b/0x50 fs/ext4/xattr_trusted.c:37 __vfs_setxattr+0x42a/0x480 fs/xattr.c:177 __vfs_setxattr_noperm+0x11e/0x4e0 fs/xattr.c:208 __vfs_setxattr_locked+0x203/0x220 fs/xattr.c:266 vfs_setxattr+0x8d/0x1c0 fs/xattr.c:283 setxattr+0x1a9/0x370 fs/xattr.c:548 path_setxattr+0x110/0x210 fs/xattr.c:567 __do_sys_setxattr fs/xattr.c:582 [inline] __se_sys_setxattr fs/xattr.c:578 [inline] __x64_sys_setxattr+0xc5/0xe0 fs/xattr.c:578 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fdf2c378ae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdf23b1a0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007fdf2c498050 RCX: 00007fdf2c378ae9 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 00000000200002c0 RBP: 00007fdf2c3c447a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fdf2c498050 R15: 00007ffff26bdd08 The buggy address belongs to the page: page:ffffea0004857040 refcount:2 mapcount:0 mapping:ffff888100449390 index:0x2 pfn:0x1215c1 aops:def_blk_aops ino:0 flags: 0x4000000000002036(referenced|uptodate|lru|active|private) raw: 4000000000002036 ffffea000484f188 ffff888104ff2030 ffff888100449390 raw: 0000000000000002 ffff888121d521f8 00000002ffffffff ffff8881059e0000 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8881059e0000 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 452, ts 49434533979, free_ts 49362104417 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5349 __alloc_pages include/linux/gfp.h:544 [inline] __alloc_pages_node include/linux/gfp.h:557 [inline] alloc_pages_node include/linux/gfp.h:571 [inline] alloc_pages include/linux/gfp.h:590 [inline] __page_cache_alloc include/linux/pagemap.h:290 [inline] pagecache_get_page+0x642/0x930 mm/filemap.c:1848 find_or_create_page include/linux/pagemap.h:402 [inline] grow_dev_page fs/buffer.c:976 [inline] grow_buffers fs/buffer.c:1045 [inline] __getblk_slow fs/buffer.c:1072 [inline] __getblk_gfp+0x212/0x780 fs/buffer.c:1370 sb_getblk include/linux/buffer_head.h:361 [inline] __ext4_get_inode_loc+0x45a/0xc20 fs/ext4/inode.c:4443 __ext4_get_inode_loc_noinmem fs/ext4/inode.c:4553 [inline] __ext4_iget+0x46d/0x4030 fs/ext4/inode.c:4798 ext4_orphan_get+0x1e3/0x630 fs/ext4/ialloc.c:1395 ext4_orphan_cleanup+0x663/0xd30 fs/ext4/super.c:3083 ext4_fill_super+0x845b/0x8b60 fs/ext4/super.c:5075 mount_bdev+0x28b/0x3a0 fs/super.c:1442 ext4_mount+0x34/0x40 fs/ext4/super.c:6662 legacy_get_tree+0xed/0x190 fs/fs_context.c:593 vfs_get_tree+0x89/0x260 fs/super.c:1572 do_new_mount+0x25a/0xa20 fs/namespace.c:2918 path_mount+0x572/0xc80 fs/namespace.c:3248 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x12e/0x9b0 mm/page_alloc.c:3443 release_pages+0xe38/0xe80 mm/swap.c:1103 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:356 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+0x175/0x300 mm/mmu_gather.c:326 unmap_region+0x32c/0x380 mm/mmap.c:2799 __do_munmap+0x63c/0x850 mm/mmap.c:3029 __vm_munmap mm/mmap.c:3082 [inline] __do_sys_munmap mm/mmap.c:3108 [inline] __se_sys_munmap+0x127/0x1b0 mm/mmap.c:3104 __x64_sys_munmap+0x5b/0x70 mm/mmap.c:3104 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff8881215c1180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881215c1200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881215c1280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8881215c1300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881215c1380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs warning (device loop0): ext4_update_dynamic_rev:1047: updating to rev 1 because of new feature flag, running e2fsck is recommended