================================================================== BUG: KASAN: use-after-free in xfs_iflush_cluster+0x9c/0x113c Read of size 8 at addr ffff0000dc316910 by task xfsaild/loop2/7913 CPU: 0 PID: 7913 Comm: xfsaild/loop2 Not tainted 5.15.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x174/0x1e4 mm/kasan/report.c:451 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 xfs_iflush_cluster+0x9c/0x113c xfs_inode_item_push+0x190/0x28c fs/xfs/xfs_inode_item.c:567 xfsaild_push_item fs/xfs/xfs_trans_ail.c:414 [inline] xfsaild_push fs/xfs/xfs_trans_ail.c:472 [inline] xfsaild+0xb58/0x2bfc fs/xfs/xfs_trans_ail.c:657 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Allocated by task 7882: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x8c/0xcc mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x74/0x3f4 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x1dc/0x45c mm/slub.c:3233 kmem_cache_zalloc include/linux/slab.h:711 [inline] xfs_inode_item_init+0x3c/0xc0 fs/xfs/xfs_inode_item.c:675 xfs_trans_ijoin+0xc4/0xe8 fs/xfs/libxfs/xfs_trans_inode.c:36 xfs_init_new_inode+0xa50/0xd58 fs/xfs/xfs_inode.c:918 xfs_symlink+0x9f0/0x1a20 fs/xfs/xfs_symlink.c:239 xfs_vn_symlink+0x1b4/0x644 fs/xfs/xfs_iops.c:420 vfs_symlink+0x244/0x3a8 fs/namei.c:4429 do_symlinkat+0x364/0x6b0 fs/namei.c:4458 __do_sys_symlinkat fs/namei.c:4475 [inline] __se_sys_symlinkat fs/namei.c:4472 [inline] __arm64_sys_symlinkat+0xa4/0xbc fs/namei.c:4472 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Freed by task 7982: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x84 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360 ____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0x128/0x1ec mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kmem_cache_free+0xdc/0x3c4 mm/slub.c:3515 xfs_inode_item_destroy+0x80/0x94 fs/xfs/xfs_inode_item.c:697 xfs_inode_free_callback+0x1c4/0x240 fs/xfs/xfs_icache.c:142 rcu_do_batch kernel/rcu/tree.c:2523 [inline] rcu_core+0x830/0x1b34 kernel/rcu/tree.c:2763 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2776 handle_softirqs+0x384/0xdbc kernel/softirq.c:558 __do_softirq kernel/softirq.c:592 [inline] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] invoke_softirq kernel/softirq.c:439 [inline] __irq_exit_rcu+0x268/0x4d8 kernel/softirq.c:641 irq_exit+0x14/0x88 kernel/softirq.c:665 handle_domain_irq+0xf4/0x178 kernel/irq/irqdesc.c:711 gic_handle_irq+0x78/0x1c8 drivers/irqchip/irq-gic-v3.c:765 The buggy address belongs to the object at ffff0000dc3168c0 which belongs to the cache xfs_ili of size 256 The buggy address is located 80 bytes inside of 256-byte region [ffff0000dc3168c0, ffff0000dc3169c0) The buggy address belongs to the page: page:000000004ea78551 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11c316 flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 0000000000000000 dead000000000122 ffff0000c697b380 raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000dc316800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000dc316880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff0000dc316900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000dc316980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff0000dc316a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================