Fixed a soundness vulnerability in the lru crate (version 0.12.5) used as a transitive dependency through iced_glyphon.
- Advisory: RUSTSEC-2026-0002
- Package:
lru - Affected Versions: 0.9.0 to 0.16.2 (inclusive)
- Patched Version: 0.16.3+
- Severity: Unsound (memory safety issue)
- Issue:
IterMutviolates Stacked Borrows by invalidating internal pointer
The IterMut iterator implementation in the vulnerable lru versions temporarily creates an exclusive reference (&mut) to the key when dereferencing the internal node pointer. This invalidates the shared pointer (&) held by the internal HashMap, violating Rust's Stacked Borrows rules and potentially causing undefined behavior.
rustirc v0.3.8
└── rustirc-gui v0.3.8
└── iced v0.13.1
└── iced_wgpu v0.13.5
└── iced_glyphon v0.6.0
└── lru v0.12.5 ← VULNERABLE
Since iced_glyphon v0.6.0 depends on lru ^0.12.1 and there's no newer version of iced_glyphon available that uses the patched lru, we implemented a vendor patch:
- Downloaded
iced_glyphonv0.6.0 source code - Modified
Cargo.tomlto update lru dependency from0.12.1to0.16.3 - Vendored the patched version in
vendor/iced_glyphon/ - Applied Cargo patch in workspace
Cargo.toml:[patch.crates-io] iced_glyphon = { path = "vendor/iced_glyphon" }
Before fix:
lru v0.12.5 ← Vulnerable
└── iced_glyphon v0.6.0
After fix:
lru v0.16.3 ← Patched
└── iced_glyphon v0.6.0 (vendored)
- ✅ Clean build successful
- ✅ All tests passing
- ✅ Clippy clean (no warnings)
- ✅ No vulnerable lru versions in dependency tree
This vendor patch can be removed when:
iced_glyphonreleases a version with lru 0.16.3+- Upgrading to iced 0.14+ (which may use different text rendering)
- Switching to
cryoglyph(iced-rs fork with updated dependencies)
- RustSec Advisory: https://rustsec.org/advisories/RUSTSEC-2026-0002
- GitHub Advisory: https://github.com/advisories/GHSA-rhfx-m35p-ff5j
- lru-rs Fix PR: jeromefroe/lru-rs#224
- Affected Package: https://crates.io/crates/lru/0.12.5
- Patched Package: https://crates.io/crates/lru/0.16.3
Cargo.toml: Added[patch.crates-io]sectionCargo.lock: Updated lru dependency to 0.16.3vendor/: Added patched iced_glyphon sourcevendor/README.md: Documentation for vendored dependencies