Skip to content

Update Rust crate lru to 0.18.0 [SECURITY] - #2681

Merged
palfrey merged 2 commits into
mainfrom
renovate/crate-lru-vulnerability
Aug 20, 2026
Merged

Update Rust crate lru to 0.18.0 [SECURITY]#2681
palfrey merged 2 commits into
mainfrom
renovate/crate-lru-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
lru dependencies minor 0.16.00.18.0

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

RUSTSEC-2026-0253

More information

Details

LruCache::pop() in lru was not panic-safe. If the Drop implementation of a stored key panics during pop(), self.detach() is never called, leaving dangling pointers in the internal doubly-linked list.

A subsequent cache operation that triggers eviction can then dereference these dangling pointers:

  • The node is freed from the map, but remains linked in the LRU list due to the skipped detach() call
  • When a new insertion causes eviction, the LRU traversal encounters the dangling pointer
  • This results in a write to already-freed memory during the eviction process
Impact
  • CWE-416 (Use-After-Free): memory corruption when subsequent cache operations access freed node pointers in the linked list
  • CWE-415 (Double Free): potential heap corruption when the same memory is freed multiple times

Both types of undefined behavior can be invoked in safe Rust, but only if unwinding panics are enabled and std::panic::catch_unwind is used with key types that have potentially-panicking Drop implementations.

Fix

Fixed in lru 0.18.2 by detaching the node from the linked list before freeing it and dropping the key (lru-rs#238).

Severity

Unknown

References

This data is provided by OSV and the Rust Advisory Database (CC0 1.0).


Release Notes

jeromefroe/lru-rs (lru)

v0.18.2

Compare Source

  • Fix panic-safety unsoundness in pop method.

v0.18.1

Compare Source

  • Add find_and_promote method.

v0.18.0

Compare Source

  • Fix unconstrained lifetime in get_or_insert_mut_ref.

v0.17.0

Compare Source

  • Upgrade hashbrown to 0.17.0 and update MSRV to 1.85.0.

v0.16.4

Compare Source

  • Add get_or_insert_with_key and variants.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.


This change is Reviewable

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nativelink Ready Ready Preview Aug 20, 2026 12:39pm
nativelink-aidm Ready Ready Preview Aug 20, 2026 12:39pm

Request Review

@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from c360bb5 to 5585c82 Compare August 12, 2026 03:45
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from 5585c82 to a367ed3 Compare August 12, 2026 16:07
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from a367ed3 to c185838 Compare August 12, 2026 17:23
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from c185838 to a3c28fe Compare August 13, 2026 05:14
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from a3c28fe to e752b30 Compare August 13, 2026 05:21
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from e752b30 to 5eabf17 Compare August 14, 2026 01:59
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from 5eabf17 to c4fb579 Compare August 14, 2026 05:21
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from c4fb579 to 2032d92 Compare August 14, 2026 05:55
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from 2032d92 to e8c6789 Compare August 14, 2026 14:41
@palfrey

palfrey commented Aug 19, 2026

Copy link
Copy Markdown
Member

This doesn't replace it entirely, and is blocked on awslabs/aws-sdk-rust#1451

@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from 0abce9b to 7f5eafc Compare August 19, 2026 20:36
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from 7f5eafc to c3ababa Compare August 20, 2026 02:02
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from c3ababa to da15d35 Compare August 20, 2026 02:29
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from da15d35 to 5cc6506 Compare August 20, 2026 06:43
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from 5cc6506 to ec92c21 Compare August 20, 2026 08:23
@renovate
renovate Bot force-pushed the renovate/crate-lru-vulnerability branch from ec92c21 to 1ff2bf3 Compare August 20, 2026 08:47
@palfrey
palfrey merged commit 5d29f82 into main Aug 20, 2026
45 checks passed
@palfrey
palfrey deleted the renovate/crate-lru-vulnerability branch August 20, 2026 14:44
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.

1 participant