System zones: 1-12 EXT4-fs (loop3): 1 truncate cleaned up EXT4-fs (loop3): mounted filesystem without journal. Opts: auto_da_alloc=0x0000000000000006,jqfmt=vfsv0,debug_want_extra_isize=0x0000000000000064,debug,i_version,quota,grpid,,errors=continue. Quota mode: writeback. ================================================================== BUG: KASAN: use-after-free in ext4_xattr_rehash fs/ext4/xattr.c:3153 [inline] BUG: KASAN: use-after-free in ext4_xattr_set_entry+0xe22/0x37d0 fs/ext4/xattr.c:1831 Read of size 4 at addr ffff88811b700048 by task syz.3.20/437 CPU: 1 PID: 437 Comm: syz.3.20 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_rehash fs/ext4/xattr.c:3153 [inline] ext4_xattr_set_entry+0xe22/0x37d0 fs/ext4/xattr.c:1831 ext4_xattr_block_set+0x4fc/0x2cb0 fs/ext4/xattr.c:1935 ext4_xattr_set_handle+0xbd5/0x12b0 fs/ext4/xattr.c:2421 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522 ext4_xattr_trusted_set+0x3c/0x50 fs/ext4/xattr_trusted.c:38 __vfs_setxattr+0x3e1/0x430 fs/xattr.c:182 __vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216 __vfs_setxattr_locked+0x212/0x230 fs/xattr.c:277 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+0xc2/0xe0 fs/xattr.c:649 x64_sys_call+0x8cc/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:190 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:0x7ff26adedec9 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:00007ff26ac5e038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 00007ff26b044fa0 RCX: 00007ff26adedec9 RDX: 0000200000000040 RSI: 00002000000000c0 RDI: 0000200000000100 RBP: 00007ff26ae70f91 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe37 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff26b045038 R14: 00007ff26b044fa0 R15: 00007ffe6cecf978 The buggy address belongs to the page: page:ffffea00046dc000 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11b700 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea000478efc8 ffffea00046dc048 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 342, ts 27808586480, free_ts 28340672191 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5808 vm_area_alloc_pages mm/vmalloc.c:-1 [inline] __vmalloc_area_node mm/vmalloc.c:2981 [inline] __vmalloc_node_range+0x505/0xaf0 mm/vmalloc.c:3147 vmalloc_user+0x73/0x80 mm/vmalloc.c:3298 kcov_mmap+0x2b/0x130 kernel/kcov.c:474 call_mmap include/linux/fs.h:2217 [inline] mmap_file+0x60/0xb0 mm/util.c:1099 __mmap_region mm/mmap.c:1808 [inline] mmap_region+0x101c/0x1800 mm/mmap.c:2959 do_mmap+0x812/0xf10 mm/mmap.c:1598 vm_mmap_pgoff+0x1ce/0x410 mm/util.c:555 ksys_mmap_pgoff+0x161/0x1d0 mm/mmap.c:1647 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 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:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534 free_unref_page+0xa2/0x550 mm/page_alloc.c:3616 free_the_page mm/page_alloc.c:805 [inline] __free_pages+0x6c/0x100 mm/page_alloc.c:5884 __vunmap+0x84d/0x9e0 mm/vmalloc.c:2660 __vfree mm/vmalloc.c:2709 [inline] vfree+0x8b/0xc0 mm/vmalloc.c:2740 kcov_put kernel/kcov.c:417 [inline] kcov_close+0x2b/0x50 kernel/kcov.c:519 __fput+0x20b/0x8b0 fs/file_table.c:311 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xa7e/0x27a0 kernel/exit.c:889 do_group_exit+0x141/0x310 kernel/exit.c:1003 get_signal+0x66a/0x1480 kernel/signal.c:2907 arch_do_signal_or_restart+0xc1/0x10f0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0xa7/0xe0 kernel/entry/common.c:178 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307 Memory state around the buggy address: ffff88811b6fff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811b6fff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88811b700000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88811b700080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88811b700100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================