11 year old unsoundness bugs found in Rust borrow checker(github.com)
723 points by formerly_proven 1 day ago | 409 comments
tl;dr: An 11-year-old soundness bug in Rust's borrow checker allows a Drop implementation to smuggle a non-'static reference into a 'static context, enabling use-after-scope memory unsafety (reproducible on stable down to 1.85.0). The Types Team rates it P-high rather than P-critical because exploiting it requires an intentionally malicious Drop impl, and the bug has gone unnoticed for over a decade—suggesting it's unlikely to have caused accidental memory unsafety in real code.
HN Discussion:
  • ↑Bug is minor compiler issue, not fundamental type system flaw, easy to fix
  • ↑Soundness bugs like this are common in Rust and not particularly alarming
  • •AI tooling and formal verification will eventually eliminate such bugs
  • ↑Skeptical these theoretical bugs actually impact real-world code
  • ↑Emotional overreactions to bugs are unwarranted; static safety still valuable