ANT-2026-0JXJVEVY
Custom events maintains a cache of user events, it is possible to have a corrupt stream that has a valid message with one message type (which can be custom/unit/span/int) and then has the same event with a different message type.
This would never be encountered in a real program but can lead to a crash.
Check message lengths for all runtime event types, report a corrupt stream on mismatch.
If the runtime events producer and consumer run in separate processes, and the producer can be tricked into producing malformed data.
{
"cwe": [
"CWE-20",
"CWE-122"
],
"human_link": "https://github.com/ocaml/security-advisories/tree/main/advisories/2026/OSEC-2026-25.md",
"osv": "https://github.com/ocaml/security-advisories/tree/generated-osv/2026/OSEC-2026-25.json"
}"https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-25.json"
[
{
"deprecated": false,
"digest": {
"function_hash": "321247281947887769223368821828062114846",
"length": 1563
},
"id": "OSEC-2026-25-20e2705c",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/2247294d06464df0273479f41b0418655918da27",
"target": {
"file": "otherlibs/runtime_events/runtime_events_consumer.c",
"function": "ml_user_custom"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "126000856660087726349096174631135797871",
"length": 1042
},
"id": "OSEC-2026-25-25fe08f3",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/9dcf0c86201cf5e8ece56c6bb5f61fc4d92fb74a",
"target": {
"file": "otherlibs/runtime_events/runtime_events_consumer.c",
"function": "caml_ml_runtime_events_read_poll"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"111831701488351713961569234812992595021",
"111953352735604494825795214141047561976",
"178683087821655920891299720306783372467",
"43010587091771661805560614527975841264",
"184372192283305481238040564037867938493",
"71256240169527906131181079939418454348",
"4058316498929817540274641781777604482",
"338296007338089292728636436516888946388",
"86843095169688903412092527514009386688",
"3441502270842544140729811263558144702",
"323697301340215636004519522123449405867",
"244085243038275622414617659474615314744",
"161084560472721119709327535780718819410",
"202287845311014637819410313973934926960",
"325949108712669133733556517988618701209",
"227876769407806698897880193438862211930",
"74132532645164474511587269859922908331",
"175851450605030050185747994054588600413",
"42507356172280817776611559054940821608",
"1496891404631255331849889593757206556",
"11313395195125093685026026725872315432",
"244063141634822240045835087738732253572",
"218526329141686370456661705955050812118",
"55520315525176282722073128048626959304",
"265026907594514400097390731047467065670",
"47425390247326731793379367106281618640",
"14271606582860514511203534933821148025",
"274865434858619661652600779808177727612",
"117797986007353263461408849077418831848",
"24658908553801635356626148959630613544"
],
"threshold": 0.9
},
"id": "OSEC-2026-25-59ba3e29",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/2247294d06464df0273479f41b0418655918da27",
"target": {
"file": "otherlibs/runtime_events/runtime_events_consumer.c"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "126000856660087726349096174631135797871",
"length": 1042
},
"id": "OSEC-2026-25-a2d0bc55",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/2247294d06464df0273479f41b0418655918da27",
"target": {
"file": "otherlibs/runtime_events/runtime_events_consumer.c",
"function": "caml_ml_runtime_events_read_poll"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "268250284820569207142621125947081028994",
"length": 6060
},
"id": "OSEC-2026-25-aac3fba3",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/2247294d06464df0273479f41b0418655918da27",
"target": {
"file": "otherlibs/runtime_events/runtime_events_consumer.c",
"function": "caml_runtime_events_read_poll"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"111831701488351713961569234812992595021",
"111953352735604494825795214141047561976",
"178683087821655920891299720306783372467",
"43010587091771661805560614527975841264",
"184372192283305481238040564037867938493",
"71256240169527906131181079939418454348",
"4058316498929817540274641781777604482",
"338296007338089292728636436516888946388",
"86843095169688903412092527514009386688",
"3441502270842544140729811263558144702",
"323697301340215636004519522123449405867",
"244085243038275622414617659474615314744",
"161084560472721119709327535780718819410",
"202287845311014637819410313973934926960",
"325949108712669133733556517988618701209",
"227876769407806698897880193438862211930",
"74132532645164474511587269859922908331",
"175851450605030050185747994054588600413",
"42507356172280817776611559054940821608",
"1496891404631255331849889593757206556",
"11313395195125093685026026725872315432",
"244063141634822240045835087738732253572",
"218526329141686370456661705955050812118",
"55520315525176282722073128048626959304",
"265026907594514400097390731047467065670",
"47425390247326731793379367106281618640",
"14271606582860514511203534933821148025",
"274865434858619661652600779808177727612",
"117797986007353263461408849077418831848",
"24658908553801635356626148959630613544"
],
"threshold": 0.9
},
"id": "OSEC-2026-25-b1be9684",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/9dcf0c86201cf5e8ece56c6bb5f61fc4d92fb74a",
"target": {
"file": "otherlibs/runtime_events/runtime_events_consumer.c"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "195656919428473743133317654948363569234",
"length": 1440
},
"id": "OSEC-2026-25-c8d97da5",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/9dcf0c86201cf5e8ece56c6bb5f61fc4d92fb74a",
"target": {
"file": "otherlibs/runtime_events/runtime_events_consumer.c",
"function": "ml_user_custom"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "13563099896691476617241590411785077907",
"length": 5727
},
"id": "OSEC-2026-25-d7719c52",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ocaml/ocaml/commit/9dcf0c86201cf5e8ece56c6bb5f61fc4d92fb74a",
"target": {
"file": "otherlibs/runtime_events/runtime_events_consumer.c",
"function": "caml_runtime_events_read_poll"
}
}
]
"2026-11-06T19:14:06Z"