================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2894 Read of size 4 at addr ffff8881190f1000 by task syz-executor.4/389 CPU: 1 PID: 389 Comm: syz-executor.4 Not tainted 5.10.214-syzkaller-00187-ge6f44899ce5d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2894 ext4_evict_inode+0x1095/0x1730 fs/ext4/inode.c:300 evict+0x2a3/0x6c0 fs/inode.c:577 iput_final fs/inode.c:1697 [inline] iput+0x632/0x7e0 fs/inode.c:1723 d_delete_notify include/linux/fsnotify.h:261 [inline] vfs_rmdir+0x271/0x3f0 fs/namei.c:3865 do_rmdir+0x2cf/0x5c0 fs/namei.c:3912 __do_sys_unlinkat fs/namei.c:4076 [inline] __se_sys_unlinkat fs/namei.c:4070 [inline] __x64_sys_unlinkat+0xdf/0xf0 fs/namei.c:4070 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f2a3a661687 Code: 73 01 c3 48 c7 c1 b0 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff865318b8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f2a3a661687 RDX: 0000000000000200 RSI: 00007fff86532a60 RDI: 00000000ffffff9c RBP: 00007f2a3a6be636 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007fff86532a60 R13: 00007f2a3a6be636 R14: 000000000001f5da R15: 0000000000000008 The buggy address belongs to the page: page:ffffea0004643c40 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x1190f1 flags: 0x4000000000000000() raw: 4000000000000000 ffffea0004643dc8 ffffea0004643c88 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffff7f 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), pid 389, ts 128463064204, free_ts 128473866391 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5346 __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] __get_free_pages mm/page_alloc.c:5389 [inline] get_zeroed_page+0x19/0x40 mm/page_alloc.c:5398 pud_alloc_one include/asm-generic/pgalloc.h:166 [inline] __pud_alloc+0x8b/0x260 mm/memory.c:5382 pud_alloc include/linux/mm.h:2283 [inline] copy_pud_range mm/memory.c:1112 [inline] copy_p4d_range mm/memory.c:1156 [inline] copy_page_range+0x2cd6/0x3020 mm/memory.c:1229 dup_mmap kernel/fork.c:620 [inline] dup_mm kernel/fork.c:1435 [inline] copy_mm+0xc4a/0x13a0 kernel/fork.c:1491 copy_process+0x1175/0x3340 kernel/fork.c:2183 kernel_clone+0x21e/0x9e0 kernel/fork.c:2574 __do_sys_clone kernel/fork.c:2700 [inline] __se_sys_clone kernel/fork.c:2684 [inline] __x64_sys_clone+0x23f/0x290 kernel/fork.c:2684 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 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+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x122/0xb20 mm/page_alloc.c:3443 release_pages+0xea0/0xef0 mm/swap.c:1103 free_pages_and_swap_cache+0x8a/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 mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:326 exit_mmap+0x312/0x5c0 mm/mmap.c:3357 __mmput+0x95/0x2d0 kernel/fork.c:1153 mmput+0x59/0x170 kernel/fork.c:1176 exit_mm kernel/exit.c:537 [inline] do_exit+0xbda/0x2a50 kernel/exit.c:848 do_group_exit+0x141/0x310 kernel/exit.c:983 get_signal+0x10a0/0x1410 kernel/signal.c:2782 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0xc5/0x1d0 kernel/entry/common.c:274 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Memory state around the buggy address: ffff8881190f0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881190f0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881190f1000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881190f1080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881190f1100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================