================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0xaf2/0x21d0 fs/ext4/xattr.c:1708 Read of size 18446744073709551600 at addr ffff88813f2df2b8 by task syz.7.847/3304 CPU: 0 PID: 3304 Comm: syz.7.847 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x71/0x200 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:420 kasan_report+0x122/0x150 mm/kasan/report.c:524 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x249/0x2a0 mm/kasan/generic.c:189 memmove+0x2d/0x70 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0xaf2/0x21d0 fs/ext4/xattr.c:1708 ext4_xattr_ibody_set+0x24e/0x6c0 fs/ext4/xattr.c:2215 ext4_destroy_inline_data_nolock+0x234/0x5d0 fs/ext4/inline.c:468 ext4_convert_inline_data_to_extent fs/ext4/inline.c:620 [inline] ext4_try_to_write_inline_data+0x75a/0x12e0 fs/ext4/inline.c:761 ext4_write_begin+0x1f0/0xf90 fs/ext4/inode.c:1205 generic_perform_write+0x32d/0x740 mm/filemap.c:3910 ext4_buffered_write_iter+0x367/0x630 fs/ext4/file.c:285 ext4_file_write_iter+0x191/0x1500 fs/ext4/file.c:-1 do_iter_readv_writev fs/read_write.c:-1 [inline] do_iter_write+0x665/0xb40 fs/read_write.c:861 vfs_writev+0x339/0x5f0 fs/read_write.c:934 do_pwritev fs/read_write.c:1031 [inline] __do_sys_pwritev2 fs/read_write.c:1090 [inline] __se_sys_pwritev2+0x1af/0x2b0 fs/read_write.c:1081 __x64_sys_pwritev2+0xbf/0xd0 fs/read_write.c:1081 x64_sys_call+0x2d6/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:329 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7ff57679c819 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff5776f6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007ff576a16180 RCX: 00007ff57679c819 RDX: 0000000000000001 RSI: 0000200000000240 RDI: 0000000000000008 RBP: 00007ff576832c91 R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000002000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff576a16218 R14: 00007ff576a16180 R15: 00007ffd42676998 The buggy address belongs to the physical page: page:ffffea0004fcb7c0 refcount:2 mapcount:0 mapping:ffff88810aeff650 index:0x2 pfn:0x13f2df memcg:ffff888112b67500 aops:def_blk_aops ino:700007 flags: 0x4e0000000000205a(referenced|dirty|lru|workingset|private|zone=1) raw: 4e0000000000205a ffffea0004ba4708 ffffea0004a34048 ffff88810aeff650 raw: 0000000000000002 ffff888118187540 00000002ffffffff ffff888112b67500 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 3304, tgid 3291 (syz.7.847), ts 174839857243, free_ts 174836091118 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2670 prep_new_page+0x1c/0x110 mm/page_alloc.c:2677 get_page_from_freelist+0x2d12/0x2d80 mm/page_alloc.c:4583 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5924 __folio_alloc+0x12/0x40 mm/page_alloc.c:5957 __folio_alloc_node include/linux/gfp.h:245 [inline] folio_alloc include/linux/gfp.h:274 [inline] filemap_alloc_folio include/linux/pagemap.h:515 [inline] __filemap_get_folio+0x6ee/0xa60 mm/filemap.c:2019 pagecache_get_page+0x2b/0x110 mm/folio-compat.c:110 find_or_create_page include/linux/pagemap.h:656 [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+0x217/0x7d0 fs/buffer.c:1376 sb_getblk include/linux/buffer_head.h:356 [inline] __ext4_get_inode_loc+0x481/0xdf0 fs/ext4/inode.c:4520 ext4_get_inode_loc+0x81/0xf0 fs/ext4/inode.c:4648 ext4_xattr_ibody_get+0x122/0x4e0 fs/ext4/xattr.c:594 ext4_xattr_get+0x122/0x650 fs/ext4/xattr.c:655 ext4_xattr_security_get+0x32/0x40 fs/ext4/xattr_security.c:20 __vfs_getxattr+0x3b1/0x3e0 fs/xattr.c:407 cap_inode_need_killpriv+0x45/0x60 security/commoncap.c:301 security_inode_need_killpriv+0x73/0xa0 security/security.c:1436 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1578 [inline] free_pcp_prepare mm/page_alloc.c:1652 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3618 free_unref_page_list+0x117/0x8c0 mm/page_alloc.c:3769 release_pages+0xaf2/0xb50 mm/swap.c:1048 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:316 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+0x1aa/0x370 mm/mmu_gather.c:361 exit_mmap+0x412/0xc10 mm/mmap.c:3384 __mmput+0x93/0x360 kernel/fork.c:1312 mmput+0x4b/0x150 kernel/fork.c:1336 exit_mm kernel/exit.c:568 [inline] do_exit+0x994/0x2660 kernel/exit.c:873 do_group_exit+0x210/0x2d0 kernel/exit.c:1028 __do_sys_exit_group kernel/exit.c:1039 [inline] __se_sys_exit_group kernel/exit.c:1037 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1037 x64_sys_call+0x7b4/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88813f2df180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813f2df200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88813f2df280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88813f2df300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813f2df380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== syz.7.847: attempt to access beyond end of device loop7: rw=2049, sector=74, nr_sectors = 8 limit=64 EXT4-fs warning (device loop7): ext4_end_bio:347: I/O error 10 writing to inode 15 starting block 37) Buffer I/O error on device loop7, logical block 37 Buffer I/O error on device loop7, logical block 38 Buffer I/O error on device loop7, logical block 39 Buffer I/O error on device loop7, logical block 40 EXT4-fs (loop7): unmounting filesystem.