diff --git a/crates/lru/RUSTSEC-0000-0000.md b/crates/lru/RUSTSEC-0000-0000.md new file mode 100644 index 000000000..1306e8f63 --- /dev/null +++ b/crates/lru/RUSTSEC-0000-0000.md @@ -0,0 +1,24 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "lru" +date = "2026-01-07" +url = "https://github.com/jeromefroe/lru-rs/pull/224" +informational = "unsound" +categories = ["memory-corruption"] +keywords = ["stacked-borrows"] + +[versions] +patched = [">= 0.16.3"] +unaffected = ["< 0.9.0"] +``` + +# `IterMut` violates Stacked Borrows by invalidating internal pointer + +Affected versions of this crate contain a soundness issue in the `IterMut` +iterator implementation. The `IterMut::next` and `IterMut::next_back` +methods temporarily create an exclusive reference to the key when +dereferencing the internal node pointer. + +This invalidates the shared pointer held by the internal `HashMap`, +violating Stacked Borrows rules.