================================================================== 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 ffff888077b99178 by task xfsaild/loop5/13453 CPU: 1 UID: 0 PID: 13453 Comm: xfsaild/loop5 Not tainted 6.12.0-rc6-syzkaller-00077-g2e1b3cc9d7f7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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: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 13424: 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:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4141 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+0x287/0x6e0 fs/xfs/xfs_qm.c:804 xfs_qm_init_quotainos+0x78d/0x8a0 fs/xfs/xfs_qm.c:1646 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+0x1a16/0x20d0 fs/xfs/xfs_mount.c:984 xfs_fs_fill_super+0x11f0/0x1460 fs/xfs/xfs_super.c:1765 get_tree_bdev_flags+0x48e/0x5c0 fs/super.c:1636 vfs_get_tree+0x92/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034 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 8017: 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 mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4579 [inline] kmem_cache_free+0x1a2/0x420 mm/slub.c:4681 xfs_inode_free_callback+0x152/0x1d0 fs/xfs/xfs_icache.c:158 rcu_do_batch kernel/rcu/tree.c:2567 [inline] rcu_core+0xaac/0x17a0 kernel/rcu/tree.c:2823 handle_softirqs+0x2c7/0x980 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:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 The buggy address belongs to the object at ffff888077b99148 which belongs to the cache xfs_ili of size 264 The buggy address is located 48 bytes inside of freed 264-byte region [ffff888077b99148, ffff888077b99250) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888077b998f8 pfn:0x77b99 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88814728f280 dead000000000122 0000000000000000 raw: ffff888077b998f8 00000000800c000b 00000001f5000000 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_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_RECLAIMABLE), pid 5852, tgid 5852 (syz-executor), ts 114772985120, free_ts 94348839654 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x303f/0x3190 mm/page_alloc.c:3457 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x140 mm/slub.c:2412 allocate_slab+0x5a/0x2f0 mm/slub.c:2578 new_slab mm/slub.c:2631 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818 __slab_alloc+0x58/0xa0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] kmem_cache_alloc_noprof+0x1c1/0x2a0 mm/slub.c:4141 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:1921 xfs_vn_unlink+0x151/0x2a0 fs/xfs/xfs_iops.c:410 vfs_unlink+0x367/0x650 fs/namei.c:4469 do_unlinkat+0x4ae/0x830 fs/namei.c:4533 page last free pid 5839 tgid 5839 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0xcfb/0xf20 mm/page_alloc.c:2638 __slab_free+0x31b/0x3d0 mm/slub.c:4490 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] kmem_cache_alloc_node_noprof+0x16b/0x320 mm/slub.c:4186 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:668 netlink_sendmsg+0x638/0xcb0 net/netlink/af_netlink.c:1876 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x223/0x270 net/socket.c:744 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607 ___sys_sendmsg net/socket.c:2661 [inline] __sys_sendmsg+0x292/0x380 net/socket.c:2690 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 Memory state around the buggy address: ffff888077b99000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888077b99080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888077b99100: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb ^ ffff888077b99180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888077b99200: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc ==================================================================