================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x11b3/0x3a60 fs/ext4/xattr.c:1731 Read of size 18446744073709551600 at addr ffff88811b8278d0 by task syz.3.352/1875 CPU: 1 PID: 1875 Comm: syz.3.352 Not tainted 5.10.232-syzkaller-00746-g49e8ba0a684f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189 memmove+0x2d/0x70 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0x11b3/0x3a60 fs/ext4/xattr.c:1731 ext4_xattr_ibody_set+0x124/0x390 fs/ext4/xattr.c:2234 ext4_destroy_inline_data_nolock+0x1d3/0x5d0 fs/ext4/inline.c:447 ext4_convert_inline_data_nolock+0x3d8/0xd80 fs/ext4/inline.c:1240 ext4_convert_inline_data+0x4cf/0x610 fs/ext4/inline.c:2052 ext4_fallocate+0x149/0x1cc0 fs/ext4/extents.c:4750 vfs_fallocate+0x492/0x570 fs/open.c:310 ksys_fallocate fs/open.c:333 [inline] __do_sys_fallocate fs/open.c:341 [inline] __se_sys_fallocate fs/open.c:339 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:339 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f5875785d29 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:00007f5873df7038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f5875975fa0 RCX: 00007f5875785d29 RDX: 0000000000008416 RSI: 0000000000000001 RDI: 0000000000000009 RBP: 00007f5875801b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f5875975fa0 R15: 00007ffe614df418 The buggy address belongs to the page: page:ffffea00046e09c0 refcount:3 mapcount:1 mapping:ffff888110355390 index:0x5 pfn:0x11b827 aops:def_blk_aops ino:0 flags: 0x400000000032201e(referenced|uptodate|dirty|lru|private|mappedtodisk|unevictable|mlocked) raw: 400000000032201e ffffea0004bb24c8 ffffea00046e9dc8 ffff888110355390 raw: 0000000000000005 ffff888132050738 0000000300000000 ffff88810faa6000 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88810faa6000 page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x108c40(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL), pid 1875, ts 77576522921, free_ts 77464126649 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 __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+0x669/0x950 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+0x221/0x7e0 fs/buffer.c:1370 sb_getblk_gfp include/linux/buffer_head.h:368 [inline] ext4_sb_breadahead_unmovable+0x6a/0xe0 fs/ext4/super.c:240 __ext4_get_inode_loc+0x9f1/0xbf0 fs/ext4/inode.c:4521 __ext4_get_inode_loc_noinmem fs/ext4/inode.c:4552 [inline] __ext4_iget+0x516/0x41f0 fs/ext4/inode.c:4777 ext4_quota_enable fs/ext4/super.c:6423 [inline] ext4_enable_quotas+0x56f/0x9f0 fs/ext4/super.c:6459 ext4_fill_super+0x86dc/0x9150 fs/ext4/super.c:5060 mount_bdev+0x262/0x370 fs/super.c:1442 ext4_mount+0x34/0x40 fs/ext4/super.c:6638 legacy_get_tree+0xf1/0x190 fs/fs_context.c:593 vfs_get_tree+0x88/0x290 fs/super.c:1572 do_new_mount+0x2ba/0xb30 fs/namespace.c:2917 path_mount+0x56f/0xcb0 fs/namespace.c:3247 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+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x122/0xb20 mm/page_alloc.c:3443 release_pages+0xea0/0xef0 mm/swap.c:1103 free_pages_and_swap_cache+0x8a/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+0x177/0x320 mm/mmu_gather.c:326 exit_mmap+0x306/0x560 mm/mmap.c:3375 __mmput+0x95/0x2d0 kernel/fork.c:1153 mmput+0x59/0x170 kernel/fork.c:1176 exit_mm kernel/exit.c:539 [inline] do_exit+0xbda/0x2a50 kernel/exit.c:850 do_group_exit+0x141/0x310 kernel/exit.c:985 get_signal+0x10a0/0x1410 kernel/signal.c:2793 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0xa2/0x1a0 kernel/entry/common.c:274 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff88811b827780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811b827800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88811b827880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88811b827900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811b827980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs error (device loop3): ext4_xattr_ibody_find:2210: inode #15: comm syz.3.352: corrupted in-inode xattr EXT4-fs warning (device loop3): ext4_xattr_set_entry:1744: inode #15: comm syz.3.352: unable to update i_inline_off