================================================================== BUG: KASAN: use-after-free in xfs_iflush_cluster+0xc7/0x12e0 fs/xfs/xfs_inode.c:3646 Read of size 8 at addr ffff88805e962cd0 by task xfsaild/loop6/9272 CPU: 1 PID: 9272 Comm: xfsaild/loop6 Not tainted 5.15.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 xfs_iflush_cluster+0xc7/0x12e0 fs/xfs/xfs_inode.c:3646 xfs_inode_item_push+0x1cd/0x2c0 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+0xce7/0x2780 fs/xfs/xfs_trans_ail.c:657 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 9214: 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+0x9c/0xd0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x100/0x290 mm/slub.c:3233 kmem_cache_zalloc include/linux/slab.h:725 [inline] xfs_inode_item_init+0x2f/0xc0 fs/xfs/xfs_inode_item.c:675 xfs_trans_ijoin+0xb2/0xe0 fs/xfs/libxfs/xfs_trans_inode.c:36 xfs_init_new_inode+0xb2d/0xe80 fs/xfs/xfs_inode.c:918 xfs_symlink+0x9aa/0x1890 fs/xfs/xfs_symlink.c:239 xfs_vn_symlink+0x17c/0x670 fs/xfs/xfs_iops.c:420 vfs_symlink+0x247/0x3d0 fs/namei.c:4429 do_symlinkat+0x1be/0x6c0 fs/namei.c:4458 __do_sys_symlink fs/namei.c:4480 [inline] __se_sys_symlink fs/namei.c:4478 [inline] __x64_sys_symlink+0x7a/0x90 fs/namei.c:4478 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 4303: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kmem_cache_free+0x8f/0x210 mm/slub.c:3515 xfs_inode_free_callback+0x1bc/0x230 fs/xfs/xfs_icache.c:142 rcu_do_batch kernel/rcu/tree.c:2523 [inline] rcu_core+0x962/0x15d0 kernel/rcu/tree.c:2763 handle_softirqs+0x328/0x820 kernel/softirq.c:558 do_softirq+0x13b/0x200 kernel/softirq.c:459 __local_bh_enable_ip+0x174/0x1b0 kernel/softirq.c:383 pneigh_ifdown_and_unlock net/core/neighbour.c:807 [inline] __neigh_ifdown+0x1c0/0x3a0 net/core/neighbour.c:392 neigh_ifdown+0x1b/0x30 net/core/neighbour.c:408 rt6_disable_ip+0x602/0x690 net/ipv6/route.c:4922 addrconf_ifdown+0x149/0x1970 net/ipv6/addrconf.c:3781 addrconf_notify+0x445/0xf00 net/ipv6/addrconf.c:-1 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] unregister_netdevice_many+0xf57/0x18f0 net/core/dev.c:11134 ip_tunnel_delete_nets+0x318/0x360 net/ipv4/ip_tunnel.c:1151 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x77b/0xb80 net/core/net_namespace.c:635 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88805e962c80 which belongs to the cache xfs_ili of size 256 The buggy address is located 80 bytes inside of 256-byte region [ffff88805e962c80, ffff88805e962d80) The buggy address belongs to the page: page:ffffea00017a5880 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5e962 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff88801d893a00 raw: 0000000000000000 00000000800c000c 00000001ffffffff 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 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 4833, ts 95722947758, free_ts 87208002923 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x195/0x290 mm/slub.c:3233 kmem_cache_zalloc include/linux/slab.h:725 [inline] xfs_inode_item_init+0x2f/0xc0 fs/xfs/xfs_inode_item.c:675 xfs_trans_ijoin+0xb2/0xe0 fs/xfs/libxfs/xfs_trans_inode.c:36 xfs_init_new_inode+0xb2d/0xe80 fs/xfs/xfs_inode.c:918 xfs_create+0x749/0xe60 fs/xfs/xfs_inode.c:1044 xfs_generic_create+0x332/0xa20 fs/xfs/xfs_iops.c:197 lookup_open fs/namei.c:3462 [inline] open_last_lookups fs/namei.c:3532 [inline] path_openat+0x11e1/0x2f30 fs/namei.c:3739 do_filp_open+0x1b3/0x3e0 fs/namei.c:3769 do_sys_openat2+0x142/0x4a0 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 free_slab mm/slub.c:2015 [inline] discard_slab mm/slub.c:2021 [inline] __unfreeze_partials+0x1a5/0x200 mm/slub.c:2507 put_cpu_partial+0x12d/0x190 mm/slub.c:2587 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x100/0x290 mm/slub.c:3233 getname_flags+0xb5/0x500 fs/namei.c:138 do_sys_openat2+0xcf/0x4a0 fs/open.c:1247 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88805e962b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805e962c00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88805e962c80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805e962d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805e962d80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================