================================================================== BUG: KASAN: slab-use-after-free in xfs_inode_item_push+0x293/0x2e0 fs/xfs/xfs_inode_item.c:797 Read of size 8 at addr ffff888056b63178 by task xfsaild/loop8/8648 CPU: 0 UID: 0 PID: 8648 Comm: xfsaild/loop8 Not tainted 6.15.0-rc3-syzkaller-00019-gbc3372351d0c #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 xfs_inode_item_push+0x293/0x2e0 fs/xfs/xfs_inode_item.c:797 xfsaild_push_item fs/xfs/xfs_trans_ail.c:390 [inline] xfsaild_push fs/xfs/xfs_trans_ail.c:518 [inline] xfsaild+0x1148/0x2c50 fs/xfs/xfs_trans_ail.c:700 kthread+0x7b9/0x940 kernel/kthread.c:464 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 8631: 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:319 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4161 [inline] slab_alloc_node mm/slub.c:4210 [inline] kmem_cache_alloc_noprof+0x1e1/0x390 mm/slub.c:4217 xfs_inode_item_init+0x33/0xc0 fs/xfs/xfs_inode_item.c:892 xfs_trans_ijoin+0xeb/0x130 fs/xfs/libxfs/xfs_trans_inode.c:36 xfs_create+0x906/0x1060 fs/xfs/xfs_inode.c:732 xfs_generic_create+0x5d9/0xf50 fs/xfs/xfs_iops.c:216 lookup_open fs/namei.c:3701 [inline] open_last_lookups fs/namei.c:3800 [inline] path_openat+0x194d/0x35d0 fs/namei.c:4036 do_filp_open+0x284/0x4e0 fs/namei.c:4066 do_sys_openat2+0x12b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x249/0x2a0 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 15: 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:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2398 [inline] slab_free mm/slub.c:4656 [inline] kmem_cache_free+0x197/0x410 mm/slub.c:4758 xfs_inode_free_callback+0x152/0x1d0 fs/xfs/xfs_icache.c:161 rcu_do_batch kernel/rcu/tree.c:2568 [inline] rcu_core+0xaae/0x17a0 kernel/rcu/tree.c:2824 handle_softirqs+0x2d8/0x9b0 kernel/softirq.c:579 run_ksoftirqd+0xcf/0x130 kernel/softirq.c:968 smpboot_thread_fn+0x578/0xaa0 kernel/smpboot.c:164 kthread+0x7b9/0x940 kernel/kthread.c:464 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888056b63148 which belongs to the cache xfs_ili of size 264 The buggy address is located 48 bytes inside of freed 264-byte region [ffff888056b63148, ffff888056b63250) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888056b63520 pfn:0x56b63 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801cf3a8c0 dead000000000122 0000000000000000 raw: ffff888056b63520 00000000800c0006 00000000f5000000 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 0x52c50(GFP_NOFS|__GFP_RECLAIMABLE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5982, tgid 5981 (syz.3.16), ts 101933532654, free_ts 27840449451 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x360a/0x37a0 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x211/0x5b0 mm/page_alloc.c:4970 alloc_pages_mpol+0x339/0x690 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2468 [inline] allocate_slab+0x8f/0x3b0 mm/slub.c:2632 new_slab mm/slub.c:2686 [inline] ___slab_alloc+0xc3b/0x1500 mm/slub.c:3872 __slab_alloc+0x58/0xa0 mm/slub.c:3962 __slab_alloc_node mm/slub.c:4037 [inline] slab_alloc_node mm/slub.c:4198 [inline] kmem_cache_alloc_noprof+0x270/0x390 mm/slub.c:4217 xfs_inode_item_init+0x33/0xc0 fs/xfs/xfs_inode_item.c:892 xfs_trans_ijoin+0xeb/0x130 fs/xfs/libxfs/xfs_trans_inode.c:36 xfs_icreate+0x13c/0x1f0 fs/xfs/xfs_inode.c:605 xfs_qm_qino_alloc+0x2c9/0x770 fs/xfs/xfs_qm.c:1034 xfs_qm_init_quotainos+0x61f/0x8c0 fs/xfs/xfs_qm.c:1876 xfs_qm_init_quotainfo+0x184/0x12a0 fs/xfs/xfs_qm.c:860 xfs_qm_mount_quotas+0x9e/0x6c0 fs/xfs/xfs_qm.c:1727 xfs_mountfs+0x1ec3/0x2510 fs/xfs/xfs_mount.c:1053 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:1262 [inline] __free_frozen_pages+0xde8/0x10a0 mm/page_alloc.c:2725 __free_pages mm/page_alloc.c:5080 [inline] free_contig_range+0x154/0x430 mm/page_alloc.c:6936 destroy_args+0x94/0x4b0 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x555/0x590 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x24c/0x940 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x71/0xd0 init/main.c:1335 kernel_init_freeable+0x432/0x5d0 init/main.c:1567 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888056b63000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888056b63080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888056b63100: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb ^ ffff888056b63180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888056b63200: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc ==================================================================