Update lru to 0.18.2 - #182
Open
nabbisen wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
We maintain orbok, a desktop app built on
iced.icedrenders text throughcryoglyph, a fork of this crate, socargo auditin our CI flagged the advisory below through that path. Checking where the requirement actually lives led here — glyphon has the same one.The advisory
lru 0.16.xcarries RUSTSEC-2026-0253:LruCache::pop()frees the node and drops the key before detaching it from the intrusive list, so a panic in the key'sDropcan leave neighbouring nodes pointing at freed memory. Fixed inlru 0.18.2by detaching first.glyphon does not appear to be affected
Two independent reasons:
GlyphonCacheKeyis#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]. ACopytype cannot implementDrop, so the key'sdrop_in_placeis a no-op that cannot panic — the advisory's trigger cannot occur.pop()is never called.text_atlas.rsusespeek_lru()andpop_lru(), which take a different path.So this is dependency hygiene rather than a bug fix, and no urgency is implied.
Why it is still worth changing
Anything depending on glyphon inherits the advisory. For projects running
cargo audit --deny warningsin CI, that turns the security gate red until an exception is added, regardless of reachability — and because the fix is two majors up, no downstreamcargo updatecan reach it. The requirement has to change here.On the version string
"0.18.2", not"0.18":lru 0.18.0and0.18.1are published and are not patched.^0.18could still resolve to a vulnerable version;^0.18.2pins the floor without restricting future 0.18.x.What we checked
The equivalent one-line change compiles clean against
cryoglyph(the iced fork) with no source edits — everylruAPI it uses is unchanged in 0.18.2. glyphon's usage here is a subset of that (peek_lru,pop_lru), so we expect the same, though we have not compiled glyphon itself against 0.18.2 — worth a CI run rather than taking our word for it.The same change is open against the iced fork as
iced-rs/cryoglyph#5.(The branch is pushed from
nabbisen/cryoglyphbecause GitHub allows only one fork per network, and we forked cryoglyph first for that PR.)Happy to close this if you would rather handle it another way.