================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2904 Read of size 4 at addr ffff88811d3ac000 by task syz-executor/486 CPU: 1 PID: 486 Comm: syz-executor Not tainted 5.15.151-syzkaller-1069524-gdb06c48ab67e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 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:2904 ext4_evict_inode+0xea1/0x14e0 fs/ext4/inode.c:300 evict+0x2a3/0x630 fs/inode.c:587 iput_final fs/inode.c:1705 [inline] iput+0x63b/0x7e0 fs/inode.c:1731 d_delete_notify include/linux/fsnotify.h:270 [inline] vfs_rmdir+0x359/0x470 fs/namei.c:4162 do_rmdir+0x3ab/0x630 fs/namei.c:4210 __do_sys_unlinkat fs/namei.c:4390 [inline] __se_sys_unlinkat fs/namei.c:4384 [inline] __x64_sys_unlinkat+0xdf/0xf0 fs/namei.c:4384 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fed0d1096c7 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:00007ffdcd67b3c8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fed0d1096c7 RDX: 0000000000000200 RSI: 00007ffdcd67c570 RDI: 00000000ffffff9c RBP: 00007fed0d155336 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffdcd67c570 R13: 00007fed0d155336 R14: 000000000000c553 R15: 0000000000000007 The buggy address belongs to the page: page:ffffea000474eb00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11d3ac flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea0004391a08 ffffea000474eb48 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 496, ts 50476172654, free_ts 50485295686 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2604 prep_new_page+0x1b/0x110 mm/page_alloc.c:2610 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4484 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5776 __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:4154 do_read_fault mm/memory.c:4515 [inline] do_fault mm/memory.c:4656 [inline] handle_pte_fault+0x167b/0x24d0 mm/memory.c:4871 do_handle_mm_fault+0x1ea9/0x23a0 mm/memory.c:5293 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:1471 [inline] free_pcp_prepare mm/page_alloc.c:1543 [inline] free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3533 free_unref_page_list+0x14b/0xa60 mm/page_alloc.c:3670 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:1414 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:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xc4/0xe0 kernel/entry/common.c:175 Memory state around the buggy address: ffff88811d3abf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811d3abf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88811d3ac000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88811d3ac080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88811d3ac100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================