EXT4-fs (loop4): mounted filesystem without journal. Opts: init_itable=0x0000000000000000,jqfmt=vfsold,debug_want_extra_isize=0x000000000000006a,user_xattr,errors=remount-ro,quota,. Quota mode: writeback. ================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x1390/0x3d30 fs/ext4/xattr.c:1747 Read of size 18446744073709551540 at addr ffff888078944070 by task syz.4.180/4991 CPU: 0 PID: 4991 Comm: syz.4.180 Not tainted 5.15.186-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189 memmove+0x25/0x60 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0x1390/0x3d30 fs/ext4/xattr.c:1747 ext4_xattr_block_set+0x973/0x2d30 fs/ext4/xattr.c:2004 ext4_xattr_set_handle+0xba5/0x12b0 fs/ext4/xattr.c:2412 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216 vfs_setxattr+0x168/0x2f0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x2da/0x300 fs/xattr.c:611 path_setxattr+0x142/0x280 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __x64_sys_lsetxattr+0xb4/0xd0 fs/xattr.c:649 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f18b7b2f929 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:00007f18b5997038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 00007f18b7d56fa0 RCX: 00007f18b7b2f929 RDX: 0000200000000040 RSI: 0000200000000300 RDI: 0000200000000100 RBP: 00007f18b7bb1b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe37 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f18b7d56fa0 R15: 00007fffd87f1df8 Allocated by task 4991: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmemdup+0x22/0x50 mm/util.c:128 ext4_xattr_block_set+0x883/0x2d30 fs/ext4/xattr.c:1952 ext4_xattr_set_handle+0xba5/0x12b0 fs/ext4/xattr.c:2412 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216 vfs_setxattr+0x168/0x2f0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x2da/0x300 fs/xattr.c:611 path_setxattr+0x142/0x280 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __x64_sys_lsetxattr+0xb4/0xd0 fs/xattr.c:649 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888078944000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 112 bytes inside of 1024-byte region [ffff888078944000, ffff888078944400) The buggy address belongs to the page: page:ffffea0001e25000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78940 head:ffffea0001e25000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 0000000100000001 ffff888016841dc0 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3868, ts 26894100253, free_ts 26827296818 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x1cd/0x330 mm/slub.c:4403 kmalloc include/linux/slab.h:609 [inline] load_elf_phdrs fs/binfmt_elf.c:480 [inline] load_elf_binary+0x279/0x2890 fs/binfmt_elf.c:860 search_binary_handler fs/exec.c:1742 [inline] exec_binprm fs/exec.c:1783 [inline] bprm_execve+0xa92/0x17d0 fs/exec.c:1852 do_execveat_common+0x51e/0x6d0 fs/exec.c:1957 do_execve fs/exec.c:2027 [inline] __do_sys_execve fs/exec.c:2103 [inline] __se_sys_execve fs/exec.c:2098 [inline] __x64_sys_execve+0x8e/0xa0 fs/exec.c:2098 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 free_slab mm/slub.c:2015 [inline] discard_slab mm/slub.c:2021 [inline] __unfreeze_partials+0x1a5/0x200 mm/slub.c:2507 put_cpu_partial+0x12d/0x190 mm/slub.c:2587 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x127/0x330 mm/slub.c:4403 kmalloc include/linux/slab.h:609 [inline] tomoyo_realpath_from_path+0x118/0x610 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1cd/0x510 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x120 security/security.c:1348 vfs_getattr+0x26/0x3a0 fs/stat.c:157 vfs_fstat fs/stat.c:182 [inline] __do_sys_newfstat fs/stat.c:421 [inline] __se_sys_newfstat fs/stat.c:418 [inline] __x64_sys_newfstat+0x104/0x1d0 fs/stat.c:418 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888078943f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888078943f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888078944000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888078944080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888078944100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================