11 year old unsoundness bugs found in Rust borrow checker
- ID
- 34862
- Status
- summarized
- Published
- 13 Oct 2026, 6:27 PM
- Fetched
- 13 Oct 2026, 10:48 PM
- Provider
- Hacker News
- Category
- dev-community
- Original URL
- https://github.com/rust-lang/rust/issues/164250
- Source URL
- https://hnrss.org/best
Summary
- Score
- 7.0
- Created
- 13 Oct 2026, 10:48 PM
- Tags
- Audience
- developers
What happened
Rust issue #164250 reports a soundness hole where a struct's lifetime requirements can be bypassed via covariant field assignment; it is tagged I-unsound, P-high, and touches the borrow checker, destructors, lifetimes, and variance. In the thread, lcnr notes the bug is 11 years old, would have been P-critical if new, and likely requires an intentionally malicious Drop implementation rather than causing accidental memory unsafety. The Hacker News discussion drew 390 points and 196 comments.
Why it matters
If you execute untrusted Rust code or third-party crates in-process, this is a concrete reminder that borrow-checker lifetime guarantees are not a security boundary against malicious Drop impls; sandbox or isolate untrusted Rust rather than assuming the compiler makes it safe. For ordinary Rust application code, there is no immediate runtime patch implied by this report—track the compiler fix and avoid overreacting to a P-high issue that the text says is hard to hit accidentally.
Discussion angle
If Rust can have an 11-year-old soundness hole that mainly needs a malicious Drop to exploit, where should teams draw the line between trusting the compiler and sandboxing untrusted Rust?