high7.5
CVE-2021-45720
Use After Free in lru
Impact
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.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| rust | lru | < 0.7.1 | 0.7.1 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Lru Project | Lru | before 0.7.1 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/lru/RUSTSEC-2021-0130.md
- https://rustsec.org/advisories/RUSTSEC-2021-0130.html
- https://github.com/advisories/GHSA-v362-2895-h9r2
- https://nvd.nist.gov/vuln/detail/CVE-2021-45720
- https://github.com/jeromefroe/lru-rs/issues/120