================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2904 Read of size 4 at addr ffff88806528f000 by task syz-executor.3/4300 CPU: 1 PID: 4300 Comm: syz-executor.3 Not tainted 5.15.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2904 ext4_evict_inode+0xcb7/0x1100 fs/ext4/inode.c:299 evict+0x2a4/0x620 fs/inode.c:587 d_delete_notify include/linux/fsnotify.h:261 [inline] vfs_rmdir+0x33c/0x460 fs/namei.c:4162 do_rmdir+0x368/0x670 fs/namei.c:4210 __do_sys_unlinkat fs/namei.c:4390 [inline] __se_sys_unlinkat fs/namei.c:4384 [inline] __x64_sys_unlinkat+0xdc/0xf0 fs/namei.c:4384 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:0x7ffaedb26687 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:00007ffd6f3e4748 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007ffaedb26687 RDX: 0000000000000200 RSI: 00007ffd6f3e58f0 RDI: 00000000ffffff9c RBP: 00007ffaedb83636 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffd6f3e58f0 R13: 00007ffaedb83636 R14: 00000000000381ce R15: 0000000000000008 The buggy address belongs to the page: page:ffffea000194a3c0 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x6528f flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001831cc8 ffffea000194a308 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffff7f 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 4715, ts 215315591418, free_ts 230163853497 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 vm_area_alloc_pages mm/vmalloc.c:2868 [inline] __vmalloc_area_node mm/vmalloc.c:2924 [inline] __vmalloc_node_range+0x5ab/0x8c0 mm/vmalloc.c:3029 vmalloc_user+0x70/0x80 mm/vmalloc.c:3165 kcov_mmap+0x28/0x120 kernel/kcov.c:465 call_mmap include/linux/fs.h:2177 [inline] mmap_region+0x10e7/0x1670 mm/mmap.c:1791 do_mmap+0x78d/0xe00 mm/mmap.c:1575 vm_mmap_pgoff+0x1ca/0x2d0 mm/util.c:551 ksys_mmap_pgoff+0x559/0x780 mm/mmap.c:1624 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:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 __vunmap+0x8d4/0xa20 mm/vmalloc.c:2621 kcov_put kernel/kcov.c:408 [inline] kcov_close+0x27/0x50 kernel/kcov.c:510 __fput+0x3bf/0x890 fs/file_table.c:280 task_work_run+0x129/0x1a0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0x6a3/0x2480 kernel/exit.c:872 do_group_exit+0x144/0x310 kernel/exit.c:994 get_signal+0xc66/0x14e0 kernel/signal.c:2889 arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88806528ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806528ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806528f000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806528f080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806528f100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================