================================================================== BUG: KASAN: slab-use-after-free in xfs_inode_item_push+0x3c3/0x6d0 fs/xfs/xfs_inode_item.c:801 Read of size 8 at addr ffff888059eb47e0 by task xfsaild/loop8/17952 CPU: 0 UID: 0 PID: 17952 Comm: xfsaild/loop8 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 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 xfs_inode_item_push+0x3c3/0x6d0 fs/xfs/xfs_inode_item.c:801 xfsaild_push_item fs/xfs/xfs_trans_ail.c:390 [inline] xfsaild_push fs/xfs/xfs_trans_ail.c:518 [inline] xfsaild+0xd95/0x2940 fs/xfs/xfs_trans_ail.c:700 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 17956: 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:342 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:368 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4947 [inline] slab_alloc_node mm/slub.c:5246 [inline] kmem_cache_alloc_noprof+0x367/0x6e0 mm/slub.c:5253 xfs_inode_item_init+0x33/0xc0 fs/xfs/xfs_inode_item.c:929 xfs_trans_ijoin+0xe5/0x130 fs/xfs/libxfs/xfs_trans_inode.c:36 xfs_vn_update_time+0x377/0x570 fs/xfs/xfs_iops.c:1224 inode_update_time fs/inode.c:2117 [inline] touch_atime+0x2f9/0x6d0 fs/inode.c:2190 file_accessed include/linux/fs.h:2673 [inline] filemap_read+0x1002/0x11a0 mm/filemap.c:2820 xfs_file_buffered_read+0x1a2/0x350 fs/xfs/xfs_file.c:285 xfs_file_read_iter+0x280/0x510 fs/xfs/xfs_file.c:310 __kernel_read+0x4cf/0x960 fs/read_write.c:530 integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:480 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:511 [inline] ima_calc_file_hash+0x85e/0x16f0 security/integrity/ima/ima_crypto.c:568 ima_collect_measurement+0x428/0x8f0 security/integrity/ima/ima_api.c:293 process_measurement+0x1121/0x1a40 security/integrity/ima/ima_main.c:405 ima_file_check+0xd7/0x120 security/integrity/ima/ima_main.c:633 security_file_post_open+0xbb/0x290 security/security.c:3199 do_open fs/namei.c:3977 [inline] path_openat+0x2f26/0x3830 fs/namei.c:4134 do_filp_open+0x1fa/0x410 fs/namei.c:4161 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1463 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 17911: 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:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] 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:2515 [inline] slab_free mm/slub.c:6574 [inline] kmem_cache_free+0x19b/0x690 mm/slub.c:6684 xfs_inode_free_callback+0x14f/0x1c0 fs/xfs/xfs_icache.c:161 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xcab/0x1770 kernel/rcu/tree.c:2861 handle_softirqs+0x286/0x870 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 The buggy address belongs to the object at ffff888059eb47b0 which belongs to the cache xfs_ili of size 264 The buggy address is located 48 bytes inside of freed 264-byte region [ffff888059eb47b0, ffff888059eb48b8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888059eb48f8 pfn:0x59eb4 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801e348dc0 dead000000000122 0000000000000000 raw: ffff888059eb48f8 00000000800c0009 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 6180, tgid 6179 (syz.4.54), ts 95741080096, free_ts 21169600256 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3031 [inline] allocate_slab+0x96/0x3a0 mm/slub.c:3204 new_slab mm/slub.c:3258 [inline] ___slab_alloc+0xe94/0x18a0 mm/slub.c:4628 __slab_alloc+0x65/0x100 mm/slub.c:4747 __slab_alloc_node mm/slub.c:4823 [inline] slab_alloc_node mm/slub.c:5234 [inline] kmem_cache_alloc_noprof+0x3f9/0x6e0 mm/slub.c:5253 xfs_inode_item_init+0x33/0xc0 fs/xfs/xfs_inode_item.c:929 xfs_trans_ijoin+0xe5/0x130 fs/xfs/libxfs/xfs_trans_inode.c:36 xfs_vn_update_time+0x377/0x570 fs/xfs/xfs_iops.c:1224 inode_update_time fs/inode.c:2117 [inline] touch_atime+0x2f9/0x6d0 fs/inode.c:2190 file_accessed include/linux/fs.h:2673 [inline] filemap_read+0x1002/0x11a0 mm/filemap.c:2820 xfs_file_buffered_read+0x1a2/0x350 fs/xfs/xfs_file.c:285 xfs_file_read_iter+0x280/0x510 fs/xfs/xfs_file.c:310 __kernel_read+0x4cf/0x960 fs/read_write.c:530 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:1394 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2906 __free_pages mm/page_alloc.c:5302 [inline] free_contig_range+0x1bd/0x4a0 mm/page_alloc.c:7146 destroy_args+0x69/0x660 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x39f/0x3b0 mm/debug_vm_pgtable.c:1345 do_one_initcall+0x236/0x820 init/main.c:1283 do_initcall_level+0x104/0x190 init/main.c:1345 do_initcalls+0x59/0xa0 init/main.c:1361 kernel_init_freeable+0x334/0x4b0 init/main.c:1593 kernel_init+0x1d/0x1d0 init/main.c:1483 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888059eb4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888059eb4700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc >ffff888059eb4780: fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb ^ ffff888059eb4800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888059eb4880: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa ==================================================================