Hello,
syzbot found the following issue on:
HEAD commit: cd9b81672742 Linux 6.1.161
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=17d65d22580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=b1adc0bfde2d8a4a
dashboard link:
https://syzkaller.appspot.com/bug?extid=2e2883b75fabb8171bd8
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/d21df4411014/disk-cd9b8167.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/246aed0358fb/vmlinux-cd9b8167.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/a6f546504ec2/Image-cd9b8167.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+2e2883...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in xfs_inode_item_push+0x240/0x28c fs/xfs/xfs_inode_item.c:776
Read of size 8 at addr ffff0000e0640d00 by task xfsaild/loop5/8963
CPU: 0 PID: 8963 Comm: xfsaild/loop5 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025
Call trace:
dump_backtrace+0x1c0/0x1ec arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
print_address_description+0x88/0x218 mm/kasan/report.c:316
print_report+0x50/0x68 mm/kasan/report.c:420
kasan_report+0xa8/0xfc mm/kasan/report.c:524
__asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351
xfs_inode_item_push+0x240/0x28c fs/xfs/xfs_inode_item.c:776
xfsaild_push_item fs/xfs/xfs_trans_ail.c:414 [inline]
xfsaild_push fs/xfs/xfs_trans_ail.c:484 [inline]
xfsaild+0xaa4/0x2848 fs/xfs/xfs_trans_ail.c:669
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850
Allocated by task 8973:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:53
kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
__kasan_slab_alloc+0x70/0x88 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x74/0x430 mm/slab.h:737
slab_alloc_node mm/slub.c:3359 [inline]
slab_alloc mm/slub.c:3367 [inline]
__kmem_cache_alloc_lru mm/slub.c:3374 [inline]
kmem_cache_alloc+0x22c/0x308 mm/slub.c:3383
kmem_cache_zalloc include/linux/slab.h:689 [inline]
xfs_inode_item_init+0x3c/0xc0 fs/xfs/xfs_inode_item.c:871
xfs_trans_ijoin+0xd4/0x120 fs/xfs/libxfs/xfs_trans_inode.c:36
xfs_setattr_size+0x464/0xb1c fs/xfs/xfs_iops.c:905
xfs_vn_setattr_size fs/xfs/xfs_iops.c:991 [inline]
xfs_vn_setattr+0x2f8/0x37c fs/xfs/xfs_iops.c:1016
notify_change+0xb0c/0xdcc fs/attr.c:499
do_truncate+0x188/0x20c fs/open.c:65
handle_truncate fs/namei.c:3293 [inline]
do_open fs/namei.c:3638 [inline]
path_openat+0x2110/0x26bc fs/namei.c:3791
do_filp_open+0x194/0x384 fs/namei.c:3818
do_sys_openat2+0x134/0x3f4 fs/open.c:1320
do_sys_open fs/open.c:1336 [inline]
__do_sys_openat fs/open.c:1352 [inline]
__se_sys_openat fs/open.c:1347 [inline]
__arm64_sys_openat+0x118/0x14c fs/open.c:1347
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Freed by task 21:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:53
kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516
____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:237
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:245
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x16c/0x1e8 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
kmem_cache_free+0x118/0x314 mm/slub.c:3709
xfs_inode_item_destroy+0x70/0x84 fs/xfs/xfs_inode_item.c:893
xfs_inode_free_callback+0x14c/0x1bc fs/xfs/xfs_icache.c:145
rcu_do_batch kernel/rcu/tree.c:2297 [inline]
rcu_core+0x828/0x18b0 kernel/rcu/tree.c:2557
rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2574
handle_softirqs+0x318/0xc60 kernel/softirq.c:596
run_ksoftirqd+0x7c/0x2ac kernel/softirq.c:968
smpboot_thread_fn+0x4b0/0x964 kernel/smpboot.c:164
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850
The buggy address belongs to the object at ffff0000e0640cd0
which belongs to the cache xfs_ili of size 264
The buggy address is located 48 bytes inside of
264-byte region [ffff0000e0640cd0, ffff0000e0640dd8)
The buggy address belongs to the physical page:
page:0000000072eab60e refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000e0640b88 pfn:0x120640
flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000200 fffffc0003880580 dead000000000003 ffff0000c4c18d80
raw: ffff0000e0640b88 00000000800c000a 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000e0640c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000e0640c80: fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb
>ffff0000e0640d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000e0640d80: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc
ffff0000e0640e00: fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup