================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2913 Read of size 4 at addr ffff888126277000 by task syz-executor/477 CPU: 0 PID: 477 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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/0x200 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:420 kasan_report+0x122/0x150 mm/kasan/report.c:524 __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:708 iput_final fs/inode.c:1844 [inline] iput+0x620/0x670 fs/inode.c:1870 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:0x7fece9a7c6c7 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:00007fff176053e8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fece9a7c6c7 RDX: 0000000000000200 RSI: 00007fff17606590 RDI: 00000000ffffff9c RBP: 00007fece9ac8336 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007fff17606590 R13: 00007fece9ac8336 R14: 000000000000a820 R15: 0000000000000007 Allocated by task 436: 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:3382 [inline] slab_alloc mm/slub.c:3392 [inline] __kmem_cache_alloc_lru mm/slub.c:3399 [inline] kmem_cache_alloc+0x16e/0x330 mm/slub.c:3408 prepare_creds+0x2f/0x640 kernel/cred.c:263 prepare_exec_creds+0x18/0x220 kernel/cred.c:314 prepare_bprm_creds fs/exec.c:1484 [inline] bprm_execve+0xf2/0x1440 fs/exec.c:1821 do_execveat_common+0x915/0xa70 fs/exec.c:1958 do_execve fs/exec.c:2032 [inline] __do_sys_execve fs/exec.c:2108 [inline] __se_sys_execve fs/exec.c:2103 [inline] __x64_sys_execve+0x92/0xb0 fs/exec.c:2103 x64_sys_call+0x98/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:60 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 0: 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:1750 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776 slab_free mm/slub.c:3712 [inline] kmem_cache_free+0x12d/0x300 mm/slub.c:3737 put_cred_rcu+0x24f/0x2f0 kernel/cred.c:128 rcu_do_batch+0x515/0xb90 kernel/rcu/tree.c:2297 rcu_core+0x5a5/0xe70 kernel/rcu/tree.c:2557 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2574 handle_softirqs+0x1d7/0x600 kernel/softirq.c:642 __do_softirq kernel/softirq.c:680 [inline] invoke_softirq kernel/softirq.c:497 [inline] __irq_exit_rcu+0x52/0xf0 kernel/softirq.c:729 irq_exit_rcu+0x9/0x10 kernel/softirq.c:741 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496 __call_rcu_common kernel/rcu/tree.c:2807 [inline] call_rcu+0xd4/0xf90 kernel/rcu/tree.c:2926 __put_cred+0xf4/0x150 kernel/cred.c:155 put_cred include/linux/cred.h:288 [inline] file_free_rcu+0x76/0xa0 fs/file_table.c:50 rcu_do_batch+0x515/0xb90 kernel/rcu/tree.c:2297 rcu_core+0x5a5/0xe70 kernel/rcu/tree.c:2557 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2574 handle_softirqs+0x1d7/0x600 kernel/softirq.c:642 run_ksoftirqd+0x28/0x30 kernel/softirq.c:1019 smpboot_thread_fn+0x4a0/0x910 kernel/smpboot.c:164 kthread+0x281/0x320 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888126277000 which belongs to the cache cred_jar of size 176 The buggy address is located 0 bytes inside of 176-byte region [ffff888126277000, ffff8881262770b0) The buggy address belongs to the physical page: page:ffffea0004989dc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x126277 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff8881001ea300 raw: 0000000000000000 0000000000100010 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 395, tgid 392 (syz-execprog), ts 41302567140, free_ts 34535017012 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2643 prep_new_page+0x1c/0x110 mm/page_alloc.c:2650 get_page_from_freelist+0x2c7b/0x2cf0 mm/page_alloc.c:4554 __alloc_pages+0x1c3/0x450 mm/page_alloc.c:5868 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1967 [inline] new_slab+0x98/0x3d0 mm/slub.c:2020 ___slab_alloc+0x6bd/0xb20 mm/slub.c:3177 __slab_alloc+0x5e/0xa0 mm/slub.c:3263 slab_alloc_node mm/slub.c:3348 [inline] slab_alloc mm/slub.c:3392 [inline] __kmem_cache_alloc_lru mm/slub.c:3399 [inline] kmem_cache_alloc+0x1b0/0x330 mm/slub.c:3408 prepare_creds+0x2f/0x640 kernel/cred.c:263 copy_creds+0xe4/0x640 kernel/cred.c:368 copy_process+0x828/0x3480 kernel/fork.c:2318 kernel_clone+0x23a/0x810 kernel/fork.c:2874 __do_sys_clone kernel/fork.c:3017 [inline] __se_sys_clone kernel/fork.c:3001 [inline] __x64_sys_clone+0x168/0x1b0 kernel/fork.c:3001 x64_sys_call+0x990/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1551 [inline] free_pcp_prepare mm/page_alloc.c:1625 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3589 free_unref_page+0x8f/0x530 mm/page_alloc.c:3687 __folio_put_small mm/swap.c:100 [inline] __folio_put+0xac/0xe0 mm/swap.c:123 folio_put include/linux/mm.h:1442 [inline] put_page include/linux/mm.h:1494 [inline] anon_pipe_buf_release+0x183/0x200 fs/pipe.c:138 pipe_buf_release include/linux/pipe_fs_i.h:199 [inline] pipe_read+0x55d/0x1000 fs/pipe.c:324 call_read_iter include/linux/fs.h:2276 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x41e/0x8c0 fs/read_write.c:470 ksys_read+0x140/0x240 fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:621 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 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 Memory state around the buggy address: ffff888126276f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888126276f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888126277000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888126277080: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff888126277100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== 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. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem.