GitHub Advisoryadvisory · crates.io
GHSA-v362-2895-h9r2 Use After Free in lru
HIGH
Official page ↗
- Aliases
- CVE-2021-45720
- Ecosystem
- crates.io
- Packages
- lru
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses
- CWE-416
- Reviewed
- 2022-01-07
Affected packages
• crates.io lru: < 0.7.1 → fixed in 0.7.1
Description
Lru crate has two functions for getting an iterator. Both iterators give references to key and value. Calling specific functions, like pop(), will remove and free the value, and but it's still possible to access the reference of value which is already dropped causing use after free.
Related
Alias · CVE (1)
- CVE-2021-45720 An issue was discovered in the lru crate before 0.7.1 for Rust. vulnerability
Weakness · CWE (1)
- CWE-416 Use After Free weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-45720 advisory
- https://github.com/jeromefroe/lru-rs/issues/120 web
- https://github.com/jeromefroe/lru-rs.git package
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/lru/RUSTSEC-2021-0130.md web
- https://rustsec.org/advisories/RUSTSEC-2021-0130.html web