GitHub Advisoryadvisory · crates.io

GHSA-v362-2895-h9r2 Use After Free in lru

HIGH Published 2022-01-07 Modified 2023-06-13 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)

References