Skip to content

Commit a433b78

Browse files
paolobarbolinidjc
authored andcommitted
lru: add advisory for Stacked Borrows violation
1 parent 5f34713 commit a433b78

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

crates/lru/RUSTSEC-0000-0000.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "lru"
5+
date = "2026-01-07"
6+
url = "https://github.com/jeromefroe/lru-rs/pull/224"
7+
informational = "unsound"
8+
categories = ["memory-corruption"]
9+
keywords = ["stacked-borrows"]
10+
11+
[versions]
12+
patched = [">= 0.16.3"]
13+
unaffected = ["< 0.9.0"]
14+
```
15+
16+
# `IterMut` violates Stacked Borrows by invalidating internal pointer
17+
18+
Affected versions of this crate contain a soundness issue in the `IterMut`
19+
iterator implementation. The `IterMut::next` and `IterMut::next_back`
20+
methods temporarily create an exclusive reference to the key when
21+
dereferencing the internal node pointer.
22+
23+
This invalidates the shared pointer held by the internal `HashMap`,
24+
violating Stacked Borrows rules.

0 commit comments

Comments
 (0)