================================================================== BUG: KASAN: slab-use-after-free in ext4_xattr_delete_inode+0xd41/0xd50 fs/ext4/xattr.c:2951 Read of size 4 at addr ffff88801a6e5000 by task syz-executor/5733 CPU: 1 PID: 5733 Comm: syz-executor Not tainted 6.10.0-rc1-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+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 ext4_xattr_delete_inode+0xd41/0xd50 fs/ext4/xattr.c:2951 ext4_evict_inode+0xb1c/0xf50 fs/ext4/inode.c:268 evict+0x2a8/0x630 fs/inode.c:667 d_delete_notify include/linux/fsnotify.h:326 [inline] vfs_rmdir+0x3d7/0x510 fs/namei.c:4227 do_rmdir+0x3b5/0x580 fs/namei.c:4273 __do_sys_unlinkat fs/namei.c:4449 [inline] __se_sys_unlinkat fs/namei.c:4443 [inline] __x64_sys_unlinkat+0xe0/0xf0 fs/namei.c:4443 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x82/0x160 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f48db47c6c7 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:00007ffe4584c4e8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f48db47c6c7 RDX: 0000000000000200 RSI: 00007ffe4584d690 RDI: 00000000ffffff9c RBP: 00007f48db4c8336 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffe4584d690 R13: 00007f48db4c8336 R14: 0000000000016f9a R15: 0000000000000007 Allocated by task 5581: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x4b/0x60 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3940 [inline] slab_alloc_node mm/slub.c:4000 [inline] kmem_cache_alloc_noprof+0x12a/0x270 mm/slub.c:4007 vma_lock_alloc kernel/fork.c:441 [inline] vm_area_dup kernel/fork.c:494 [inline] dup_mmap kernel/fork.c:697 [inline] dup_mm kernel/fork.c:1688 [inline] copy_mm+0xc85/0x2240 kernel/fork.c:1737 copy_process+0x1872/0x3db0 kernel/fork.c:2390 kernel_clone+0x223/0x870 kernel/fork.c:2797 __do_sys_clone kernel/fork.c:2940 [inline] __se_sys_clone kernel/fork.c:2924 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2924 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x82/0x160 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 5596: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xe0/0x150 mm/kasan/common.c:240 __kasan_slab_free+0x12/0x30 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2195 [inline] slab_free mm/slub.c:4436 [inline] kmem_cache_free+0x126/0x310 mm/slub.c:4511 vma_lock_free kernel/fork.c:453 [inline] __vm_area_free+0x6b/0x80 kernel/fork.c:509 remove_vma mm/mmap.c:146 [inline] exit_mmap+0x6ee/0xd10 mm/mmap.c:3365 __mmput+0x115/0x3c0 kernel/fork.c:1346 exec_mmap+0x651/0x6e0 fs/exec.c:1063 begin_new_exec+0x125f/0x1f40 fs/exec.c:1329 load_elf_binary+0x974/0x2620 fs/binfmt_elf.c:996 search_binary_handler fs/exec.c:1797 [inline] exec_binprm fs/exec.c:1839 [inline] bprm_execve+0xaf8/0x17b0 fs/exec.c:1891 do_execveat_common+0x553/0x700 fs/exec.c:1998 do_execve fs/exec.c:2072 [inline] __do_sys_execve fs/exec.c:2148 [inline] __se_sys_execve fs/exec.c:2143 [inline] __x64_sys_execve+0x92/0xb0 fs/exec.c:2143 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x82/0x160 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e The buggy address belongs to the object at ffff88801a6e5000 which belongs to the cache vma_lock of size 152 The buggy address is located 0 bytes inside of freed 152-byte region [ffff88801a6e5000, ffff88801a6e5098) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801a6e5ca8 pfn:0x1a6e5 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 00fff00000000200 ffff888016a6bc80 ffffea0001e43d50 ffffea0000a15810 raw: ffff88801a6e5ca8 0000000000120001 00000001ffffefff 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 4966, tgid 4966 (dhcpcd-run-hook), ts 45096746002, free_ts 45092308622 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ee/0x220 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x2df3/0x2eb0 mm/page_alloc.c:3402 __alloc_pages_noprof+0x256/0x6b0 mm/page_alloc.c:4660 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2264 allocate_slab+0x5a/0x2e0 mm/slub.c:2427 new_slab mm/slub.c:2480 [inline] ___slab_alloc+0xcd8/0x14b0 mm/slub.c:3666 __slab_alloc+0x58/0xa0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] kmem_cache_alloc_noprof+0x1b6/0x270 mm/slub.c:4007 vma_lock_alloc kernel/fork.c:441 [inline] vm_area_dup kernel/fork.c:494 [inline] dup_mmap kernel/fork.c:697 [inline] dup_mm kernel/fork.c:1688 [inline] copy_mm+0xc85/0x2240 kernel/fork.c:1737 copy_process+0x1872/0x3db0 kernel/fork.c:2390 kernel_clone+0x223/0x870 kernel/fork.c:2797 __do_sys_clone kernel/fork.c:2940 [inline] __se_sys_clone kernel/fork.c:2924 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2924 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x82/0x160 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e page last free pid 4969 tgid 4969 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_folios+0xf07/0x1990 mm/page_alloc.c:2614 folios_put_refs+0x93a/0xa60 mm/swap.c:1024 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:332 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x4e6/0xd10 mm/mmap.c:3354 __mmput+0x115/0x3c0 kernel/fork.c:1346 exit_mm+0x220/0x310 kernel/exit.c:565 do_exit+0x9aa/0x27e0 kernel/exit.c:861 do_group_exit+0x207/0x2c0 kernel/exit.c:1023 __do_sys_exit_group kernel/exit.c:1034 [inline] __se_sys_exit_group kernel/exit.c:1032 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x82/0x160 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e Memory state around the buggy address: ffff88801a6e4f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801a6e4f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801a6e5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801a6e5080: fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb ffff88801a6e5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ==================================================================