Rust soundness hole: struct lifetime requirements bypassable since Rust 1.4

jedisct1 · x · 2026-10-13

Security researcher jedisct1 surfaced a high-priority issue (#164250) on the Rust repo: struct lifetime requirements can be bypassed via covariant field assignment, and the problem has existed since Rust 1.4.

The PoC uses a custom Drop impl to stash a reference into a global Mutex<Vec<Box<dyn Any>>> after its lifetime has ended, producing a dangling reference — a classic use-after-free. The issue is labeled I-unsound (the worst class of bug), touching the borrow checker, lifetimes, variance and destructors, and is assigned to the types team.

Original post →

More from coding & agent

coding & agent channel →