Hello, I found a bug titled “ kernel BUG in ocfs2_refcount_cal_cow_clusters” with modified syzkaller in the Linux6.9-rc7 relegated to oracle cluster file system.
If you fix this issue, please add the following tag to the commit:
Reported-by:jianzhou zhao <xnxc22xnxc22@xxxxxx> , xingwei lee < xrivendell7@xxxxxxxxx>
------------[ cut here ]------------
Title: 'kernel BUG in ocfs2_refcount_cal_cow_clusters'
ocfs2: Mounting device (7,0) on (node local, slot 0) with writeback data mode.
kernel BUG at fs/ocfs2/refcounttree.c:2684!
invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
CPU: 1 PID: 7960 Comm: syz-executor385 Not tainted 6.9.0-rc7 #7
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:ocfs2_refcount_cal_cow_clusters+0x667/0x960 fs/ocfs2/refcounttree.c:2684
Code: f3 45 86 48 c7 c6 c0 32 5a 85 4d 8b 44 24 18 48 8b 48 40 48 8b 78 28 e8 67 29 05 00 41 89 c4 e9 e5 fd ff ff e8 4a 14 40 ff 90 <0f> 0b e8 42 14 40 ff 48 8b 55 a8 44 89 e8 44 89 fb 44 29 f8 89 02
RSP: 0018:ffff8880462cfba0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8880528b04d0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff8880462cfc18 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
FS: 0000555576e563c0(0000) GS:ffff88807ec00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002000d000 CR3: 0000000045e3e000 CR4: 0000000000750ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
<TASK>
ocfs2_refcount_cow_hunk+0x98/0x550 fs/ocfs2/refcounttree.c:3394
ocfs2_refcount_cow+0x65/0x2e0 fs/ocfs2/refcounttree.c:3476
ocfs2_prepare_inode_for_write.isra.0+0x630/0x970 fs/ocfs2/file.c:2326
ocfs2_file_write_iter+0x23d/0xb10 fs/ocfs2/file.c:2435
call_write_iter include/linux/fs.h:2110 [inline]
new_sync_write fs/read_write.c:497 [inline]
vfs_write+0x5a0/0x6e0 fs/read_write.c:590
ksys_write+0x9b/0x160 fs/read_write.c:643
__do_sys_write fs/read_write.c:655 [inline]
__se_sys_write fs/read_write.c:652 [inline]
__x64_sys_write+0x21/0x40 fs/read_write.c:652
x64_sys_call+0x1889/0x2680 arch/x86/include/generated/asm/syscalls_64.h:2
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xa8/0x1f0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb511ea303d
Code: c3 e8 c7 24 00 00 0f 1f 80 00 00 00 00 f3 0f 1e fa 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff6b9aefa8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fb511ea303d
RDX: 0000000000000001 RSI: 0000000020000280 RDI: 0000000000000009
RBP: 00007fff6b9af040 R08: 0000000000000140 R09: 0000000000000140
R10: 0000000000000140 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000f4240 R14: 00007fff6b9aefc4 R15: 00007fff6b9aefd0
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ocfs2_refcount_cal_cow_clusters+0x667/0x960 fs/ocfs2/refcounttree.c:2684
Code: f3 45 86 48 c7 c6 c0 32 5a 85 4d 8b 44 24 18 48 8b 48 40 48 8b 78 28 e8 67 29 05 00 41 89 c4 e9 e5 fd ff ff e8 4a 14 40 ff 90 <0f> 0b e8 42 14 40 ff 48 8b 55 a8 44 89 e8 44 89 fb 44 29 f8 89 02
RSP: 0018:ffff8880462cfba0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8880528b04d0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff8880462cfc18 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
FS: 0000555576e563c0(0000) GS:ffff88807ec00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002000d000 CR3: 0000000045e3e000 CR4: 0000000000750ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
==================================================================
Complier: gcc 11.4.0
The repro is shown in annex repro.c.txt
I hope it helps.
Best regards
Jianzhou Zhao,
Xingwei Lee.
Attachment:
repro.c.txt
Description: Binary data