================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xb47/0xb50 fs/ext4/xattr.c:2917 Read of size 4 at addr ffff8881e9275000 by task syz-executor/544 CPU: 0 PID: 544 Comm: syz-executor Not tainted 5.4.290-syzkaller-05054-g986c38813dff #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack+0x1e/0x20 lib/dump_stack.c:77 dump_stack+0x15b/0x1b8 lib/dump_stack.c:118 print_address_description+0x8d/0x4c0 mm/kasan/report.c:384 __kasan_report+0xef/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 ext4_xattr_delete_inode+0xb47/0xb50 fs/ext4/xattr.c:2917 ext4_evict_inode+0x11c0/0x1a30 fs/ext4/inode.c:318 evict+0x465/0x880 fs/inode.c:610 iput_final fs/inode.c:1652 [inline] iput+0x67d/0x810 fs/inode.c:1678 d_delete_notify include/linux/fsnotify.h:230 [inline] vfs_rmdir+0x2b7/0x3e0 fs/namei.c:4040 do_rmdir+0x23c/0x480 fs/namei.c:4088 __do_sys_unlinkat fs/namei.c:4252 [inline] __se_sys_unlinkat fs/namei.c:4246 [inline] __x64_sys_unlinkat+0xb6/0xe0 fs/namei.c:4246 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f49bfe391a7 Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 00 00 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:00007ffe17bb7888 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f49bfe391a7 RDX: 0000000000000200 RSI: 00007ffe17bb8a30 RDI: 00000000ffffff9c RBP: 00007f49bfea764a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffe17bb8a30 R13: 00007f49bfea764a R14: 000000000000c0a2 R15: 00007ffe17bbac10 The buggy address belongs to the page: page:ffffea0007a49d40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea0007a49d88 ffffea0007991308 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 0x500dc0(GFP_USER|__GFP_ZERO|__GFP_ACCOUNT) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x35e/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x1296/0x1310 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x202/0x4b0 mm/page_alloc.c:4893 __alloc_pages include/linux/gfp.h:503 [inline] __alloc_pages_node include/linux/gfp.h:516 [inline] alloc_pages_node include/linux/gfp.h:530 [inline] __pte_alloc_one include/asm-generic/pgalloc.h:63 [inline] pte_alloc_one+0x1f/0xc0 arch/x86/mm/pgtable.c:26 __pte_alloc+0x21/0x1c0 mm/memory.c:440 copy_pte_range mm/memory.c:830 [inline] copy_pmd_range mm/memory.c:906 [inline] copy_pud_range mm/memory.c:940 [inline] copy_p4d_range mm/memory.c:962 [inline] copy_page_range+0x142a/0x1730 mm/memory.c:1024 dup_mmap kernel/fork.c:608 [inline] dup_mm kernel/fork.c:1379 [inline] copy_mm+0xb65/0x1150 kernel/fork.c:1435 copy_process+0x1163/0x2cf0 kernel/fork.c:2052 _do_fork+0x190/0x860 kernel/fork.c:2399 __do_sys_clone kernel/fork.c:2557 [inline] __se_sys_clone kernel/fork.c:2538 [inline] __x64_sys_clone+0x12e/0x160 kernel/fork.c:2538 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] free_pcp_prepare mm/page_alloc.c:1233 [inline] free_unref_page_prepare+0x2a9/0x3a0 mm/page_alloc.c:3085 free_unref_page_list+0x110/0x4c0 mm/page_alloc.c:3154 release_pages+0xa62/0xaa0 mm/swap.c:842 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:297 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:189 [inline] tlb_flush_mmu mm/mmu_gather.c:196 [inline] tlb_finish_mmu+0x175/0x300 mm/mmu_gather.c:277 exit_mmap+0x2db/0x520 mm/mmap.c:3193 __mmput+0x92/0x2e0 kernel/fork.c:1101 mmput+0x47/0x60 kernel/fork.c:1122 exit_mm kernel/exit.c:538 [inline] do_exit+0x99f/0x2660 kernel/exit.c:848 do_group_exit+0x13e/0x300 kernel/exit.c:984 get_signal+0xdee/0x13d0 kernel/signal.c:2738 do_signal+0xad/0xda0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0xc4/0x1b0 arch/x86/entry/common.c:159 prepare_exit_to_usermode+0x18e/0x1f0 arch/x86/entry/common.c:194 syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x13e/0x170 arch/x86/entry/common.c:300 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881e9274f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e9274f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881e9275000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881e9275080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881e9275100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop0): ext4_xattr_inode_iget:402: comm syz-executor: inode #1: comm syz-executor: iget: illegal inode # EXT4-fs error (device loop0): ext4_xattr_inode_iget:407: comm syz-executor: error while reading EA inode 1 err=-117