The function caml_ba_reshape, part of the OCaml runtime (in runtime/bigarray.c), had a missing check for integer overflow when computing the size to be allocated. This leads to a segmentation fault.
Any application using Bigarray.reshape (or reshape_N) with untrusted and unchecked input can result in a segmentation fault.
{
"cwe": [
"CWE-190"
],
"human_link": "https://github.com/ocaml/security-advisories/tree/main/advisories/2026/OSEC-2026-04.md",
"osv": "https://github.com/ocaml/security-advisories/tree/generated-osv/2026/OSEC-2026-04.json"
}"https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-04.json"
[
{
"deprecated": false,
"digest": {
"function_hash": "315896223832289446857490620814179422093",
"length": 730
},
"id": "OSEC-2026-04-8579e1ae",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/1ec6b6e8ef9d30fc1d8bac71a6646c2ef78ea90b",
"target": {
"file": "runtime/bigarray.c",
"function": "caml_ba_reshape"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"136896556021727595132942644770169810305",
"251162647296481725375683603833627936828",
"177643645501825721814386841923105105619",
"208197203133572171825842401906857534757"
],
"threshold": 0.9
},
"id": "OSEC-2026-04-93160b33",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/1ec6b6e8ef9d30fc1d8bac71a6646c2ef78ea90b",
"target": {
"file": "runtime/bigarray.c"
}
}
]
"2026-11-06T19:14:07Z"