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"
}"https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-22.json"
[
{
"deprecated": false,
"digest": {
"function_hash": "220151456775998527369833026853328464253",
"length": 1968
},
"id": "OSEC-2026-22-2ebfbec6",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/de57bb4f59c3302260aaeaaa4dfee12695597d25",
"target": {
"file": "otherlibs/unix/mmap_win32.c",
"function": "caml_unix_map_file"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "272523266744876955486659584294787247649",
"length": 1934
},
"id": "OSEC-2026-22-533a73b2",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/ed4860325cbb11bf05be34fae6ded8019159d182",
"target": {
"file": "otherlibs/unix/mmap.c",
"function": "caml_unix_map_file"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "64440116865686041635418844526291595494",
"length": 2134
},
"id": "OSEC-2026-22-64079760",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/ed4860325cbb11bf05be34fae6ded8019159d182",
"target": {
"file": "otherlibs/win32unix/mmap.c",
"function": "caml_unix_map_file"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"138143260196068246015199959276237629932",
"192325182997889927113391156092382368802",
"74905393055790080519774412372196728340",
"323715059525410739638396424041633454473",
"147311902664102887341121257910319933624",
"174294087267402214450893940689900789156",
"106175427996872863479255793636173812653",
"202274360548174121127223805233786797298",
"204692065392219211025976021727919936543",
"52859399538399110681805134465159920188",
"102770878439056948405725226591644341999",
"293625727952176899397806728394541652583",
"212184114233448587456891741138494230393",
"66035532907514437379529350704878428603",
"326950273626215595874294179166771871303",
"176640072892010290139641771292200927816",
"66485335480547123201384827295935356632",
"309746218715681287529533572173405043225"
],
"threshold": 0.9
},
"id": "OSEC-2026-22-89d6bd1c",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/ed4860325cbb11bf05be34fae6ded8019159d182",
"target": {
"file": "otherlibs/unix/mmap.c"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"20470929277304592359728563714615137627",
"109639549485689586516822656128895215418",
"74905393055790080519774412372196728340",
"254811212539403033030087083653505698167",
"294730886710336645955419197885153962850",
"326260116503197871344667624150802497623",
"174431453848105083025237439628862930144",
"269405933041207599479774046801562824169",
"285871450881670454667730704882187125558",
"156868549687227841350296388839644335766",
"245871047657609838296195186213116591354",
"116276674976643327199593281639692919890",
"10304787519196968499361231199439498910",
"173845676830086610915192116078885592829",
"223489301868701071591799685292120359321",
"156892395251218686630924579170459081406",
"156955760897096345792286562406912910658",
"162427674192396995755981163785689680167",
"317075588892386029666381340215204828682",
"298675787161123326314967556668251627676",
"104361680032883573343095243271173127551"
],
"threshold": 0.9
},
"id": "OSEC-2026-22-9707ee3f",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/ed4860325cbb11bf05be34fae6ded8019159d182",
"target": {
"file": "otherlibs/win32unix/mmap.c"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"260271451892591159147902357526258412612",
"88925571940114103783451426572361154564",
"155182675251794687939039352112970729447",
"147311902664102887341121257910319933624",
"174294087267402214450893940689900789156",
"106175427996872863479255793636173812653",
"202274360548174121127223805233786797298",
"204692065392219211025976021727919936543",
"52859399538399110681805134465159920188",
"102770878439056948405725226591644341999",
"293625727952176899397806728394541652583",
"212184114233448587456891741138494230393",
"66035532907514437379529350704878428603",
"326950273626215595874294179166771871303",
"176640072892010290139641771292200927816",
"9005379430962429292639957386223490864",
"231382412090312751018065160255483017638"
],
"threshold": 0.9
},
"id": "OSEC-2026-22-a03342b3",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/ff978d2139ba638886c2565f2d86c0ee265840a5",
"target": {
"file": "otherlibs/unix/mmap_unix.c"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"105370556711559465605570897422695213994",
"88925571940114103783451426572361154564",
"215403358443305857514821600999686137655",
"122813629126026861616354541748276034409",
"270387900900847645002778538265549272108",
"270322648644500115370454652792582250802",
"228903576820936970688091178731816001495",
"330881933138651546281215221059128123263",
"52859399538399110681805134465159920188",
"102770878439056948405725226591644341999",
"293625727952176899397806728394541652583",
"112420118073579183351219809197784594907",
"31087156984838369879621148171060613063",
"173845676830086610915192116078885592829",
"223489301868701071591799685292120359321",
"194306431094731874160030944592564030784",
"274550603138474758897512154272679577503",
"170603496204139823845546388559331967742",
"36752665962728032451686755934597787721",
"298675787161123326314967556668251627676",
"104361680032883573343095243271173127551"
],
"threshold": 0.9
},
"id": "OSEC-2026-22-bb6c6dec",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/ff978d2139ba638886c2565f2d86c0ee265840a5",
"target": {
"file": "otherlibs/unix/mmap_win32.c"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "212375852801088245230167807906376181172",
"length": 1940
},
"id": "OSEC-2026-22-bdde076d",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/ff978d2139ba638886c2565f2d86c0ee265840a5",
"target": {
"file": "otherlibs/unix/mmap_unix.c",
"function": "caml_unix_map_file"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "220151456775998527369833026853328464253",
"length": 1968
},
"id": "OSEC-2026-22-e8905ea7",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/ff978d2139ba638886c2565f2d86c0ee265840a5",
"target": {
"file": "otherlibs/unix/mmap_win32.c",
"function": "caml_unix_map_file"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"105370556711559465605570897422695213994",
"88925571940114103783451426572361154564",
"215403358443305857514821600999686137655",
"122813629126026861616354541748276034409",
"270387900900847645002778538265549272108",
"270322648644500115370454652792582250802",
"228903576820936970688091178731816001495",
"330881933138651546281215221059128123263",
"52859399538399110681805134465159920188",
"102770878439056948405725226591644341999",
"293625727952176899397806728394541652583",
"112420118073579183351219809197784594907",
"31087156984838369879621148171060613063",
"173845676830086610915192116078885592829",
"223489301868701071591799685292120359321",
"194306431094731874160030944592564030784",
"274550603138474758897512154272679577503",
"170603496204139823845546388559331967742",
"36752665962728032451686755934597787721",
"298675787161123326314967556668251627676",
"104361680032883573343095243271173127551"
],
"threshold": 0.9
},
"id": "OSEC-2026-22-ea857b9e",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/de57bb4f59c3302260aaeaaa4dfee12695597d25",
"target": {
"file": "otherlibs/unix/mmap_win32.c"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"260271451892591159147902357526258412612",
"88925571940114103783451426572361154564",
"155182675251794687939039352112970729447",
"147311902664102887341121257910319933624",
"174294087267402214450893940689900789156",
"106175427996872863479255793636173812653",
"202274360548174121127223805233786797298",
"204692065392219211025976021727919936543",
"52859399538399110681805134465159920188",
"102770878439056948405725226591644341999",
"293625727952176899397806728394541652583",
"212184114233448587456891741138494230393",
"66035532907514437379529350704878428603",
"326950273626215595874294179166771871303",
"176640072892010290139641771292200927816",
"9005379430962429292639957386223490864",
"231382412090312751018065160255483017638"
],
"threshold": 0.9
},
"id": "OSEC-2026-22-ed89902e",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/de57bb4f59c3302260aaeaaa4dfee12695597d25",
"target": {
"file": "otherlibs/unix/mmap_unix.c"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "212375852801088245230167807906376181172",
"length": 1940
},
"id": "OSEC-2026-22-fc937f4b",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/de57bb4f59c3302260aaeaaa4dfee12695597d25",
"target": {
"file": "otherlibs/unix/mmap_unix.c",
"function": "caml_unix_map_file"
}
}
]
"2026-11-06T19:14:07Z"