GitHub Advisoryadvisory · crates.io
GHSA-8c6g-4xc5-w96c Uninitialized memory exposure in claxon
MEDIUM
Official page ↗
- Aliases
- CVE-2018-20992
- Ecosystem
- crates.io
- Packages
- claxon
- Severity
- Moderate
- CVSS vector
- CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- Weaknesses
- CWE-908
- Reviewed
- 2021-08-19
Affected packages
• crates.io claxon: >= 0.4.0, < 0.4.1 → fixed in 0.4.1
• crates.io claxon: < 0.3.2 → fixed in 0.3.2
Description
Affected versions of Claxon made an invalid assumption about the decode buffer size being a multiple of a value read from the bitstream. This could cause parts of the decode buffer to not be overwritten. If the decode buffer was newly allocated and uninitialized, this uninitialized memory could be exposed.
This allows an attacker to observe parts of the uninitialized memory in the decoded audio stream.
The flaw was corrected by checking that the value read from the bitstream divides the decode buffer size, and returning a format error if it does not. If an error is returned, the decode buffer is not exposed. Regression tests and an additional fuzzer have been added to prevent similar flaws in the future.
Related
Alias · CVE (1)
- CVE-2018-20992 An issue was discovered in the claxon crate before 0.4.1 for Rust. vulnerability
Weakness · CWE (1)
- CWE-908 Use of Uninitialized Resource weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2018-20992 advisory
- https://github.com/ruuda/claxon/commit/8f28ec275e412dd3af4f3cda460605512faf332c web
- https://github.com/ruuda/claxon package
- https://github.com/ruuda/claxon/releases/tag/v0.3.2 web
- https://github.com/ruuda/claxon/releases/tag/v0.4.1 web
- https://rustsec.org/advisories/RUSTSEC-2018-0004.html web