================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2904 Read of size 4 at addr ffff88811e3b5000 by task syz-executor/5718 CPU: 1 PID: 5718 Comm: syz-executor Not tainted 5.15.150-syzkaller-00330-g9044d25b8ff5 #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+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:0x7f7682a97167 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:00007ffe4f85aa08 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f7682a97167 RDX: 0000000000000200 RSI: 00007ffe4f85bbb0 RDI: 00000000ffffff9c RBP: 00007f7682b0564a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffe4f85bbb0 R13: 00007f7682b0564a R14: 0000000000047d1e R15: 00007ffe4f85dd90 The buggy address belongs to the page: page:ffffea000478ed40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11e3b5 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea00043a2248 ffffea00044630c8 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 5638, ts 255665512539, free_ts 291198579104 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 __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:465 call_mmap include/linux/fs.h:2209 [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 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 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+0xe8/0x750 mm/page_alloc.c:3615 free_the_page mm/page_alloc.c:804 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5852 __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:408 [inline] kcov_close+0x2b/0x50 kernel/kcov.c:510 __fput+0x3fe/0x910 fs/file_table.c:280 ____fput+0x15/0x20 fs/file_table.c:308 task_work_run+0x129/0x190 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0xc48/0x2ca0 kernel/exit.c:878 do_group_exit+0x141/0x310 kernel/exit.c:1000 __do_sys_exit_group kernel/exit.c:1011 [inline] __se_sys_exit_group kernel/exit.c:1009 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1009 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 Memory state around the buggy address: ffff88811e3b4f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811e3b4f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88811e3b5000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^