[syzbot] [ocfs2?] UBSAN: array-index-out-of-bounds in ocfs2_dx_dir_lookup_rec

3 views
Skip to first unread message

syzbot

unread,
2:36 AM (12 hours ago) 2:36 AM
to jl...@evilplan.org, jose...@linux.alibaba.com, linux-...@vger.kernel.org, ma...@fasheh.com, ocfs2...@lists.linux.dev, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e5d505e3664b Merge tag 'trace-v7.1-rc3' of git://git.kerne..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=125737ba580000
kernel config: https://syzkaller.appspot.com/x/.config?x=7f195f6be48c12ec
dashboard link: https://syzkaller.appspot.com/bug?extid=caacd220635a9cc3bac9
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-e5d505e3.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e34834fd8b3d/vmlinux-e5d505e3.xz
kernel image: https://storage.googleapis.com/syzbot-assets/83271095636f/bzImage-e5d505e3.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+caacd2...@syzkaller.appspotmail.com

------------[ 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 ]---


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages