jeromefroe/lru-rs · Security

`IterMut` violates Stacked Borrows by invalidating internal pointer

GHSA ID
GHSA-rhfx-m35p-ff5j
Severity
low
Published
Updated
CVSS v4
2.7 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:U

Description

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.

CWEs

References