XFS (loop0): Filesystem has been shut down due to log error (0x2). XFS (loop0): Please unmount the filesystem and rectify the problem(s). ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_write include/linux/instrumented.h:82 [inline] BUG: KASAN: slab-use-after-free in set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline] BUG: KASAN: slab-use-after-free in xlog_cil_ail_insert fs/xfs/xfs_log_cil.c:791 [inline] BUG: KASAN: slab-use-after-free in xlog_cil_committed+0x45e/0x1040 fs/xfs/xfs_log_cil.c:897 Write of size 8 at addr ffff88806aff0ac0 by task kworker/0:1H/56 CPU: 0 UID: 0 PID: 56 Comm: kworker/0:1H Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: xfs-log/loop0 xlog_ioend_work Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:200 instrument_atomic_write include/linux/instrumented.h:82 [inline] set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline] xlog_cil_ail_insert fs/xfs/xfs_log_cil.c:791 [inline] xlog_cil_committed+0x45e/0x1040 fs/xfs/xfs_log_cil.c:897 xlog_cil_process_committed+0x15c/0x1b0 fs/xfs/xfs_log_cil.c:927 xlog_state_shutdown_callbacks+0x269/0x360 fs/xfs/xfs_log.c:488 xlog_force_shutdown+0x332/0x400 fs/xfs/xfs_log.c:3520 xlog_ioend_work+0xaf/0x100 fs/xfs/xfs_log.c:1245 process_one_work+0x94a/0x15d0 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3350 [inline] worker_thread+0x9b0/0xee0 kernel/workqueue.c:3431 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 6575: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:339 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4982 [inline] slab_alloc_node mm/slub.c:5292 [inline] kmem_cache_alloc_noprof+0x37d/0x700 mm/slub.c:5299 xfs_buf_item_init+0x66/0x670 fs/xfs/xfs_buf_item.c:878 _xfs_trans_bjoin+0x46/0x110 fs/xfs/xfs_trans_buf.c:75 xfs_trans_read_buf_map+0x28f/0x8e0 fs/xfs/xfs_trans_buf.c:325 xfs_trans_read_buf fs/xfs/xfs_trans.h:210 [inline] xfs_btree_read_buf_block+0x290/0x470 fs/xfs/libxfs/xfs_btree.c:1402 xfs_btree_lookup_get_block+0x28d/0x500 fs/xfs/libxfs/xfs_btree.c:1907 xfs_btree_lookup+0x4e1/0x1410 fs/xfs/libxfs/xfs_btree.c:2018 xfs_alloc_lookup fs/xfs/libxfs/xfs_alloc.c:166 [inline] xfs_alloc_lookup_eq fs/xfs/libxfs/xfs_alloc.c:184 [inline] xfs_alloc_fixup_trees+0x21b/0xd20 fs/xfs/libxfs/xfs_alloc.c:626 xfs_alloc_cur_finish+0xd3/0x4b0 fs/xfs/libxfs/xfs_alloc.c:1117 xfs_alloc_ag_vextent_near+0xd1a/0x1230 fs/xfs/libxfs/xfs_alloc.c:1776 xfs_alloc_vextent_iterate_ags+0x640/0x940 fs/xfs/libxfs/xfs_alloc.c:3764 xfs_alloc_vextent_start_ag+0x388/0x850 fs/xfs/libxfs/xfs_alloc.c:3839 xfs_bmap_btalloc_best_length fs/xfs/libxfs/xfs_bmap.c:3619 [inline] xfs_bmap_btalloc fs/xfs/libxfs/xfs_bmap.c:3663 [inline] xfs_bmapi_allocate+0x188e/0x2e00 fs/xfs/libxfs/xfs_bmap.c:3938 xfs_bmapi_write+0x7df/0x1260 fs/xfs/libxfs/xfs_bmap.c:4267 xfs_da_grow_inode_int+0x298/0x860 fs/xfs/libxfs/xfs_da_btree.c:2315 xfs_da_grow_inode+0x16d/0x390 fs/xfs/libxfs/xfs_da_btree.c:2380 xfs_attr_shortform_to_leaf+0x273/0x860 fs/xfs/libxfs/xfs_attr_leaf.c:954 xfs_attr_sf_addname fs/xfs/libxfs/xfs_attr.c:402 [inline] xfs_attr_set_iter+0xd30/0x4b70 fs/xfs/libxfs/xfs_attr.c:824 xfs_attr_finish_item+0xed/0x320 fs/xfs/xfs_attr_item.c:506 xfs_defer_finish_one+0x5c8/0xcf0 fs/xfs/libxfs/xfs_defer.c:595 xfs_defer_finish_noroll+0x910/0x12d0 fs/xfs/libxfs/xfs_defer.c:707 xfs_trans_commit+0x10b/0x1c0 fs/xfs/xfs_trans.c:921 xfs_attr_set+0xdc6/0x1210 fs/xfs/libxfs/xfs_attr.c:1150 xfs_xattr_set+0x14d/0x250 fs/xfs/xfs_xattr.c:186 __vfs_setxattr+0x43c/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x274/0x600 fs/xattr.c:665 path_setxattrat+0x364/0x3a0 fs/xattr.c:713 __do_sys_setxattr fs/xattr.c:747 [inline] __se_sys_setxattr fs/xattr.c:743 [inline] __x64_sys_setxattr+0xbc/0xe0 fs/xattr.c:743 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 794: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2547 [inline] slab_free mm/slub.c:6642 [inline] kmem_cache_free+0x19b/0x690 mm/slub.c:6752 __xfs_buf_ioend+0x29c/0x6f0 fs/xfs/xfs_buf.c:1199 xfs_buf_iowait+0x167/0x480 fs/xfs/xfs_buf.c:1381 _xfs_buf_read fs/xfs/xfs_buf.c:643 [inline] xfs_buf_read_map+0x335/0xa50 fs/xfs/xfs_buf.c:709 xfs_trans_read_buf_map+0x1d7/0x8e0 fs/xfs/xfs_trans_buf.c:304 xfs_trans_read_buf fs/xfs/xfs_trans.h:210 [inline] xfs_btree_read_buf_block+0x290/0x470 fs/xfs/libxfs/xfs_btree.c:1402 xfs_btree_lookup_get_block+0x28d/0x500 fs/xfs/libxfs/xfs_btree.c:1907 xfs_btree_lookup+0x4e1/0x1410 fs/xfs/libxfs/xfs_btree.c:2018 xfs_alloc_lookup fs/xfs/libxfs/xfs_alloc.c:166 [inline] xfs_alloc_lookup_le fs/xfs/libxfs/xfs_alloc.c:212 [inline] xfs_free_ag_extent+0x25d/0x1760 fs/xfs/libxfs/xfs_alloc.c:2080 __xfs_free_extent+0x2f1/0x470 fs/xfs/libxfs/xfs_alloc.c:4047 xfs_extent_free_finish_item+0x28b/0x670 fs/xfs/xfs_extfree_item.c:555 xfs_defer_finish_one+0x5c8/0xcf0 fs/xfs/libxfs/xfs_defer.c:595 xfs_defer_finish_noroll+0x910/0x12d0 fs/xfs/libxfs/xfs_defer.c:707 xfs_defer_finish+0x1c/0x180 fs/xfs/libxfs/xfs_defer.c:741 xfs_bunmapi_range+0xc4/0x140 fs/xfs/libxfs/xfs_bmap.c:6169 xfs_itruncate_extents_flags+0x306/0x990 fs/xfs/xfs_inode.c:1077 xfs_itruncate_extents fs/xfs/xfs_inode.h:604 [inline] xfs_inactive_truncate+0x125/0x1b0 fs/xfs/xfs_inode.c:1179 xfs_inactive+0x949/0xcd0 fs/xfs/xfs_inode.c:1465 xfs_inodegc_inactivate fs/xfs/xfs_icache.c:1942 [inline] xfs_inodegc_worker+0x31b/0x7c0 fs/xfs/xfs_icache.c:1988 process_one_work+0x94a/0x15d0 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3350 [inline] worker_thread+0x9b0/0xee0 kernel/workqueue.c:3431 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff88806aff0a80 which belongs to the cache xfs_buf_item of size 272 The buggy address is located 64 bytes inside of freed 272-byte region [ffff88806aff0a80, ffff88806aff0b90) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6aff0 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff888144eea3c0 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000c000c 00000000f5000000 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 0x52c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 6565, tgid 6564 (syz.0.19), ts 136557572930, free_ts 136554432569 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3920 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5209 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3063 [inline] allocate_slab+0x96/0x350 mm/slub.c:3236 new_slab mm/slub.c:3290 [inline] ___slab_alloc+0xf56/0x1990 mm/slub.c:4659 __slab_alloc+0x65/0x100 mm/slub.c:4782 __slab_alloc_node mm/slub.c:4858 [inline] slab_alloc_node mm/slub.c:5280 [inline] kmem_cache_alloc_noprof+0x40f/0x700 mm/slub.c:5299 xfs_buf_item_init+0x66/0x670 fs/xfs/xfs_buf_item.c:878 _xfs_trans_bjoin+0x46/0x110 fs/xfs/xfs_trans_buf.c:75 xfs_trans_read_buf_map+0x28f/0x8e0 fs/xfs/xfs_trans_buf.c:325 xfs_trans_read_buf fs/xfs/xfs_trans.h:210 [inline] xfs_btree_read_buf_block+0x290/0x470 fs/xfs/libxfs/xfs_btree.c:1402 xfs_btree_lookup_get_block+0x28d/0x500 fs/xfs/libxfs/xfs_btree.c:1907 xfs_btree_lookup+0x4e1/0x1410 fs/xfs/libxfs/xfs_btree.c:2018 xfs_alloc_lookup fs/xfs/libxfs/xfs_alloc.c:166 [inline] xfs_alloc_lookup_ge fs/xfs/libxfs/xfs_alloc.c:198 [inline] xfs_alloc_cur_setup fs/xfs/libxfs/xfs_alloc.c:966 [inline] xfs_alloc_ag_vextent_near+0x447/0x1230 fs/xfs/libxfs/xfs_alloc.c:1705 xfs_alloc_vextent_iterate_ags+0x640/0x940 fs/xfs/libxfs/xfs_alloc.c:3764 page last free pid 6565 tgid 6564 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2948 __folio_put+0x21b/0x2c0 mm/swap.c:112 folio_put include/linux/mm.h:1442 [inline] xfs_buf_free+0x2f3/0x5c0 fs/xfs/xfs_buf.c:121 xfs_buf_rele_cached fs/xfs/xfs_buf.c:934 [inline] xfs_buf_rele+0xe1b/0xfe0 fs/xfs/xfs_buf.c:948 xfs_buftarg_drain+0x47b/0x5f0 fs/xfs/xfs_buf.c:1584 xfs_log_mount_finish+0x353/0x3b0 fs/xfs/xfs_log.c:769 xfs_mountfs+0x18b6/0x22c0 fs/xfs/xfs_mount.c:1155 xfs_fs_fill_super+0x11f1/0x1640 fs/xfs/xfs_super.c:1960 get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1692 vfs_get_tree+0x92/0x2b0 fs/super.c:1752 fc_mount fs/namespace.c:1198 [inline] do_new_mount_fc fs/namespace.c:3641 [inline] do_new_mount+0x302/0xa10 fs/namespace.c:3717 do_mount fs/namespace.c:4040 [inline] __do_sys_mount fs/namespace.c:4228 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4205 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88806aff0980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806aff0a00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88806aff0a80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806aff0b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806aff0b80: fb fb fc fc fc fc fc fc fc fc 00 00 00 00 00 00 ==================================================================