Fix RUSTSEC-2026-0002: Patch lru soundness vulnerability in iced_glyphon#61
Merged
doublegate merged 3 commits intomainfrom Jan 10, 2026
Merged
Conversation
Co-authored-by: doublegate <6858123+doublegate@users.noreply.github.com>
Co-authored-by: doublegate <6858123+doublegate@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix IterMut soundness issue in lru crate
Fix RUSTSEC-2026-0002: Patch lru soundness vulnerability in iced_glyphon
Jan 10, 2026
doublegate
approved these changes
Jan 10, 2026
Owner
doublegate
left a comment
There was a problem hiding this comment.
Reviewed / Approved -- DG 1/10
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses the critical security vulnerability RUSTSEC-2026-0002 in the lru crate by vendoring and patching the iced_glyphon dependency. The vulnerable lru 0.12.5 was being pulled transitively through iced_glyphon 0.6.0, which specified lru ^0.12.1 in its dependencies.
Changes:
- Vendored
iced_glyphon0.6.0 source code with updated lru dependency (0.12.1 → 0.16.3) - Applied Cargo patch in workspace to use vendored version instead of crates.io version
- Added comprehensive documentation explaining the fix and rationale
Reviewed changes
Copilot reviewed 2 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
Cargo.toml |
Added [patch.crates-io] section to redirect iced_glyphon to vendored version |
Cargo.lock |
Removed vulnerable lru 0.12.5; now only uses patched lru 0.16.3 |
vendor/iced_glyphon/Cargo.toml |
Updated lru dependency from 0.12.1 to 0.16.3 in vendored package |
vendor/iced_glyphon/src/*.rs |
Complete vendored source files from iced_glyphon 0.6.0 (unmodified except dependency) |
vendor/iced_glyphon/LICENSE-* |
License files preserved from original package |
vendor/iced_glyphon/examples/* |
Example files from original package |
vendor/README.md |
Documentation explaining the vendoring rationale and tracking info |
SECURITY-FIX-RUSTSEC-2026-0002.md |
Comprehensive security fix documentation with vulnerability details |
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.
Pull Request
Description
Fixes soundness vulnerability RUSTSEC-2026-0002 in
lru0.12.5 whereIterMutviolates Stacked Borrows by invalidating internal pointers. The vulnerable version was pulled in transitively throughiced_glyphon0.6.0.Type of Change
Changes Made
iced_glyphon0.6.0 source invendor/iced_glyphon/[patch.crates-io]in workspace Cargo.toml to use vendored versionvendor/README.mdandSECURITY-FIX-RUSTSEC-2026-0002.mdDependency chain before fix:
After fix:
Rationale for vendoring:
No updated
iced_glyphonversion exists with fixed lru dependency. Upstreamiced0.14+ has breaking changes the project explicitly avoids. Vendor patch is cleanest minimal fix until upstream updates or iced 0.14 migration.Testing
Test Details
cargo clean && cargo buildsucceeds--all-targets -- -D warningsScreenshots (if applicable)
N/A - Security fix with no UI changes
Performance Impact
Security Considerations
Security improvement: Eliminates memory unsoundness in lru crate that could cause undefined behavior through Stacked Borrows violation.
Breaking Changes
Checklist
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
docs.rs/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)https://api.github.com/repos/iced-rs/cryoglyph/commits/bb8f59f/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo update -C embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C metadata=3b1ef3f6c82b828a f/aw�� f/aws-lc-sys-0.3-I f/aws-lc-sys-0.3/home/REDACTED/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.3--norc f/aws-lc-sys-0.3-I f/aws-lc-sys-0.3gcc f/aws-lc-sys-0.3-m64 f/aws-lc-sys-0.3/tmp/rustcDbYdFX/symbols.o f/aws-lc-sys-0.3/home/REDACTED/work/RustIRC/RustIRC/target/debug/deps/rustirc-ebebb0d8e12ad024.01lnp5l4sqbkly443qhfxzctf.1km5otq.rcgu.o(http block)https://api.github.com/repos/jeromefroe/lru-rs/commits/0.16.3/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo update(http block)/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo tree -i lru@0.12.5(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
IterMutviolates Stacked Borrows by invalidating internal pointer #57✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Note
Addresses RUSTSEC-2026-0002 by replacing the vulnerable
lru0.12.5 pulled viaiced_glyphon.iced_glyphon0.6.0 invendor/iced_glyphonand updates itsCargo.tomlto depend onlru0.16.3[patch.crates-io]in workspaceCargo.tomlto use the vendorediced_glyphonCargo.lockto droplru 0.12.5and resolve tolru 0.16.3SECURITY-FIX-RUSTSEC-2026-0002.mdandvendor/README.mddocumenting the changeWritten by Cursor Bugbot for commit c3ca63f. This will update automatically on new commits. Configure here.