High, CVSS 8.2crates.ioPublished
libcrux: Potential Panic on Overlong Ciphertext Buffer
GHSA-hc3c-63hc-2r9f
- Affected
- crates.io libcrux-chacha20poly1305 < 0.0.8
- Fixed in
- 0.0.8· Vendor fix available
- Issue
- An application that passes in a ciphertext buffer of length greater than ptxt.len() + TAGLEN to libcruxchacha20poly1305::encrypt or libcruxchacha20poly1305::xchacha20poly1305::encrypt would experience a panic. Impact An application where the length of the ciphertext buffer is under attacker control could be made to crash. Mitigation The fix makes it so that libcruxchacha20poly1305::encrypt and libcruxchacha20poly1305::xchacha20poly1305::encrypt no longer panic in this case, but instead write out the ciphertext and tag into the first ptxt.len() + TAGLEN bytes of the provided buffer.
Recommended action: Upgrade to 0.0.8 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.