Hello,
syzbot found the following issue on:
HEAD commit: fb28aa725e05 Linux 6.1.180
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=123ef4c6580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=872c04466179833f
dashboard link:
https://syzkaller.appspot.com/bug?extid=a2649aff807bcb7f85bf
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
userspace arch: arm64
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=11901db9580000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=1279ac9e580000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/d420eb944682/disk-fb28aa72.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/affae450ab23/vmlinux-fb28aa72.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/b9e6919ed519/Image-fb28aa72.gz.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/c0cc1124a452/mount_0.gz
fsck result: OK (log:
https://syzkaller.appspot.com/x/fsck.log?x=16e34649580000)
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+a2649a...@syzkaller.appspotmail.com
(syz.0.17,4531,1):ocfs2_truncate_log_append:5874 ERROR: bug expression: tl_count > ocfs2_truncate_recs_per_inode(osb->sb) || tl_count == 0
(syz.0.17,4531,1):ocfs2_truncate_log_append:5874 ERROR: Truncate record count on #77 invalid wanted 39, actual 2087
------------[ cut here ]------------
kernel BUG at fs/ocfs2/alloc.c:5874!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4531 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/02/2026
pstate: 62400005 (nZCv daif +PAN -UAO +TCO -DIT -SSBS BTYPE=--)
pc : ocfs2_truncate_log_append+0x790/0x7a4 fs/ocfs2/alloc.c:5868
lr : ocfs2_truncate_log_append+0x784/0x7a4 fs/ocfs2/alloc.c:5868
sp : ffff8000214d6e80
x29: ffff8000214d6f60 x28: 0000000000000827 x27: ffff8000214d6ec0
x26: ffff0000ea91bac0 x25: 1fffe0001d523758 x24: ffff70000429add8
x23: ffff0000d1a6c008 x22: 1fffe0001a34d801 x21: 000000000000004d
x20: 0000000000000027 x19: dfff800000000000 x18: 1fffe00033e7697e
x17: ffff80001537d000 x16: ffff800011b90080 x15: 0000000040000000
x14: 0000000000000001 x13: 1ffff0000429ad10 x12: 0000000000000000
x11: ff00800008315484 x10: 0000000000000000 x9 : ffff70000429add8
x8 : 00000000000000f8 x7 : ffff80000825ab50 x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000001 x3 : ffff80000a927f5c
x2 : ffff00019f3b4d10 x1 : 0000000100000000 x0 : 0000000000000073
Call trace:
ocfs2_truncate_log_append+0x790/0x7a4 fs/ocfs2/alloc.c:5868
ocfs2_remove_btree_range+0xee4/0x12e8 fs/ocfs2/alloc.c:5789
ocfs2_remove_inode_range+0x14d4/0x2478 fs/ocfs2/file.c:1907
ocfs2_reflink_remap_extent fs/ocfs2/refcounttree.c:4543 [inline]
ocfs2_reflink_remap_blocks+0x9fc/0x15e8 fs/ocfs2/refcounttree.c:4690
ocfs2_remap_file_range+0x3f8/0x640 fs/ocfs2/file.c:2703
vfs_copy_file_range+0xbdc/0x1118 fs/read_write.c:1518
__do_sys_copy_file_range fs/read_write.c:1596 [inline]
__se_sys_copy_file_range fs/read_write.c:1559 [inline]
__arm64_sys_copy_file_range+0x4e0/0x800 fs/read_write.c:1559
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x5c/0x134 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
Code: 9406c020 f9401fe9 52801f08 39002128 (d4210000)
---[ end trace 0000000000000000 ]---
---
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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
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