Skip to content

Commit

Permalink
Bump lru to 0.7.1
Browse files Browse the repository at this point in the history
The advisory script brought up a RUSTSEC error:

---
error[A001]: Use after free in lru crate
    ┌─ /home/haptop/Developer/radicle-link/Cargo.lock:207:1
    │
207 │ lru 0.6.6 registry+https://github.com/rust-lang/crates.io-index
    │ --------------------------------------------------------------- security vulnerability detected
    │
    = ID: RUSTSEC-2021-0130
    = Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0130
    = 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.
    = Announcement: jeromefroe/lru-rs#120
    = Solution: Upgrade to >=0.7.1
---

This patch follows the recommended solution and pins the `lru` crate
to 0.7.1.
  • Loading branch information
Quentin Perez committed Dec 30, 2021
1 parent d6bdcfe commit 016d867
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ smol_str = { version = "0.1.21", optional = true }

# Non-feature optional dependencies
blocking = { version = "1.0.2", optional = true }
lru = { version = "0.6.5", optional = true }
lru = { version = "0.7.1", optional = true }
sha2 = { version = "0.9.3", optional = true }
futures-timer = { version = "3.0.2", optional = true }
futures-channel = { version = "0.3.13", optional = true }
Expand Down

0 comments on commit 016d867

Please sign in to comment.