Description
An issue was discovered in the mirage-crypto package before 2.2.0 for OCaml. The AES.GCM.authenticate_decrypt_into and Chacha20.authenticate_decrypt_into functions write the decrypted plaintext into a caller-provided buffer and only then compares the tag. On a forged tag, the functions returns false, but the destination buffer already holds the full plaintext.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| OCaml | mirage-crypto | < 2.2.0 | 2.2.0 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | ocaml-mirage-crypto | 2.2.0-1 | — |
| Debian 13 | ocaml-mirage-crypto | No fix yet | — |
| Debian 12 | ocaml-mirage-crypto | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | ocaml-mirage-crypto | No fix yet | — |
| Ubuntu 26.04 LTS | ocaml-mirage-crypto | No fix yet | — |
| Ubuntu 24.04 LTS | ocaml-mirage-crypto | No fix yet | — |
| Ubuntu 22.04 LTS | ocaml-mirage-crypto | No fix yet | — |