================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc1f/0xc30 fs/ext4/xattr.c:2911 Read of size 4 at addr ffff8881db773000 by task syz-executor659/356 CPU: 0 PID: 356 Comm: syz-executor659 Not tainted 5.4.276-syzkaller-00020-g4275fce9fe94 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/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:2911 ext4_evict_inode+0x1378/0x1ac0 fs/ext4/inode.c:318 evict+0x29b/0x6a0 fs/inode.c:575 d_delete_notify include/linux/fsnotify.h:224 [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:0x7fc83c7e4dc7 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:00007ffdb737e0d8 EFLAGS: 00000207 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc83c7e4dc7 RDX: 0000000000008890 RSI: 0000000000000000 RDI: 00007ffdb737f280 RBP: 0000000000000065 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffdb737f280 R13: 0000555556f0b740 R14: 431bde82d7b634db R15: 00007ffdb7381400 The buggy address belongs to the page: page:ffffea00076ddcc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea00076ddd08 ffffea00076de0c8 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY) 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] __page_cache_alloc include/linux/pagemap.h:218 [inline] __do_page_cache_readahead+0x23c/0x4f0 mm/readahead.c:196 do_async_mmap_readahead mm/filemap.c:2605 [inline] filemap_fault+0x506/0x16b0 mm/filemap.c:2660 __do_fault mm/memory.c:3259 [inline] do_read_fault mm/memory.c:3668 [inline] do_fault mm/memory.c:3797 [inline] handle_pte_fault mm/memory.c:4028 [inline] __handle_mm_fault mm/memory.c:4152 [inline] handle_mm_fault+0x344b/0x4990 mm/memory.c:4189 faultin_page mm/gup.c:654 [inline] __get_user_pages+0xc0b/0x13b0 mm/gup.c:874 populate_vma_page_range mm/gup.c:1279 [inline] __mm_populate+0x369/0x510 mm/gup.c:1327 mm_populate include/linux/mm.h:2489 [inline] vm_mmap_pgoff+0x20d/0x260 mm/util.c:533 ksys_mmap_pgoff+0x168/0x1e0 mm/mmap.c:1631 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 __pagevec_release+0xc3/0x150 mm/swap.c:862 pagevec_release include/linux/pagevec.h:88 [inline] invalidate_mapping_pages+0x96d/0xa50 mm/truncate.c:617 invalidate_bdev+0x9f/0x140 fs/block_dev.c:99 ext4_put_super+0x621/0xbb0 fs/ext4/super.c:1042 generic_shutdown_super+0x120/0x2a0 fs/super.c:464 kill_block_super+0x7a/0xe0 fs/super.c:1453 deactivate_locked_super+0xa8/0x110 fs/super.c:335 deactivate_super+0x1e2/0x2a0 fs/super.c:366 cleanup_mnt+0x44e/0x500 fs/namespace.c:1102 task_work_run+0x140/0x170 kernel/task_work.c:113 ptrace_notify+0x29e/0x350 kernel/signal.c:2271 ptrace_report_syscall include/linux/tracehook.h:66 [inline] tracehook_report_syscall_exit include/linux/tracehook.h:129 [inline] syscall_slow_exit_work+0x167/0x400 arch/x86/entry/common.c:246 syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x19d/0x1c0 arch/x86/entry/common.c:300 Memory state around the buggy address: ffff8881db772f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881db772f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881db773000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881db773080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881db773100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================