================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2920 Read of size 4 at addr ffff88812102b000 by task syz-executor/436 CPU: 1 PID: 436 Comm: syz-executor Not tainted 5.15.185-syzkaller-1080615-g0d918fa8e88d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2920 ext4_evict_inode+0xe44/0x1450 fs/ext4/inode.c:300 evict+0x485/0x870 fs/inode.c:650 iput_final fs/inode.c:1779 [inline] iput+0x635/0x7c0 fs/inode.c:1805 d_delete_notify include/linux/fsnotify.h:278 [inline] vfs_rmdir+0x33f/0x460 fs/namei.c:4162 do_rmdir+0x259/0x6a0 fs/namei.c:4210 __do_sys_unlinkat fs/namei.c:4390 [inline] __se_sys_unlinkat fs/namei.c:4384 [inline] __x64_sys_unlinkat+0xc7/0xf0 fs/namei.c:4384 x64_sys_call+0x4c0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fc7adde1cf7 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:00007ffffcb170c8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fc7adde1cf7 RDX: 0000000000000200 RSI: 00007ffffcb18270 RDI: 00000000ffffff9c RBP: 00007fc7ade551cc R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffffcb18270 R13: 00007fc7ade551cc R14: 000000000000c38b R15: 00007ffffcb1a420 Allocated by task 385: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] __kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0xf7/0x260 mm/slub.c:3255 vm_area_alloc+0x24/0x130 kernel/fork.c:360 __mmap_region mm/mmap.c:1782 [inline] mmap_region+0x9b2/0x1800 mm/mmap.c:2947 do_mmap+0x76c/0xe40 mm/mmap.c:1586 vm_mmap_pgoff+0x1ce/0x410 mm/util.c:555 ksys_mmap_pgoff+0xf6/0x1d0 mm/mmap.c:1635 __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+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 13: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1749 slab_free mm/slub.c:3521 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3539 __free_vm_area_struct+0x1c/0x20 kernel/fork.c:390 rcu_do_batch+0x51d/0xba0 kernel/rcu/tree.c:2523 rcu_core+0x5e4/0xf80 kernel/rcu/tree.c:2763 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2776 handle_softirqs+0x250/0x560 kernel/softirq.c:583 run_ksoftirqd+0x28/0x40 kernel/softirq.c:959 smpboot_thread_fn+0x45a/0x8c0 kernel/smpboot.c:164 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu_common kernel/rcu/tree.c:3007 [inline] call_rcu+0xf6/0xf60 kernel/rcu/tree.c:3125 free_vm_area_struct kernel/fork.c:395 [inline] vm_area_free_no_check+0x10e/0x140 kernel/fork.c:409 vm_area_free+0x56/0x60 kernel/fork.c:419 __vma_adjust+0x10ff/0x17b0 mm/mmap.c:964 vma_merge+0x3e6/0x910 mm/mmap.c:1241 mprotect_fixup+0x3ee/0x7d0 mm/mprotect.c:472 do_mprotect_pkey+0x70b/0xa80 mm/mprotect.c:646 __do_sys_mprotect mm/mprotect.c:673 [inline] __se_sys_mprotect mm/mprotect.c:670 [inline] __x64_sys_mprotect+0x80/0x90 mm/mprotect.c:670 x64_sys_call+0x912/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:11 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88812102b000 which belongs to the cache vm_area_struct of size 232 The buggy address is located 0 bytes inside of 232-byte region [ffff88812102b000, ffff88812102b0e8) The buggy address belongs to the page: page:ffffea0004840ac0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12102b flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff888100186900 raw: 0000000000000000 00000000000d000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 385, ts 50127623748, free_ts 49525665346 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5795 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1932 [inline] new_slab+0xa1/0x4d0 mm/slub.c:1995 ___slab_alloc+0x381/0x810 mm/slub.c:3028 __slab_alloc+0x49/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0x138/0x260 mm/slub.c:3255 vm_area_alloc+0x24/0x130 kernel/fork.c:360 __mmap_region mm/mmap.c:1782 [inline] mmap_region+0x9b2/0x1800 mm/mmap.c:2947 do_mmap+0x76c/0xe40 mm/mmap.c:1586 vm_mmap_pgoff+0x1ce/0x410 mm/util.c:555 ksys_mmap_pgoff+0xf6/0x1d0 mm/mmap.c:1635 __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+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 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+0x542/0x550 mm/page_alloc.c:3534 free_unref_page+0xa2/0x550 mm/page_alloc.c:3616 free_the_page mm/page_alloc.c:805 [inline] __free_pages+0x6c/0x100 mm/page_alloc.c:5871 __vunmap+0x84d/0x9e0 mm/vmalloc.c:2652 __vfree mm/vmalloc.c:2701 [inline] vfree+0x8b/0xc0 mm/vmalloc.c:2732 kcov_put kernel/kcov.c:417 [inline] kcov_close+0x2b/0x50 kernel/kcov.c:519 __fput+0x20b/0x8b0 fs/file_table.c:311 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xa76/0x27a0 kernel/exit.c:880 do_group_exit+0x141/0x310 kernel/exit.c:1002 get_signal+0x66a/0x1480 kernel/signal.c:2907 arch_do_signal_or_restart+0xc1/0x10f0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0xa7/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+0x1a/0x30 kernel/entry/common.c:307 Memory state around the buggy address: ffff88812102af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812102af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812102b000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88812102b080: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ffff88812102b100: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb ==================================================================