================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2894 Read of size 4 at addr ffff88813ab5e000 by task syz-executor.4/11495 CPU: 1 PID: 11495 Comm: syz-executor.4 Tainted: G W 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:0x7f6d53603687 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:00007fff83bd0ee8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f6d53603687 RDX: 0000000000000200 RSI: 00007fff83bd2090 RDI: 00000000ffffff9c RBP: 00007f6d53660636 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007fff83bd2090 R13: 00007f6d53660636 R14: 0000000000077d71 R15: 0000000000000007 The buggy address belongs to the page: page:ffffea0004ead780 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x13ab5e flags: 0x4000000000000000() raw: 4000000000000000 ffffea0004ead7c8 ffffea0004ead708 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 11938, ts 491915619172, free_ts 491991950755 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] 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+0xd0/0x180 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+0x1f34/0x23b0 mm/memory.c:1506 unmap_single_vma mm/memory.c:1551 [inline] unmap_vmas+0x37f/0x4f0 mm/memory.c:1583 exit_mmap+0x2f2/0x5c0 mm/mmap.c:3355 __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 __do_sys_exit_group kernel/exit.c:994 [inline] __se_sys_exit_group kernel/exit.c:992 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:992 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Memory state around the buggy address: ffff88813ab5df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813ab5df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88813ab5e000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88813ab5e080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88813ab5e100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================