syzbot
WARNING in __ocfs2_decrease_refcount
Status:
fixed on 2026/07/15 08:27
Subsystems:
ocfs2
Labels:
prio:high
[Documentation on labels]
Reported-by: syzbot+3ef989aae096b30f1663@syzkaller.appspotmail.com
Fix commit:
1ec3cca2d8b6
ocfs2: fix out-of-bounds write in ocfs2_remove_refcount_extent
First crash: 84d, last: 51d
Sample crash report:
loop0: detected capacity change from 0 to 32768
JBD2: Ignoring recovery information on journal
ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode.
------------[ cut here ]------------
memset: detected buffer overflow: 384 byte write of buffer size 16
WARNING: lib/string_helpers.c:1037 at __fortify_report+0x6b/0xa0 lib/string_helpers.c:1036, CPU#0: syz.0.0/5313
Modules linked in:
CPU: 0 UID: 0 PID: 5313 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:__fortify_report+0x89/0xa0 lib/string_helpers.c:1036
Code: e8 8c 76 7e fd 48 8d 3d a5 8f 87 0b 45 84 e4 49 8b 37 48 c7 c0 40 77 28 8c 48 c7 c1 60 77 28 8c 48 0f 44 c8 4c 89 f2 49 89 d8 <67> 48 0f b9 3a 5b 41 5c 41 5e 41 5f 5d c3 cc cc cc cc cc cc cc cc
RSP: 0018:ffffc9000df06bc8 EFLAGS: 00010202
RAX: ffffffff8c287740 RBX: 0000000000000010 RCX: ffffffff8c287760
RDX: 0000000000000180 RSI: ffffffff8c287600 RDI: ffffffff903bfb70
RBP: 000000000000000f R08: 0000000000000010 R09: 1ffffffff20621de
R10: dffffc0000000000 R11: fffffbfff20621df R12: 0000000000000001
R13: 1ffff1100ac9db50 R14: 0000000000000180 R15: ffffffff8c287438
FS: 00007f5ae04fd6c0(0000) GS:ffff88808c886000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f562556a540 CR3: 0000000036d11000 CR4: 0000000000352ef0
Call Trace:
<TASK>
__fortify_panic+0x9/0x10 lib/string_helpers.c:1043
fortify_memset_chk include/linux/fortify-string.h:495 [inline]
ocfs2_remove_refcount_extent fs/ocfs2/refcounttree.c:2134 [inline]
ocfs2_decrease_refcount_rec fs/ocfs2/refcounttree.c:2203 [inline]
__ocfs2_decrease_refcount+0x195b/0x19a0 fs/ocfs2/refcounttree.c:2249
ocfs2_decrease_refcount+0x59c/0x7d0 fs/ocfs2/refcounttree.c:2312
ocfs2_remove_btree_range+0x1223/0x15f0 fs/ocfs2/alloc.c:5800
ocfs2_commit_truncate+0xc60/0x2560 fs/ocfs2/alloc.c:7383
ocfs2_truncate_file+0xd24/0x1530 fs/ocfs2/file.c:510
ocfs2_setattr+0x1641/0x1d10 fs/ocfs2/file.c:1219
notify_change+0xbba/0xea0 fs/attr.c:556
do_truncate+0x1c2/0x250 fs/open.c:68
vfs_truncate+0x4b4/0x540 fs/open.c:118
ksys_truncate+0xf3/0x1c0 fs/open.c:142
__do_sys_truncate fs/open.c:154 [inline]
__se_sys_truncate fs/open.c:152 [inline]
__x64_sys_truncate+0x5b/0x70 fs/open.c:152
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5adf59ce59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5ae04fcfe8 EFLAGS: 00000246 ORIG_RAX: 000000000000004c
RAX: ffffffffffffffda RBX: 00007f5adf815fa0 RCX: 00007f5adf59ce59
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 00002000000000c0
RBP: 00007f5adf632d6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5adf816038 R14: 00007f5adf815fa0 R15: 00007ffea3f76b98
</TASK>
----------------
Code disassembly (best guess):
0: e8 8c 76 7e fd call 0xfd7e7691
5: 48 8d 3d a5 8f 87 0b lea 0xb878fa5(%rip),%rdi # 0xb878fb1
c: 45 84 e4 test %r12b,%r12b
f: 49 8b 37 mov (%r15),%rsi
12: 48 c7 c0 40 77 28 8c mov $0xffffffff8c287740,%rax
19: 48 c7 c1 60 77 28 8c mov $0xffffffff8c287760,%rcx
20: 48 0f 44 c8 cmove %rax,%rcx
24: 4c 89 f2 mov %r14,%rdx
27: 49 89 d8 mov %rbx,%r8
* 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction
2f: 5b pop %rbx
30: 41 5c pop %r12
32: 41 5e pop %r14
34: 41 5f pop %r15
36: 5d pop %rbp
37: c3 ret
38: cc int3
39: cc int3
3a: cc int3
3b: cc int3
3c: cc int3
3d: cc int3
3e: cc int3
3f: cc int3
* Struck through repros no longer work on HEAD.