Skip to content

mirage-crypto: chacha20 avoid accessing memory which is not mapped#83

Merged
hannesm merged 1 commit intomirage:masterfrom
hannesm:no-segv-in-chacha
Aug 30, 2020
Merged

mirage-crypto: chacha20 avoid accessing memory which is not mapped#83
hannesm merged 1 commit intomirage:masterfrom
hannesm:no-segv-in-chacha

Conversation

@hannesm
Copy link
Member

@hannesm hannesm commented Aug 30, 2020

this avoid accessing memory which is not necessarily ours. without this fix, segmentation faults may be triggered.

the issue if the encrypted data is not of block size (=64 byte), processing the last buffer will access up to 63 byte of memory which is not properly mapped.

bug is present since introduction of chacha20 in 0.8.1.

@hannesm hannesm merged commit b1438ce into mirage:master Aug 30, 2020
hannesm added a commit to hannesm/opam-repository that referenced this pull request Aug 30, 2020
…mirage-crypto-rng-mirage (0.8.5)

CHANGES:

* Avoid accessing unmapped memory in ChaCha20 (mirage/mirage-crypto#83 by @hannesm, introduced in
  0.8.1)
@hannesm hannesm deleted the no-segv-in-chacha branch August 30, 2020 19:50
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