HistoryEditJSON (OSV)

RUSTSEC-2021-0130

Use after free in lru crate

Reported
Issued
Package
lru (crates.io)
Type
Vulnerability
Categories
Keywords
#use-after-free
Aliases
References
Patched
  • >=0.7.1
Affected Functions
Version
lru::LruCache::iter
  • <0.7.1
lru::LruCache::iter_mut
  • <0.7.1

Description

Lru crate has use after free vulnerability.

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.

Advisory available under CC0-1.0 license.