================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2911 Read of size 4 at addr ffff8881180a7000 by task syz-executor/469 CPU: 1 PID: 469 Comm: syz-executor Not tainted 5.15.178-syzkaller-1079134-g058abb720bd1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1c0 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:2911 ext4_evict_inode+0xea1/0x14e0 fs/ext4/inode.c:300 evict+0x529/0x930 fs/inode.c:622 iput_final fs/inode.c:1744 [inline] iput+0x63b/0x7e0 fs/inode.c:1770 d_delete_notify include/linux/fsnotify.h:278 [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 x64_sys_call+0x6e9/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264 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:0x7fa6fd653cf7 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:00007ffe3466fdb8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fa6fd653cf7 RDX: 0000000000000200 RSI: 00007ffe34670f60 RDI: 00000000ffffff9c RBP: 00007fa6fd6c71cc R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffe34670f60 R13: 00007fa6fd6c71cc R14: 000000000000d5ba R15: 00007ffe34673110 </TASK> Allocated by task 118: 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+0xb1/0xe0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0xf5/0x250 mm/slub.c:3255 anon_vma_chain_alloc mm/rmap.c:141 [inline] anon_vma_fork+0x1df/0x4e0 mm/rmap.c:363 dup_mmap kernel/fork.c:619 [inline] dup_mm kernel/fork.c:1522 [inline] copy_mm+0xa3a/0x13e0 kernel/fork.c:1574 copy_process+0x1149/0x3290 kernel/fork.c:2263 kernel_clone+0x21e/0x9e0 kernel/fork.c:2661 __do_sys_clone kernel/fork.c:2787 [inline] __se_sys_clone kernel/fork.c:2771 [inline] __x64_sys_clone+0x23f/0x290 kernel/fork.c:2771 x64_sys_call+0x1b0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57 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 The buggy address belongs to the object at ffff8881180a7000 which belongs to the cache anon_vma_chain of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8881180a7000, ffff8881180a7040) The buggy address belongs to the page: page:ffffea00046029c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8881180a7ea0 pfn:0x1180a7 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 ffffea00046022c0 0000000500000005 ffff888100186780 raw: ffff8881180a7ea0 00000000802a0000 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 118, ts 5170169946, free_ts 5114116242 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1b/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4485 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5780 allocate_slab mm/slub.c:1932 [inline] new_slab+0x9a/0x4e0 mm/slub.c:1995 ___slab_alloc+0x39e/0x830 mm/slub.c:3028 __slab_alloc+0x4a/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0x139/0x250 mm/slub.c:3255 anon_vma_chain_alloc mm/rmap.c:141 [inline] anon_vma_fork+0x1df/0x4e0 mm/rmap.c:363 dup_mmap kernel/fork.c:619 [inline] dup_mm kernel/fork.c:1522 [inline] copy_mm+0xa3a/0x13e0 kernel/fork.c:1574 copy_process+0x1149/0x3290 kernel/fork.c:2263 kernel_clone+0x21e/0x9e0 kernel/fork.c:2661 __do_sys_clone kernel/fork.c:2787 [inline] __se_sys_clone kernel/fork.c:2771 [inline] __x64_sys_clone+0x23f/0x290 kernel/fork.c:2771 x64_sys_call+0x1b0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57 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:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3534 free_unref_page_list+0x14b/0xa60 mm/page_alloc.c:3671 release_pages+0x1310/0x1370 mm/swap.c:1009 free_pages_and_swap_cache+0x8a/0xa0 mm/swap_state.c:320 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:338 exit_mmap+0x484/0x990 mm/mmap.c:3236 __mmput+0x95/0x310 kernel/fork.c:1180 mmput+0x5b/0x170 kernel/fork.c:1203 exit_mm kernel/exit.c:554 [inline] do_exit+0xb9c/0x2ca0 kernel/exit.c:867 do_group_exit+0x141/0x310 kernel/exit.c:1002 __do_sys_exit_group kernel/exit.c:1013 [inline] __se_sys_exit_group kernel/exit.c:1011 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1011 x64_sys_call+0x610/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:232 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 Memory state around the buggy address: ffff8881180a6f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881180a6f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881180a7000: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb ^ ffff8881180a7080: fb fb fb fb fc fc fc fc fb fb fb fb fb fb fb fb ffff8881180a7100: fc fc fc fc fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================