EXT4-fs (loop2): mounted filesystem without journal. Opts: auto_da_alloc,minixdf,,errors=continue. Quota mode: none. ================================================================== BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x1bf6/0x3ea0 fs/ext4/xattr.c:1714 Read of size 6176 at addr ffff88805efa57e0 by task syz.2.101/4670 CPU: 0 PID: 4670 Comm: syz.2.101 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x188/0x250 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+0x235/0x290 mm/kasan/generic.c:189 memmove+0x25/0x60 mm/kasan/shadow.c:54 ext4_xattr_set_entry+0x1bf6/0x3ea0 fs/ext4/xattr.c:1714 ext4_xattr_block_set+0x4fd/0x2d20 fs/ext4/xattr.c:1923 ext4_xattr_set_handle+0xbc4/0x12b0 fs/ext4/xattr.c:2406 ext4_xattr_set+0x242/0x320 fs/ext4/xattr.c:2507 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216 vfs_setxattr+0x167/0x2e0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x36c/0x390 fs/xattr.c:611 path_setxattr+0x147/0x290 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:0x7f9dafbcfcb9 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:00007f9dade2b028 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 00007f9dafe4afa0 RCX: 00007f9dafbcfcb9 RDX: 0000200000000440 RSI: 00002000000000c0 RDI: 0000200000000100 RBP: 00007f9dafc3dbf7 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe37 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9dafe4b038 R14: 00007f9dafe4afa0 R15: 00007ffc1feddd08 The buggy address belongs to the page: page:ffffea00017be940 refcount:2 mapcount:0 mapping:ffff88801d3866b0 index:0x1c pfn:0x5efa5 memcg:ffff88807e528000 aops:def_blk_aops ino:700002 flags: 0xfff0000000203a(referenced|dirty|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000203a ffffea00008d9308 ffffea00017bed88 ffff88801d3866b0 raw: 000000000000001c ffff888025cba9f8 00000002ffffffff ffff88807e528000 page dumped because: kasan: bad access detected 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 4670, ts 70415450511, free_ts 70370376209 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1bbd/0x1ca0 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5487 __page_cache_alloc+0xce/0x440 mm/filemap.c:1022 pagecache_get_page+0x9b6/0xf10 mm/filemap.c:1940 find_or_create_page include/linux/pagemap.h:420 [inline] grow_dev_page fs/buffer.c:949 [inline] grow_buffers fs/buffer.c:1014 [inline] __getblk_slow fs/buffer.c:1041 [inline] __getblk_gfp+0x247/0xb60 fs/buffer.c:1336 sb_getblk include/linux/buffer_head.h:361 [inline] ext4_xattr_block_set+0x1d85/0x2d20 fs/ext4/xattr.c:2104 ext4_xattr_set_handle+0xbc4/0x12b0 fs/ext4/xattr.c:2406 ext4_xattr_set+0x242/0x320 fs/ext4/xattr.c:2507 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216 vfs_setxattr+0x167/0x2e0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x36c/0x390 fs/xattr.c:611 path_setxattr+0x147/0x290 fs/xattr.c:630 __do_sys_setxattr fs/xattr.c:646 [inline] __se_sys_setxattr fs/xattr.c:642 [inline] __x64_sys_setxattr+0xb7/0xd0 fs/xattr.c:642 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_list+0x119/0x820 mm/page_alloc.c:3433 release_pages+0x186c/0x1be0 mm/swap.c:963 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+0x176/0x300 mm/mmu_gather.c:338 exit_mmap+0x3d0/0x640 mm/mmap.c:3218 __mmput+0x115/0x3b0 kernel/fork.c:1127 exit_mm+0x588/0x6e0 kernel/exit.c:550 do_exit+0x5a9/0x20c0 kernel/exit.c:870 do_group_exit+0x12e/0x300 kernel/exit.c:997 get_signal+0x6ca/0x12c0 kernel/signal.c:2900 arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88805efa5f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805efa5f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805efa6000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88805efa6080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805efa6100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================