================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2910 Read of size 4 at addr ffff888122c9c000 by task syz-executor571/295 CPU: 1 PID: 295 Comm: syz-executor571 Not tainted 5.15.167-syzkaller-02003-g5e4635681cf1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1c0 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2910 ext4_evict_inode+0xea1/0x14e0 fs/ext4/inode.c:300 evict+0x529/0x930 fs/inode.c:622 iput_final fs/inode.c:1740 [inline] iput+0x63b/0x7e0 fs/inode.c:1766 d_delete_notify include/linux/fsnotify.h:278 [inline] vfs_rmdir+0x359/0x470 fs/namei.c:4162 do_rmdir+0x3ab/0x630 fs/namei.c:4210 __do_sys_rmdir fs/namei.c:4229 [inline] __se_sys_rmdir fs/namei.c:4227 [inline] __x64_sys_rmdir+0x49/0x50 fs/namei.c:4227 x64_sys_call+0x274/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:85 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fd0cf57adc7 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:00007ffd71c73088 EFLAGS: 00000207 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd0cf57adc7 RDX: 0000000000008890 RSI: 0000000000000000 RDI: 00007ffd71c74230 RBP: 0000000000000065 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffd71c74230 R13: 000055558a24c740 R14: 431bde82d7b634db R15: 00007ffd71c763b0 The buggy address belongs to the page: page:ffffea00048b2700 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x122c9c flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea00048b5888 ffffea00048b2748 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 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 296, ts 23590973012, free_ts 23657856081 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1b/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4485 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5779 __alloc_pages_node include/linux/gfp.h:591 [inline] alloc_pages_node include/linux/gfp.h:605 [inline] alloc_pages include/linux/gfp.h:618 [inline] __page_cache_alloc include/linux/pagemap.h:305 [inline] page_cache_ra_unbounded+0x316/0x920 mm/readahead.c:227 do_page_cache_ra mm/readahead.c:280 [inline] ondemand_readahead+0x9c8/0xfa0 mm/readahead.c:565 page_cache_async_ra+0x2a3/0x2e0 mm/readahead.c:624 page_cache_async_readahead include/linux/pagemap.h:854 [inline] do_async_mmap_readahead mm/filemap.c:3032 [inline] filemap_fault+0xad4/0x17c0 mm/filemap.c:3137 __do_fault+0x273/0x300 mm/memory.c:4160 do_read_fault mm/memory.c:4521 [inline] do_fault mm/memory.c:4662 [inline] handle_pte_fault+0x1656/0x25c0 mm/memory.c:4876 do_handle_mm_fault+0x20bc/0x2400 mm/memory.c:5298 handle_mm_fault include/linux/mm.h:1836 [inline] faultin_page mm/gup.c:976 [inline] __get_user_pages+0x379/0xee0 mm/gup.c:1197 populate_vma_page_range mm/gup.c:1529 [inline] __mm_populate+0x38d/0x560 mm/gup.c:1638 mm_populate include/linux/mm.h:2693 [inline] vm_mmap_pgoff+0x271/0x450 mm/util.c:560 ksys_mmap_pgoff+0x15d/0x1e0 mm/mmap.c:1636 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x103/0x120 arch/x86/kernel/sys_x86_64.c:86 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3534 free_unref_page_list+0x14b/0xa60 mm/page_alloc.c:3671 release_pages+0x1310/0x1370 mm/swap.c:1009 __pagevec_release+0x84/0x100 mm/swap.c:1029 pagevec_release include/linux/pagevec.h:81 [inline] __invalidate_mapping_pages+0x575/0x670 mm/truncate.c:509 invalidate_mapping_pages+0x27/0x30 mm/truncate.c:533 invalidate_bdev+0xa6/0x140 block/bdev.c:88 ext4_put_super+0x6f6/0xd20 fs/ext4/super.c:1246 generic_shutdown_super+0x157/0x2e0 fs/super.c:475 kill_block_super+0x7e/0xe0 fs/super.c:1425 deactivate_locked_super+0xad/0x110 fs/super.c:335 deactivate_super+0xbe/0xf0 fs/super.c:366 cleanup_mnt+0x45c/0x510 fs/namespace.c:1143 __cleanup_mnt+0x19/0x20 fs/namespace.c:1150 task_work_run+0x129/0x190 kernel/task_work.c:188 ptrace_notify+0x29e/0x350 kernel/signal.c:2388 Memory state around the buggy address: ffff888122c9bf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888122c9bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888122c9c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888122c9c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888122c9c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop0): ext4_xattr_inode_iget:404: comm syz-executor571: inode #1: comm syz-executor571: iget: illegal inode # EXT4-fs error (device loop0): ext4_xattr_inode_iget:409: comm syz-executor571: error while reading EA inode 1 err=-117