syzbot


UBSAN: array-index-out-of-bounds in ocfs2_grow_tree (2)

Status: upstream: reported on 2026/04/23 10:49
Subsystems: ocfs2
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+be16e33db01e6644db7a@syzkaller.appspotmail.com
Fix commit: ocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci-upstream-rust-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 60d, last: 60d
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
e08c5787-59b5-4e40-b54c-bcbcce4d06b5 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ✅ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ UBSAN: array-index-out-of-bounds in ocfs2_grow_tree (2) 2026/05/31 11:08 2026/05/31 11:08 2026/05/31 12:05 6b4a844333e83556da95d61d7f207e7ef5cd4bc6

			
		
43fc22f0-6061-47eb-bb0a-92b8cbbac8e2 assessment-security 💥 UBSAN: array-index-out-of-bounds in ocfs2_grow_tree (2) 2026/05/14 16:27 2026/05/14 16:27 2026/05/14 16:29 6ccb967e465e832a7bfd7a116ad00d52a0923a5d
failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "32" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/app/workdir/cache/build/581057fcc954d5c8d6...
truncated to first 200 bytes; open job for full error
Discussions (5)
Title Replies (including bot) Last reply
[PATCH v4] ocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec 3 (3) 2026/06/13 12:19
[PATCH v3] ocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec 2 (2) 2026/06/08 21:15
[PATCH v2] ocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec 2 (2) 2026/06/08 09:27
[PATCH] ocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec 3 (3) 2026/06/03 12:38
[syzbot] [ocfs2?] UBSAN: array-index-out-of-bounds in ocfs2_grow_tree (2) 0 (1) 2026/04/23 10:49
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: array-index-out-of-bounds in ocfs2_grow_tree ocfs2 15 11 188d 189d 0/29 auto-obsoleted due to no activity on 2026/02/20 22:46

Sample crash report:
loop0: detected capacity change from 0 to 32768
=======================================================
WARNING: The mand mount option has been deprecated and
         and is ignored by this kernel. Remove the mand
         option from the mount to silence this warning.
=======================================================
JBD2: Ignoring recovery information on journal
ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode.
(syz.0.0,5330,0):ocfs2_check_set_options:1244 ERROR: Invalid heartbeat mount options
loop0: detected capacity change from 32768 to 32767
(syz.0.0,5330,0):ocfs2_validate_inode_block:1449 ERROR: Invalid dinode #17058: Corrupt state (nlink = 0 or mode = 0) detected!
(syz.0.0,5330,0):ocfs2_assign_bh:2417 ERROR: status = -117
(syz.0.0,5330,0):ocfs2_inode_lock_full_nested:2512 ERROR: status = -117
(syz.0.0,5330,0):ocfs2_reflink_inodes_lock:4747 ERROR: status = -117
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in fs/ocfs2/alloc.c:1112:9
index -1 is out of range for type 'struct ocfs2_extent_rec[] __counted_by(l_count)' (aka 'struct ocfs2_extent_rec[]')
CPU: 0 UID: 0 PID: 5330 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
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 ubsan_epilogue+0xa/0x30 lib/ubsan.c:233
 __ubsan_handle_out_of_bounds+0xe8/0xf0 lib/ubsan.c:455
 ocfs2_sum_rightmost_rec fs/ocfs2/alloc.c:1112 [inline]
 ocfs2_shift_tree_depth fs/ocfs2/alloc.c:1433 [inline]
 ocfs2_grow_tree+0x37fc/0x4060 fs/ocfs2/alloc.c:1581
 ocfs2_insert_extent+0xc67/0x1700 fs/ocfs2/alloc.c:4764
 ocfs2_add_clusters_in_btree+0x678/0xff0 fs/ocfs2/alloc.c:4866
 ocfs2_add_inode_data+0xe7/0x140 fs/ocfs2/file.c:551
 ocfs2_write_cluster fs/ocfs2/aops.c:1117 [inline]
 ocfs2_write_cluster_by_desc+0x566/0x1de0 fs/ocfs2/aops.c:1221
 ocfs2_write_begin_nolock+0x3305/0x41a0 fs/ocfs2/aops.c:1797
 ocfs2_write_begin+0x1c5/0x320 fs/ocfs2/aops.c:1885
 generic_perform_write+0x2e2/0x8f0 mm/filemap.c:4324
 ocfs2_file_write_iter+0x1663/0x1e70 fs/ocfs2/file.c:2476
 iter_file_splice_write+0x9a1/0x10f0 fs/splice.c:736
 do_splice_from fs/splice.c:936 [inline]
 direct_splice_actor+0x101/0x160 fs/splice.c:1159
 splice_direct_to_actor+0x53a/0xc70 fs/splice.c:1103
 do_splice_direct_actor fs/splice.c:1202 [inline]
 do_splice_direct+0x195/0x290 fs/splice.c:1228
 vfs_copy_file_range+0xb02/0x1370 fs/read_write.c:1634
 __do_sys_copy_file_range fs/read_write.c:1683 [inline]
 __se_sys_copy_file_range+0x2fb/0x480 fs/read_write.c:1650
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5a2459c819
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:00007f5a25523fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000146
RAX: ffffffffffffffda RBX: 00007f5a24815fa0 RCX: 00007f5a2459c819
RDX: 0000000000000004 RSI: 00002000000001c0 RDI: 0000000000000005
RBP: 00007f5a24632c91 R08: ffffffffa003e45b R09: 0700000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5a24816038 R14: 00007f5a24815fa0 R15: 00007ffc179ae578
 </TASK>
---[ end trace ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/19 10:46 upstream faeab166167f 303e2802 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root UBSAN: array-index-out-of-bounds in ocfs2_grow_tree
* Struck through repros no longer work on HEAD.