# Rust bug report shows lifetime checks can allow invalid memory access

_Published Tuesday, October 13, 2026 at 8:07 AM EDT · Security · Latest · Tier 2 — Notable_

![In the following code: use std::sync::Mutex; static KEPT: Mutex&lt;Vec&lt;Box&lt;dyn std::any::Any + Send&gt;&gt;&gt; = Mutex::new(Vec::new()); struct Q&lt;T: &#39;static + Send&gt;(Option&lt;T&gt;); impl&lt;T: &#39;static + Send&gt; Drop fo... — Primary](https://opengraph.githubassets.com/6257720fd694ad6928b48015d46c6fd65451b426c2645013baeaa6c3f86da2af/rust-lang/rust/issues/164250)

A Rust issue report shows code bypassing a structure's lifetime requirements and accessing a string after its scope ends. The reporter says the example compiles when it should be rejected, prints replacement data, and triggers a stack-use-after-scope crash under AddressSanitizer, a tool for detecting memory errors.

The report identifies the issue on the current nightly compiler and stable versions at least as far back as 1.85.0. Assigning a field allows a short-lived reference to be treated as valid for the program's lifetime.

## Sources

- [github.com](https://github.com/rust-lang/rust/issues/164250)

---
Canonical: https://techandbusiness.org/newswire/g1491DBvzDZDWaIhHAGISS
Published: 2026-10-13T12:07:00.201Z
Story chronology: 2026-10-13T08:45:54.000Z
Retrieved: 2026-10-13T14:49:10.933Z
Publisher: Tech & Business (techandbusiness.org)
