ANT-2026-6W9NPC2Q mmap dimension product integer overflow
Use caml_umul_overflow instead of * when multiplying bigarray dimensions, which detects integer overflows and raise Failure.
Negative positions are also rejected by raising Invalid_argument.
If either the dimensions or the file size in a call to Unix.map_file from your code is user controllable then you are potentially affected.
The vulnerability is in a library, and the CVSS score is calculated under worst case assumptions. For an actual application the score will depend on how much an attacker can control the input to this function (if at all).
{
"cwe": [
"CWE-190"
],
"human_link": "https://github.com/ocaml/security-advisories/tree/main/advisories/2026/OSEC-2026-22.md",
"osv": "https://github.com/ocaml/security-advisories/tree/generated-osv/2026/OSEC-2026-22.json"
}