As proposed in #240 and tracked in #414, this PR translates all advisories into the new "V3" advisory format, which is based on Markdown with leading TOML front matter. This format makes it easier to see rendered Markdown syntax descriptions, whether rendered by an IDE or GitHub. This should help with both crafting advisories initially as well as review, and ideally encourages more lengthy descriptions. Support for this format shipped in `cargo-audit` v0.12.0 on May 6th, 2020.
1.0 KiB
[advisory]
id = "RUSTSEC-2019-0029"
package = "chacha20"
categories = ["crypto-failure"]
date = "2019-10-22"
url = "https://github.com/RustCrypto/stream-ciphers/pull/64"
[versions]
patched = [">= 0.2.3"]
ChaCha20 counter overflow can expose repetitions in the keystream
The ChaCha20 stream cipher can produce a maximum of 2^32 blocks (~256GB)
before the 32-bit counter overflows. Releases of the chacha20 crate prior
to v0.2.3 allow generating keystreams larger than this, including seeking
past the limit. When this occurs, the keystream is duplicated, with failure
modes similar to nonce reuse (i.e. exposure of the XOR of two plaintexts).
The v0.2.3 release now panics in this event, rather than exposing the duplicated keystream. Note this is a "hot fix" solution to the problem and future releases will pursue returning an error in this case.
Users of the chacha20poly1305 crate are unaffected by this as this crate
properly asserts the length of the plaintext is less than the maximum allowed
(P_MAX as described in RFC 8439 Section 2.8).