EXT4-fs error (device loop0): ext4_xattr_inode_iget:437: inode #11: comm syz.0.0: missing EA_INODE flag EXT4-fs error (device loop0): ext4_xattr_inode_iget:442: comm syz.0.0: error while reading EA inode 11 err=-117 warning: `syz.0.0' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211 ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x92b/0x1ed0 fs/ext4/xattr.c:1767 Read of size 18446744073709551600 at addr ffff88800bf1c2b8 by task syz.0.0/5334 CPU: 0 UID: 0 PID: 5334 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200 __asan_memmove+0x29/0x70 mm/kasan/shadow.c:94 ext4_xattr_set_entry+0x92b/0x1ed0 fs/ext4/xattr.c:1767 ext4_xattr_ibody_set+0x262/0x710 fs/ext4/xattr.c:2277 ext4_destroy_inline_data_nolock+0x23a/0x5f0 fs/ext4/inline.c:471 ext4_convert_inline_data_nolock+0x208/0x980 fs/ext4/inline.c:1132 ext4_convert_inline_data+0x484/0x5c0 fs/ext4/inline.c:2012 ext4_fallocate+0x1e2/0x400 fs/ext4/extents.c:4979 vfs_fallocate+0x65a/0x7e0 fs/open.c:338 ioctl_preallocate fs/ioctl.c:289 [inline] file_ioctl+0x65d/0x7d0 fs/ioctl.c:334 do_vfs_ioctl+0xc27/0x1530 fs/ioctl.c:576 __do_sys_ioctl fs/ioctl.c:595 [inline] __se_sys_ioctl+0x82/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f79a879e159 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:00007f79a4bf4fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f79a8a26180 RCX: 00007f79a879e159 RDX: 0000200000000180 RSI: 0000000040305839 RDI: 000000000000000e RBP: 00007f79a883506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f79a8a26218 R14: 00007f79a8a26180 R15: 00007ffc26d820a8 The buggy address belongs to the physical page: page: refcount:2 mapcount:0 mapping:ffff88801d025940 index:0x2 pfn:0xbf1c memcg:ffff8880122f1900 aops:def_blk_aops ino:700000 dentry name(?):"" flags: 0xfff28000014234(referenced|dirty|lru|workingset|private|reclaim|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff28000014234 ffff88801ce95980 ffffea00003a6c88 ffff88801d025940 raw: 0000000000000002 ffff888043e02d20 00000002ffffffff ffff8880122f1900 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_MOVABLE|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL), pid 5325, tgid 5324 (syz.0.0), ts 126816289555 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436 alloc_pages_mpol+0x21e/0x390 mm/mempolicy.c:2486 alloc_frozen_pages_noprof mm/mempolicy.c:2557 [inline] alloc_pages_noprof+0xb1/0x2b0 mm/mempolicy.c:2577 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2587 filemap_alloc_folio_noprof+0x111/0x460 mm/filemap.c:1019 __filemap_get_folio_mpol+0x402/0x1000 mm/filemap.c:2018 __filemap_get_folio include/linux/pagemap.h:761 [inline] grow_dev_folio fs/buffer.c:858 [inline] grow_buffers fs/buffer.c:924 [inline] __getblk_slow fs/buffer.c:942 [inline] bdev_getblk+0x1f4/0x6e0 fs/buffer.c:1346 __getblk include/linux/buffer_head.h:378 [inline] sb_getblk include/linux/buffer_head.h:384 [inline] __ext4_get_inode_loc+0x56c/0xf40 fs/ext4/inode.c:4921 ext4_get_inode_loc fs/ext4/inode.c:5049 [inline] ext4_reserve_inode_write+0x18b/0x360 fs/ext4/inode.c:6511 ext4_xattr_set_handle+0x5b0/0x15f0 fs/ext4/xattr.c:2401 __ext4_set_acl+0x5fe/0x6e0 fs/ext4/acl.c:217 ext4_set_acl+0x380/0x550 fs/ext4/acl.c:259 set_posix_acl fs/posix_acl.c:960 [inline] vfs_remove_acl+0x55c/0x850 fs/posix_acl.c:1247 ovl_do_remove_acl fs/overlayfs/overlayfs.h:362 [inline] ovl_workdir_create+0x53a/0x8b0 fs/overlayfs/super.c:369 page last free pid 5334 tgid 5324 ts 126811055793 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] free_unref_folios+0xdc2/0x14e0 mm/page_alloc.c:3022 folios_put_refs+0x9e9/0xb30 mm/folio.c:1036 folio_batch_release include/linux/folio_batch.h:101 [inline] truncate_inode_pages_range+0x3ca/0xd80 mm/truncate.c:408 truncate_inode_pages mm/truncate.c:485 [inline] truncate_pagecache+0x6c/0x90 mm/truncate.c:798 ext4_setattr+0x109f/0x1df0 fs/ext4/inode.c:6214 notify_change+0xbba/0xea0 fs/attr.c:556 do_truncate+0x1c2/0x250 fs/open.c:68 handle_truncate fs/namei.c:4300 [inline] do_open fs/namei.c:4841 [inline] path_openat+0x15b5/0x1d60 fs/namei.c:5000 do_file_open+0x23e/0x4a0 fs/namei.c:5029 do_sys_openat2+0x115/0x200 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_open fs/open.c:1431 [inline] __se_sys_open fs/open.c:1427 [inline] __x64_sys_open+0x11e/0x150 fs/open.c:1427 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88800bf1c180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88800bf1c200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88800bf1c280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88800bf1c300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88800bf1c380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================