syzbot


kernel BUG in ocfs2_truncate_log_append

Status: upstream: reported on 2025/09/05 20:50
Reported-by: syzbot+521ac033491cfb9fa8a7@syzkaller.appspotmail.com
First crash: 1d18h, last: 1d18h
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in ocfs2_truncate_log_append ocfs2 -1 C 4 251d 304d 28/29 fixed on 2025/05/06 15:33
linux-5.15 kernel BUG in ocfs2_truncate_log_append -1 1 1d15h 1d15h 0/3 upstream: reported on 2025/09/06 00:18
linux-6.6 kernel BUG in ocfs2_truncate_log_append -1 C 5 1d16h 1d20h 0/2 upstream: reported C repro on 2025/09/05 19:08

Sample crash report:
(syz.0.26,4595,0):ocfs2_truncate_log_append:5875 ERROR: Truncate record count on #77 invalid wanted 39, actual 40
------------[ cut here ]------------
kernel BUG at fs/ocfs2/alloc.c:5875!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 4595 Comm: syz.0.26 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:ocfs2_truncate_log_append+0x92a/0x940 fs/ocfs2/alloc.c:5869
Code: 0f b7 04 24 4c 89 ef 48 c7 c6 5e 2d 49 8c ba f3 16 00 00 48 c7 c1 00 c6 cb 8a 4d 89 f0 41 89 d9 50 e8 4a b1 1c 00 48 83 c4 08 <0f> 0b e8 6f 81 4b fe 0f 0b e8 68 81 4b fe 0f 0b 66 0f 1f 44 00 00
RSP: 0018:ffffc90006106bc0 EFLAGS: 00010296
RAX: 3a443a1bcc48a000 RBX: 0000000000000027 RCX: 3a443a1bcc48a000
RDX: ffffc90005489000 RSI: 0000000000022972 RDI: 0000000000022973
RBP: ffffc90006106cf0 R08: dffffc0000000000 R09: fffff52000c20ced
R10: fffff52000c20ced R11: 1ffff92000c20cec R12: ffff88805201dac0
R13: ffffc90006106c60 R14: 000000000000004d R15: 1ffff1100a403b58
FS:  00007f5e458666c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2629b44000 CR3: 000000005914e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ocfs2_remove_btree_range+0x1028/0x1480 fs/ocfs2/alloc.c:5790
 ocfs2_commit_truncate+0xaf5/0x1bf0 fs/ocfs2/alloc.c:7354
 ocfs2_truncate_file+0xcd6/0x14d0 fs/ocfs2/file.c:505
 ocfs2_setattr+0x16a9/0x1cf0 fs/ocfs2/file.c:1212
 notify_change+0xc74/0xf40 fs/attr.c:499
 do_truncate+0x197/0x220 fs/open.c:65
 handle_truncate fs/namei.c:3285 [inline]
 do_open fs/namei.c:3630 [inline]
 path_openat+0x27f2/0x2e70 fs/namei.c:3783
 do_filp_open+0x1c1/0x3c0 fs/namei.c:3810
 do_sys_openat2+0x142/0x490 fs/open.c:1318
 do_sys_open fs/open.c:1334 [inline]
 __do_sys_openat fs/open.c:1350 [inline]
 __se_sys_openat fs/open.c:1345 [inline]
 __x64_sys_openat+0x135/0x160 fs/open.c:1345
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f5e4498ebe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5e45866038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f5e44bc5fa0 RCX: 00007f5e4498ebe9
RDX: 0000000000181242 RSI: 0000200000000180 RDI: ffffffffffffff9c
RBP: 00007f5e44a11e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000148 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5e44bc6038 R14: 00007f5e44bc5fa0 R15: 00007ffe56b82718
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ocfs2_truncate_log_append+0x92a/0x940 fs/ocfs2/alloc.c:5869
Code: 0f b7 04 24 4c 89 ef 48 c7 c6 5e 2d 49 8c ba f3 16 00 00 48 c7 c1 00 c6 cb 8a 4d 89 f0 41 89 d9 50 e8 4a b1 1c 00 48 83 c4 08 <0f> 0b e8 6f 81 4b fe 0f 0b e8 68 81 4b fe 0f 0b 66 0f 1f 44 00 00
RSP: 0018:ffffc90006106bc0 EFLAGS: 00010296
RAX: 3a443a1bcc48a000 RBX: 0000000000000027 RCX: 3a443a1bcc48a000
RDX: ffffc90005489000 RSI: 0000000000022972 RDI: 0000000000022973
RBP: ffffc90006106cf0 R08: dffffc0000000000 R09: fffff52000c20ced
R10: fffff52000c20ced R11: 1ffff92000c20cec R12: ffff88805201dac0
R13: ffffc90006106c60 R14: 000000000000004d R15: 1ffff1100a403b58
FS:  00007f5e458666c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f262958c000 CR3: 000000005914e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/05 20:49 linux-6.1.y 28c695c365e1 d291dd2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan kernel BUG in ocfs2_truncate_log_append
* Struck through repros no longer work on HEAD.