EXT4-fs (loop8): mounted filesystem without journal. Opts: auto_da_alloc,mblk_io_submit,,errors=continue ================================================================== BUG: KASAN: use-after-free in ext4_xattr_rehash fs/ext4/xattr.c:3124 [inline] BUG: KASAN: use-after-free in ext4_xattr_set_entry+0xe2f/0x3860 fs/ext4/xattr.c:1813 Read of size 4 at addr ffff88812dde4030 by task syz.8.326/1660 CPU: 1 PID: 1660 Comm: syz.8.326 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0xe2/0x130 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_rehash fs/ext4/xattr.c:3124 [inline] ext4_xattr_set_entry+0xe2f/0x3860 fs/ext4/xattr.c:1813 ext4_xattr_block_set+0x4e0/0x2a80 fs/ext4/xattr.c:1916 ext4_xattr_set_handle+0xbc4/0x12b0 fs/ext4/xattr.c:2398 ext4_xattr_set+0x1f4/0x310 fs/ext4/xattr.c:2499 ext4_xattr_trusted_set+0x3b/0x50 fs/ext4/xattr_trusted.c:37 __vfs_setxattr+0x42a/0x480 fs/xattr.c:177 __vfs_setxattr_noperm+0x11e/0x4e0 fs/xattr.c:208 __vfs_setxattr_locked+0x203/0x220 fs/xattr.c:266 vfs_setxattr+0x8d/0x1c0 fs/xattr.c:283 setxattr+0x1df/0x3f0 fs/xattr.c:548 path_setxattr+0x11f/0x230 fs/xattr.c:567 __do_sys_lsetxattr fs/xattr.c:589 [inline] __se_sys_lsetxattr fs/xattr.c:585 [inline] __x64_sys_lsetxattr+0xc2/0xe0 fs/xattr.c:585 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f976a1d4819 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:00007f9768c2f028 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 00007f976a44dfa0 RCX: 00007f976a1d4819 RDX: 0000200000000800 RSI: 0000200000000100 RDI: 0000200000000040 RBP: 00007f976a26ac91 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe37 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f976a44e038 R14: 00007f976a44dfa0 R15: 00007ffef6c2f928 The buggy address belongs to the page: page:ffffea0004b77900 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x12dde4 flags: 0x4000000000000000() raw: 4000000000000000 ffffea0004b77948 ffff8881f715ab70 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x8100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|0x8000000), pid 1648, ts 99448678869, free_ts 99486240363 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x223b/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x290/0x620 mm/page_alloc.c:5384 __alloc_pages include/linux/gfp.h:544 [inline] __alloc_pages_node include/linux/gfp.h:557 [inline] alloc_pages_node include/linux/gfp.h:571 [inline] alloc_pages include/linux/gfp.h:590 [inline] wp_page_copy+0x1e5/0x15f0 mm/memory.c:3166 do_wp_page+0x9a6/0xc80 mm/memory.c:-1 handle_pte_fault+0xac1/0x3750 mm/memory.c:4810 __handle_mm_fault mm/memory.c:4944 [inline] handle_mm_fault+0xf81/0x1710 mm/memory.c:5358 do_user_addr_fault+0x5a8/0xc90 arch/x86/mm/fault.c:1362 handle_page_fault arch/x86/mm/fault.c:1428 [inline] exc_page_fault+0x5a/0xc0 arch/x86/mm/fault.c:1484 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x129/0x9c0 mm/page_alloc.c:3443 release_pages+0xe52/0xea0 mm/swap.c:1103 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:356 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu+0xdf/0x190 mm/mmu_gather.c:247 zap_pte_range mm/memory.c:1385 [inline] zap_pmd_range mm/memory.c:1435 [inline] zap_pud_range mm/memory.c:1464 [inline] zap_p4d_range mm/memory.c:1485 [inline] unmap_page_range+0x1d66/0x2130 mm/memory.c:1506 unmap_single_vma mm/memory.c:1551 [inline] unmap_vmas+0x25f/0x360 mm/memory.c:1583 exit_mmap+0x309/0x590 mm/mmap.c:3385 __mmput+0x93/0x2f0 kernel/fork.c:1153 mmput+0x4e/0x150 kernel/fork.c:1176 exit_mm kernel/exit.c:539 [inline] do_exit+0x9ec/0x2500 kernel/exit.c:859 do_group_exit+0x141/0x310 kernel/exit.c:986 get_signal+0xf7d/0x12e0 kernel/signal.c:2793 arch_do_signal_or_restart+0xe2/0x11d0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0xa2/0xe0 kernel/entry/common.c:169 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:199 Memory state around the buggy address: ffff88812dde3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812dde3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812dde4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88812dde4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88812dde4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================