7.5high
Use after free in heapless
- Severity
- 7.5high CVSS:3.1 by NVD
- Exploit likelihood
- 1.23% (higher than 69% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-qgwf-r2jj-2ccvRUSTSEC-2020-0145
Description
An issue was discovered in the heapless crate before 0.6.1 for Rust. The IntoIter Clone implementation clones an entire underlying Vec without considering whether it has already been partially consumed.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| heapless (crates.io) | before 0.6.1, from 0.0.0-0 before 0.6.1 | GitHub Advisory Database, RustSec Advisory Database |
| heapless_project heapless | before 0.6.1 | NVD |
All scores
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| RustSec Advisory Database | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Classification
What each source says
CVE List
An issue was discovered in the heapless crate before 0.6.1 for Rust. The IntoIter Clone implementation clones an entire underlying Vec without considering whether it has already been partially consumed.
RustSec Advisory Database
The IntoIter Clone implementation clones the whole underlying Vec.
If the iterator is partially consumed the consumed items will be copied, thus creating a use-after-free access.
A proof of concept is available in the original bug report.
NVD (es)
Se ha detectado un problema en la crate heapless versiones anteriores a 0.6.1 para Rust. La implementación de IntoIter Clone clona un Vec subyacente completo sin considerar si ya ha sido parcialmente consumido
References
| https://rustsec.org/advisories/RUSTSEC-2020-0145.html | advisory, exploit, issue-tracking, patch, third-party-advisory, web | |
| https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/heapless/RUSTSEC-2020-0145.md | third-party-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2020-36464 | advisory | |
| https://github.com/japaric/heapless/issues/181 | report, web | |
| https://github.com/japaric/heapless | package | |
| https://crates.io/crates/heapless | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2020-36464 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qgwf-r2jj-2ccv changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2020-0145 changed 2023-11-08 | CC0-1.0 |
| NVD | CVE-2020-36464 changed 2026-06-17 | Public domain |