Rust 编程语言的借用检查器中被发现存在一个长达 11 年的内存安全漏洞1。该漏洞允许通过协变字段赋值绕过结构体的生命周期约束,导致程序即使违反了 'static 边界条件也能通过编译1。经测试,这一缺陷可导致 AddressSanitizer 检测到栈内存使用后释放(stack-use-after-scope)错误1。
该漏洞已被标记为 P-high 优先级1,影响至少从 Rust 1.85.0 版本开始的所有稳定版本,回溯影响范围至少达到 2017 年的 1.4.0 版本1。这一问题涉及借用检查器、析构函数、生命周期和方差等核心语言机制1,属于 soundness hole(最严重的 bug 类型)1。该漏洞于 2026 年 10 月 13 日被报告,编号为 #1642501。
Researchers have identified a critical soundness vulnerability in Rust's borrow checker that has persisted for approximately eleven years.1 The flaw, tracked as issue #164250, allows covariant field assignments to bypass lifetime constraints marked as 'static, enabling code that should be rejected at compile time to pass validation and subsequently access already-freed memory.1
The vulnerability affects all stable Rust versions from at least 1.4.0 (released in 2017) through 1.85.0.1 When exploited, the bug permits memory safety violations that manifest as stack-use-after-scope errors, as confirmed by AddressSanitizer detection.1 The issue has been classified as P-high priority and involves core language mechanisms including the borrow checker, destructors, lifetimes, and variance rules.1 The vulnerability was reported on October 13, 2026.1
评论
还没有评论,欢迎留下第一条。