================================================================== BUG: KASAN: slab-use-after-free in xfs_inode_item_push+0x293/0x2e0 fs/xfs/xfs_inode_item.c:775 Read of size 8 at addr ffff88805eb0cbb8 by task xfsaild/loop1/8639 CPU: 1 UID: 0 PID: 8639 Comm: xfsaild/loop1 Not tainted 6.11.0-rc6-syzkaller-00048-gc7fb1692dc01 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 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 xfs_inode_item_push+0x293/0x2e0 fs/xfs/xfs_inode_item.c:775 xfsaild_push_item fs/xfs/xfs_trans_ail.c:395 [inline] xfsaild_push fs/xfs/xfs_trans_ail.c:523 [inline] xfsaild+0x112c/0x2e00 fs/xfs/xfs_trans_ail.c:705 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 8630: 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+0x66/0x80 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3992 [inline] slab_alloc_node mm/slub.c:4041 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4048 xfs_inode_item_init+0x33/0xc0 fs/xfs/xfs_inode_item.c:870 xfs_trans_ijoin+0xeb/0x130 fs/xfs/libxfs/xfs_trans_inode.c:36 xfs_icreate+0x13a/0x1f0 fs/xfs/xfs_inode.c:593 xfs_qm_qino_alloc+0x284/0x6f0 fs/xfs/xfs_qm.c:804 xfs_qm_init_quotainos+0x622/0x8a0 fs/xfs/xfs_qm.c:1596 xfs_qm_init_quotainfo+0x138/0x1120 fs/xfs/xfs_qm.c:643 xfs_qm_mount_quotas+0x9b/0x630 fs/xfs/xfs_qm.c:1480 xfs_mountfs+0x1993/0x2020 fs/xfs/xfs_mount.c:980 xfs_fs_fill_super+0x11a6/0x1420 fs/xfs/xfs_super.c:1753 get_tree_bdev+0x3f9/0x570 fs/super.c:1635 vfs_get_tree+0x92/0x2b0 fs/super.c:1800 do_new_mount+0x2be/0xb40 fs/namespace.c:3472 do_mount fs/namespace.c:3812 [inline] __do_sys_mount fs/namespace.c:4020 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3997 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 3: 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+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2256 [inline] slab_free mm/slub.c:4477 [inline] kmem_cache_free+0x145/0x350 mm/slub.c:4552 xfs_inode_free_callback+0x152/0x1d0 fs/xfs/xfs_icache.c:145 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0xaff/0x1830 kernel/rcu/tree.c:2843 handle_softirqs+0x2c6/0x970 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 The buggy address belongs to the object at ffff88805eb0cb88 which belongs to the cache xfs_ili of size 264 The buggy address is located 48 bytes inside of freed 264-byte region [ffff88805eb0cb88, ffff88805eb0cc90) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5eb0c flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000000 ffff8880207f3b40 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800c000c 00000001fdffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x152c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 5230, tgid 5230 (syz-executor), ts 95524793113, free_ts 23834192800 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3446 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4702 __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:2325 allocate_slab+0x5a/0x2f0 mm/slub.c:2488 new_slab mm/slub.c:2541 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3727 __slab_alloc+0x58/0xa0 mm/slub.c:3817 __slab_alloc_node mm/slub.c:3870 [inline] slab_alloc_node mm/slub.c:4029 [inline] kmem_cache_alloc_noprof+0x1c1/0x2a0 mm/slub.c:4048 xfs_inode_item_init+0x33/0xc0 fs/xfs/xfs_inode_item.c:870 xfs_trans_ijoin+0xeb/0x130 fs/xfs/libxfs/xfs_trans_inode.c:36 xfs_trans_alloc_dir+0x235/0x750 fs/xfs/xfs_trans.c:1340 xfs_remove+0x5e5/0xc10 fs/xfs/xfs_inode.c:2003 xfs_vn_unlink+0x151/0x2a0 fs/xfs/xfs_iops.c:410 vfs_unlink+0x367/0x650 fs/namei.c:4422 do_unlinkat+0x4ae/0x830 fs/namei.c:4486 __do_sys_unlink fs/namei.c:4534 [inline] __se_sys_unlink fs/namei.c:4532 [inline] __x64_sys_unlink+0x47/0x50 fs/namei.c:4532 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2619 free_contig_range+0x9e/0x160 mm/page_alloc.c:6667 destroy_args+0x8a/0x890 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x4be/0x550 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x24a/0x880 init/main.c:1267 do_initcall_level+0x157/0x210 init/main.c:1329 do_initcalls+0x3f/0x80 init/main.c:1345 kernel_init_freeable+0x435/0x5d0 init/main.c:1578 kernel_init+0x1d/0x2b0 init/main.c:1467 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88805eb0ca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805eb0cb00: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc >ffff88805eb0cb80: fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805eb0cc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805eb0cc80: fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb ==================================================================