GHSA-v362-2895-h9r2

Suggest an improvement
Source
https://github.com/advisories/GHSA-v362-2895-h9r2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/01/GHSA-v362-2895-h9r2/GHSA-v362-2895-h9r2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-v362-2895-h9r2
Aliases
Published
2022-01-07T22:37:01Z
Modified
2023-11-08T04:07:23.861888Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Use After Free in lru
Details

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.

Database specific
{
    "nvd_published_at": "2021-12-26T22:15:00Z",
    "cwe_ids": [
        "CWE-416"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2022-01-07T20:44:44Z"
}
References

Affected packages

crates.io / lru

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.7.1

Ecosystem specific

{
    "affected_functions": [
        "lru::LruCache::iter",
        "lru::LruCache::iter_mut"
    ]
}