Skip to content

Fix buffer overflow on our xor implementation in OCaml - #177

Merged
dinosaure merged 1 commit into
mainfrom
xor-ocaml
Sep 22, 2026
Merged

dinosaure merged 1 commit into
mainfrom
xor-ocaml

Conversation

@dinosaure

Copy link
Copy Markdown
Member

This execution path seems not executed at all by our hash algorithms (it seems that they xor on aligned data) but let's fix it. Find by scrutineer from @avsm.

@dinosaure dinosaure changed the title Fix overflow on our xor implementation in OCaml Fix buffer overflow on our xor implementation in OCaml Sep 22, 2026
@dinosaure
dinosaure merged commit 9ac3f27 into main Sep 22, 2026
4 checks passed
@dinosaure
dinosaure deleted the xor-ocaml branch September 22, 2026 20:11
hannesm pushed a commit to ocaml/opam-repository that referenced this pull request Oct 15, 2026
CHANGES:

- Prefer to use `typedef` internally when it's about C structs (@dinosaure, mirage/digestif#174)
- Use `Int32.unsigned_compare` instead of `Int32.compare` (@dinosaure, mirage/digestif#175, mirage/digestif#176)
- Fix overflow on our `xor` OCaml implementation (@dinosaure, mirage/digestif#177)
- Do bounds checking on our `xor` C/OCaml implementation (@dinosaure, mirage/digestif#178, mirage/digestif#179)
- Provide BLAKE2 implementation (@dinosaure, @thevilledev, mirage/digestif#180)
- Optimize OCaml implementations of hash algorithms and unbox when we manipulate int32 values (@Zaneham, @dinosaure, mirage/digestif#181)
- Expose Keyed version of `Make_BLAKE2{S,B}` (spotted by @copy, @dinosaure, mirage/digestif#173, mirage/digestif#182)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant