================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2910 Read of size 4 at addr ffff88810b502000 by task syz-executor/467 CPU: 1 PID: 467 Comm: syz-executor Not tainted 5.15.167-syzkaller-1076100-g2e66050fb753 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/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_unlinkat fs/namei.c:4390 [inline] __se_sys_unlinkat fs/namei.c:4384 [inline] __x64_sys_unlinkat+0xdf/0xf0 fs/namei.c:4384 x64_sys_call+0x6e9/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264 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:0x7f80e53d3cf7 Code: 73 01 c3 48 c7 c1 a8 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe5776bfc8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f80e53d3cf7 RDX: 0000000000000200 RSI: 00007ffe5776d170 RDI: 00000000ffffff9c RBP: 00007f80e54471cc R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffe5776d170 R13: 00007f80e54471cc R14: 000000000000d49d R15: 00007ffe5776f320 The buggy address belongs to the page: page:ffffea00042d4080 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10b502 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea00042d40c8 ffffea000445b2c8 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 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 428, ts 53240570356, free_ts 53318504262 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 __vmalloc_area_node mm/vmalloc.c:2955 [inline] __vmalloc_node_range+0x482/0x8d0 mm/vmalloc.c:3086 vmalloc_user+0x73/0x80 mm/vmalloc.c:3237 kcov_mmap+0x2e/0x130 kernel/kcov.c:474 call_mmap include/linux/fs.h:2211 [inline] mmap_region+0x138d/0x1b60 mm/mmap.c:1803 do_mmap+0x776/0xe50 mm/mmap.c:1587 vm_mmap_pgoff+0x1dd/0x450 mm/util.c:555 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 x64_sys_call+0x67/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 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 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+0xe8/0x750 mm/page_alloc.c:3616 free_the_page mm/page_alloc.c:805 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5855 __vunmap+0x7bc/0x8f0 mm/vmalloc.c:2652 __vfree mm/vmalloc.c:2700 [inline] vfree+0x7f/0xb0 mm/vmalloc.c:2731 kcov_put kernel/kcov.c:417 [inline] kcov_close+0x2b/0x50 kernel/kcov.c:519 __fput+0x228/0x8c0 fs/file_table.c:280 ____fput+0x15/0x20 fs/file_table.c:308 task_work_run+0x129/0x190 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xc48/0x2ca0 kernel/exit.c:880 do_group_exit+0x141/0x310 kernel/exit.c:1002 get_signal+0x7a3/0x1630 kernel/signal.c:2904 arch_do_signal_or_restart+0xbd/0x1680 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0xa0/0xe0 kernel/entry/common.c:178 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x26/0x160 kernel/entry/common.c:307 Memory state around the buggy address: ffff88810b501f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88810b501f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88810b502000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88810b502080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88810b502100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop2): ext4_xattr_inode_iget:404: comm syz-executor: inode #1: comm syz-executor: iget: illegal inode # EXT4-fs error (device loop2): ext4_xattr_inode_iget:409: comm syz-executor: error while reading EA inode 1 err=-117