Skip to content

fix(security): eliminate vulnerable lru 0.16.4 (RUSTSEC-2026-0253) - #2

Merged
hamdyaea merged 1 commit into
mainfrom
fix/rustsec-2026-0253-lru
Nov 3, 2026
Merged

hamdyaea merged 1 commit into
mainfrom
fix/rustsec-2026-0253-lru

Conversation

@hamdyaea

@hamdyaea hamdyaea commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Resolve RUSTSEC-2026-0253 (panic-safety use-after-free in lru::LruCache::pop()).
  • lru 0.16.4 was pulled transitively by num-prime 0.7.0 through uu_factor.
  • Vendor the unchanged num-prime 0.7.0 Rust source under vendor/num-prime, preserving upstream licenses, and update its lru dependency from 0.16.3 to the patched 0.18.5.
  • Use a scoped [patch.crates-io] override while awaiting an upstream num-prime release; regenerate Cargo.lock and document the override in vendor/num-prime/PATCH-NOTES.md.

Verification (Rust 1.88.0 on Linux)

  • cargo tree --locked -i lru resolves only lru 0.18.5, via local num-prime.
  • cargo check -p uu_factor --locked -q: pass.
  • cargo test -p uu_factor --locked -q: 2 passed, 0 failed.
  • cargo run --locked -q --no-default-features --features factor --bin coreutils -- factor 360 1009: expected factorization.
  • git diff --check: pass.

Fixes #1.

@hamdyaea
hamdyaea merged commit 2e7e3a6 into main Nov 3, 2026
67 of 155 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RUSTSEC-2026-0253: Potential use-after-free due to lack of panic safety in LruCache::pop()

1 participant