================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2913 Read of size 4 at addr ffff8881276d4000 by task syz-executor/459 CPU: 1 PID: 459 Comm: syz-executor Not tainted 6.1.138-syzkaller-1169866-g5b87067cdd87 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x71/0x210 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:427 kasan_report+0x122/0x150 mm/kasan/report.c:531 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350 ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2913 ext4_evict_inode+0xe58/0x1460 fs/ext4/inode.c:296 evict+0x493/0x890 fs/inode.c:705 iput_final fs/inode.c:1834 [inline] iput+0x620/0x670 fs/inode.c:1860 d_delete_notify include/linux/fsnotify.h:292 [inline] vfs_rmdir+0x3bf/0x500 fs/namei.c:4203 do_rmdir+0x259/0x6a0 fs/namei.c:4251 __do_sys_unlinkat fs/namei.c:4431 [inline] __se_sys_unlinkat fs/namei.c:4425 [inline] __x64_sys_unlinkat+0xc7/0xf0 fs/namei.c:4425 x64_sys_call+0x79f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fb5a467c6c7 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:00007ffe1c945d58 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fb5a467c6c7 RDX: 0000000000000200 RSI: 00007ffe1c946f00 RDI: 00000000ffffff9c RBP: 00007fb5a46c8336 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffe1c946f00 R13: 00007fb5a46c8336 R14: 000000000000c0a3 R15: 0000000000000007 Allocated by task 417: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_alloc_info+0x25/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x72/0x80 mm/kasan/common.c:333 kasan_slab_alloc include/linux/kasan.h:202 [inline] slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768 slab_alloc_node mm/slub.c:3421 [inline] slab_alloc mm/slub.c:3431 [inline] __kmem_cache_alloc_lru mm/slub.c:3438 [inline] kmem_cache_alloc+0x16e/0x330 mm/slub.c:3447 anon_vma_chain_alloc mm/rmap.c:145 [inline] anon_vma_clone+0xb7/0x500 mm/rmap.c:291 __split_vma+0x29c/0x840 mm/mmap.c:2438 do_mas_align_munmap+0x2f6/0x11b0 mm/mmap.c:2542 do_mas_munmap+0x241/0x2b0 mm/mmap.c:2726 __vm_munmap+0x19f/0x2f0 mm/mmap.c:3025 __do_sys_munmap mm/mmap.c:3051 [inline] __se_sys_munmap mm/mmap.c:3047 [inline] __x64_sys_munmap+0x6b/0x80 mm/mmap.c:3047 x64_sys_call+0x8a/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:12 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 417: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x31/0x50 mm/kasan/generic.c:516 ____kasan_slab_free+0x132/0x180 mm/kasan/common.c:241 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:249 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1745 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1771 slab_free mm/slub.c:3686 [inline] kmem_cache_free+0x12d/0x300 mm/slub.c:3711 anon_vma_chain_free mm/rmap.c:150 [inline] unlink_anon_vmas+0x2c2/0x5b0 mm/rmap.c:424 free_pgtables+0x25d/0x5b0 mm/memory.c:429 unmap_region+0x281/0x2e0 mm/mmap.c:2399 do_mas_align_munmap+0xb94/0x11b0 mm/mmap.c:2668 do_mas_munmap+0x241/0x2b0 mm/mmap.c:2726 __vm_munmap+0x19f/0x2f0 mm/mmap.c:3025 __do_sys_munmap mm/mmap.c:3051 [inline] __se_sys_munmap mm/mmap.c:3047 [inline] __x64_sys_munmap+0x6b/0x80 mm/mmap.c:3047 x64_sys_call+0x8a/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:12 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff8881276d4000 which belongs to the cache anon_vma_chain of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8881276d4000, ffff8881276d4040) The buggy address belongs to the physical page: page:ffffea00049db500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1276d4 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff8881002aa000 raw: 0000000000000000 00000000002a002a 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 0x112800(GFP_NOWAIT|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 417, tgid 417 (udevd), ts 49043722236, free_ts 49029811524 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2637 prep_new_page+0x1c/0x110 mm/page_alloc.c:2644 get_page_from_freelist+0x2c6e/0x2ce0 mm/page_alloc.c:4539 __alloc_pages+0x19e/0x3a0 mm/page_alloc.c:5842 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1962 [inline] new_slab+0x98/0x3d0 mm/slub.c:2015 ___slab_alloc+0x6f6/0xb50 mm/slub.c:3203 __slab_alloc+0x5e/0xa0 mm/slub.c:3302 slab_alloc_node mm/slub.c:3387 [inline] slab_alloc mm/slub.c:3431 [inline] __kmem_cache_alloc_lru mm/slub.c:3438 [inline] kmem_cache_alloc+0x1b0/0x330 mm/slub.c:3447 anon_vma_chain_alloc mm/rmap.c:145 [inline] anon_vma_clone+0xb7/0x500 mm/rmap.c:291 __split_vma+0x29c/0x840 mm/mmap.c:2438 do_mas_align_munmap+0x2f6/0x11b0 mm/mmap.c:2542 do_mas_munmap+0x241/0x2b0 mm/mmap.c:2726 __vm_munmap+0x19f/0x2f0 mm/mmap.c:3025 __do_sys_munmap mm/mmap.c:3051 [inline] __se_sys_munmap mm/mmap.c:3047 [inline] __x64_sys_munmap+0x6b/0x80 mm/mmap.c:3047 x64_sys_call+0x8a/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:12 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1545 [inline] free_pcp_prepare mm/page_alloc.c:1619 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3581 free_unref_page_list+0xba/0x7c0 mm/page_alloc.c:3729 release_pages+0xad1/0xb20 mm/swap.c:1043 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:315 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu mm/mmu_gather.c:261 [inline] tlb_finish_mmu+0x1aa/0x370 mm/mmu_gather.c:361 exit_mmap+0x3c7/0xa40 mm/mmap.c:3359 __mmput+0x93/0x320 kernel/fork.c:1297 mmput+0x4b/0x150 kernel/fork.c:1320 exit_mm kernel/exit.c:568 [inline] do_exit+0x979/0x2650 kernel/exit.c:864 do_group_exit+0x210/0x2d0 kernel/exit.c:1027 get_signal+0x13b5/0x1520 kernel/signal.c:2889 arch_do_signal_or_restart+0xb0/0x1030 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x7a/0xb0 kernel/entry/common.c:174 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 Memory state around the buggy address: ffff8881276d3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881276d3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881276d4000: fa fb fb fb fb fb fb fb fc fc fc fc fa fb fb fb ^ ffff8881276d4080: fb fb fb fb fc fc fc fc fa fb fb fb fb fb fb fb ffff8881276d4100: fc fc fc fc fa fb fb fb fb fb fb fb fc fc fc fc ================================================================== EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem.