================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2894 Read of size 4 at addr ffff888111069000 by task syz-executor146/287 CPU: 1 PID: 287 Comm: syz-executor146 Not tainted 5.10.215-syzkaller-00370-gb58b8f9dad93 #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_rmdir fs/namei.c:3930 [inline] __se_sys_rmdir fs/namei.c:3928 [inline] __x64_sys_rmdir+0x49/0x50 fs/namei.c:3928 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f851817edc7 Code: 73 01 c3 48 c7 c1 b8 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 54 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe32e54308 EFLAGS: 00000207 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f851817edc7 RDX: 0000000000008890 RSI: 0000000000000000 RDI: 00007ffe32e554b0 RBP: 0000000000000065 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffe32e554b0 R13: 00005555565b1740 R14: 431bde82d7b634db R15: 00007ffe32e57630 The buggy address belongs to the page: page:ffffea0004441a40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x111069 flags: 0x4000000000000000() raw: 4000000000000000 ffffea00045a6208 ffffea0004363488 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 284, ts 20951964858, free_ts 20952554763 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:5348 __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] do_anonymous_page mm/memory.c:3935 [inline] handle_pte_fault+0x1782/0x3e30 mm/memory.c:4758 __handle_mm_fault mm/memory.c:4916 [inline] handle_mm_fault+0x11d6/0x1a10 mm/memory.c:5330 do_user_addr_fault arch/x86/mm/fault.c:1387 [inline] handle_page_fault arch/x86/mm/fault.c:1453 [inline] exc_page_fault+0x2a6/0x5b0 arch/x86/mm/fault.c:1509 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+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 exec_mmap fs/exec.c:1042 [inline] begin_new_exec+0xc70/0x2380 fs/exec.c:1289 load_elf_binary+0x945/0x2750 fs/binfmt_elf.c:998 search_binary_handler fs/exec.c:1722 [inline] exec_binprm fs/exec.c:1763 [inline] bprm_execve+0x81b/0x1600 fs/exec.c:1839 do_execveat_common+0x959/0xac0 fs/exec.c:1950 do_execve fs/exec.c:2020 [inline] __do_sys_execve fs/exec.c:2096 [inline] __se_sys_execve fs/exec.c:2091 [inline] __x64_sys_execve+0x92/0xb0 fs/exec.c:2091 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Memory state around the buggy address: ffff888111068f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888111068f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888111069000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888111069080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888111069100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================