================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc1f/0xc30 fs/ext4/xattr.c:2917 Read of size 4 at addr ffff8881e6875000 by task syz-executor/542 CPU: 0 PID: 542 Comm: syz-executor Not tainted 5.4.283-syzkaller-04981-g1cca65ac6abc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 ext4_xattr_delete_inode+0xc1f/0xc30 fs/ext4/xattr.c:2917 ext4_evict_inode+0x1378/0x1ac0 fs/ext4/inode.c:318 evict+0x4ea/0x960 fs/inode.c:610 d_delete_notify include/linux/fsnotify.h:230 [inline] vfs_rmdir+0x24b/0x3c0 fs/namei.c:4040 do_rmdir+0x2c1/0x580 fs/namei.c:4088 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f339ca55217 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:00007fff602779c8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f339ca55217 RDX: 0000000000000200 RSI: 00007fff60278b70 RDI: 00000000ffffff9c RBP: 00007f339cac364a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007fff60278b70 R13: 00007f339cac364a R14: 000000000000cd9e R15: 00007fff6027ad50 The buggy address belongs to the page: page:ffffea00079a1d40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea00079a2388 ffffea00079a1d88 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+0x18f/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x393/0x840 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] __get_free_pages mm/page_alloc.c:4937 [inline] get_zeroed_page+0x15/0x40 mm/page_alloc.c:4946 pud_alloc_one arch/x86/include/asm/pgalloc.h:156 [inline] __pud_alloc+0x33/0x180 mm/memory.c:4237 pud_alloc include/linux/mm.h:1995 [inline] copy_pud_range mm/memory.c:920 [inline] copy_p4d_range mm/memory.c:962 [inline] copy_page_range+0x24af/0x26f0 mm/memory.c:1024 dup_mmap kernel/fork.c:608 [inline] dup_mm kernel/fork.c:1379 [inline] copy_mm+0xb23/0x10d0 kernel/fork.c:1435 copy_process+0x1291/0x3230 kernel/fork.c:2052 _do_fork+0x197/0x900 kernel/fork.c:2399 __do_sys_clone kernel/fork.c:2557 [inline] __se_sys_clone kernel/fork.c:2538 [inline] __x64_sys_clone+0x26b/0x2c0 kernel/fork.c:2538 do_syscall_64+0xca/0x1c0 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+0x297/0x380 mm/page_alloc.c:3085 free_unref_page_list+0x10a/0x590 mm/page_alloc.c:3154 release_pages+0xad8/0xb20 mm/swap.c:842 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+0x177/0x320 mm/mmu_gather.c:277 exit_mmap+0x2dc/0x520 mm/mmap.c:3193 __mmput+0x8e/0x2c0 kernel/fork.c:1101 exit_mm kernel/exit.c:538 [inline] do_exit+0xc08/0x2bc0 kernel/exit.c:848 do_group_exit+0x138/0x300 kernel/exit.c:984 __do_sys_exit_group kernel/exit.c:995 [inline] __se_sys_exit_group kernel/exit.c:993 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:993 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881e6874f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e6874f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881e6875000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881e6875080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881e6875100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================