syzbot


UBSAN: array-index-out-of-bounds in ocfs2_dx_dir_lookup_rec

Status: upstream: reported on 2026/05/22 06:36
Subsystems: ocfs2
[Documentation on labels]
Reported-by: syzbot+caacd220635a9cc3bac9@syzkaller.appspotmail.com
First crash: 5d06h, last: 5d06h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ocfs2?] UBSAN: array-index-out-of-bounds in ocfs2_dx_dir_lookup_rec 0 (1) 2026/05/22 06:36
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in ocfs2_dx_dir_lookup_rec ocfs2 19 C 14 180d 237d 29/29 fixed on 2026/01/07 12:29
upstream KASAN: slab-out-of-bounds Read in ocfs2_dx_dir_lookup_rec ocfs2 19 C 76 260d 541d 29/29 fixed on 2025/09/04 16:57
linux-5.15 general protection fault in ocfs2_dx_dir_lookup_rec origin:lts-only 2 C error 5 45d 134d 0/3 upstream: reported C repro on 2026/01/09 06:42

Sample crash report:
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in fs/ocfs2/dir.c:840:14
index 40959 is out of range for type 'struct ocfs2_extent_rec[] __counted_by(l_count)' (aka 'struct ocfs2_extent_rec[]')
CPU: 0 UID: 0 PID: 5335 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_dx_dir_lookup_rec+0x253/0x710 fs/ocfs2/dir.c:840
 ocfs2_dx_dir_lookup+0xdb/0x540 fs/ocfs2/dir.c:896
 ocfs2_dx_dir_search fs/ocfs2/dir.c:956 [inline]
 ocfs2_find_entry_dx fs/ocfs2/dir.c:1070 [inline]
 ocfs2_find_entry+0x1015/0x21a0 fs/ocfs2/dir.c:1107
 ocfs2_find_files_on_disk+0xe0/0x340 fs/ocfs2/dir.c:2030
 ocfs2_lookup_ino_from_name+0x52/0x100 fs/ocfs2/dir.c:2052
 ocfs2_lookup+0x249/0xa20 fs/ocfs2/namei.c:123
 __lookup_slow+0x2b7/0x410 fs/namei.c:1915
 lookup_slow+0x53/0x70 fs/namei.c:1932
 walk_component fs/namei.c:2278 [inline]
 lookup_last fs/namei.c:2785 [inline]
 path_lookupat+0x3f5/0x8c0 fs/namei.c:2809
 filename_lookup+0x256/0x5d0 fs/namei.c:2838
 kern_path+0x3d/0x150 fs/namei.c:3044
 unix_find_bsd net/unix/af_unix.c:1215 [inline]
 unix_find_other+0x19d/0xb40 net/unix/af_unix.c:1281
 unix_dgram_sendmsg+0x754/0x18b0 net/unix/af_unix.c:2162
 sock_sendmsg_nosec net/socket.c:787 [inline]
 __sock_sendmsg net/socket.c:802 [inline]
 ____sys_sendmsg+0x972/0x9f0 net/socket.c:2698
 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2752
 __sys_sendmmsg+0x27c/0x4e0 net/socket.c:2841
 __do_sys_sendmmsg net/socket.c:2868 [inline]
 __se_sys_sendmmsg net/socket.c:2865 [inline]
 __x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2865
 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:0x7fbfe579ce59
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:00007fbfe65d2fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fbfe5a16090 RCX: 00007fbfe579ce59
RDX: 0000000000000002 RSI: 0000200000000ec0 RDI: 000000000000000b
RBP: 00007fbfe5832d6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fbfe5a16128 R14: 00007fbfe5a16090 R15: 00007ffe2ece9c08
 </TASK>
---[ end trace ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/18 06:32 upstream e5d505e3664b de5aae85 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root UBSAN: array-index-out-of-bounds in ocfs2_dx_dir_lookup_rec
* Struck through repros no longer work on HEAD.