CVE-2021-31162
9.8critical
In the standard library in Rust before 1.52.0, a double free can occur in the Vec::fromiter function if freeing the element panics.
- Severity
- 9.8critical CVSS:3.1 by NVD
- Exploit likelihood
- 2.89% (higher than 87% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
Description
In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the element panics.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| rust-lang rust | from 1.48.0 before 1.52.0 | NVD |
| fedoraproject fedora | 32, 33, 34 | NVD |
All scores
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the element panics.
NVD (es)
En la biblioteca estándar de Rust versiones anteriores a 1.52.0, se puede producir una doble liberación en la función Vec::from_iter si se libera los pánicos del elemento
References
| https://github.com/rust-lang/rust/issues/83618 | exploit, third-party-advisory | |
| https://github.com/rust-lang/rust/pull/83629 | patch, third-party-advisory | |
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CZ337CM4GFJLRDFVQCGC7J25V65JXOG5/ | vendor-advisory | |
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VZG65GUW6Z2CYOQHF7T3TB5CZKIX6ZJE/ | vendor-advisory | |
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TFUO3URYCO73D2Q4WYJBWAMJWGGVXQO4/ | vendor-advisory | |
| https://github.com/rust-lang/rust/pull/84603 | patch, third-party-advisory | |
| https://security.gentoo.org/glsa/202210-09 | third-party-advisory, vendor-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-31162 changed 2024-08-03 | CVE Terms of Use |
| NVD | CVE-2021-31162 changed 2026-06-17 | Public domain |