Vulnerability · Published Apr 11, 2021 · Assigned by mitre
CVE-2021-28876
Medium 5.3
In plain English
A medium-severity security flaw in the rustc package (Debian). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.6% (higher than 75% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS NVD)5.3Medium
Exploit odds (30 days)1.6%top 24.6% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
Official description
In the standard library in Rust before 1.52.0, the Zip implementation has a panic safety issue. It calls __iterator_get_unchecked() more than once for the same index when the underlying iterator panics (in certain conditions). This bug could lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | rustc | 1.53.0+dfsg1-1 | DEBIAN-CVE-2021-28876 |
| Debian:13 | rustc | 1.53.0+dfsg1-1 | DEBIAN-CVE-2021-28876 |
| Debian:14 | rustc | 1.53.0+dfsg1-1 | DEBIAN-CVE-2021-28876 |
| Rocky Linux:8 | rust | 0:1.52.1-1.module+el8.4.0+641+ca238f88 | RLSA-2021:3063 |
| Rocky Linux:8 | rust-toolset | 0:1.52.1-1.module+el8.4.0+641+ca238f88 | RLSA-2021:3063 |
| Ubuntu:22.04:LTS | rustc | 1.53.0+dfsg1+llvm-4ubuntu1 | UBUNTU-CVE-2021-28876 |
Affected products (as reported)
References
- https://github.com/rust-lang/rust/issues/81740
- https://github.com/rust-lang/rust/pull/81741
- FEDORA-2021-d0ba1901ca vendor-advisory
- FEDORA-2021-b1ba54add6 vendor-advisory
- FEDORA-2021-d7f74f0250 vendor-advisory
- GLSA-202210-09 vendor-advisory