微软FORGE实验室利用名为Hyenas(代号MDASH)的AI驱动漏洞扫描系统,在Rust标准库的std和core组件中发现了多个内存安全问题 1。尽管Rust以安全性著称,但这些发现表明即使完全使用safe Rust编写的代码也可能触发未定义行为 1。研究指出,这些漏洞主要源于对不安全代码(unsafe code)的信任错位,具体表现为三种模式:错误地假设代码不会panic、信任用户提供的实现正确性以及信任底层系统状态稳定 1。
报告详细列举了四个具体的漏洞案例及其对应的追踪编号:MapWindows::clone因Panic安全问题被标记为#156501;str::replace配合自定义Pattern时可能导致创建非UTF-8字符串,对应问题#156491;process::exit与主线程信号堆栈交互存在系统边界缺陷,记录为#161018;CommandExt::exec涉及全局环境变量(environ)的竞争条件,对应#156951 1。此外,历史数据显示CVE-2020-36323涉及join函数,而信号堆栈相关的Bug可追溯至2015年 1。
相关修复工作已逐步推进,并影响了Rust的稳定性发布计划 1。涉及的版本信息包括Rust 1.96.0、1.97.0、1.98.0及1.99.0,其中分配器稳定化计划定于11月12日发布的Rust 1.100版本中实施 1。
Researchers from Microsoft’s FORGE Laboratory have identified multiple memory safety issues within the Rust standard library, specifically affecting the std and core components 1. These vulnerabilities were detected using Hyenas, an AI-driven scanning system also known by the codename MDASH 1. Despite Rust’s reputation for security, the findings indicate that code written entirely in safe Rust can still trigger undefined behavior due to misaligned assumptions regarding unsafe code blocks 1.
The root causes of these bugs are categorized into three specific patterns of trust errors: assuming that code will not panic, trusting user-provided implementations to be correct, and relying on the stability of the underlying system state 1. Several concrete examples illustrate these risks. A panic safety issue was found in MapWindows::clone (issue #156501), while str::replace with a custom Pattern (issue #156491) could lead to the creation of non-UTF-8 strings 1. Additionally, bugs related to system boundaries included an interaction between process::exit and the main thread’s signal stack (issue #161018), as well as a race condition involving CommandExt::exec and the global environment (issue #156951) 1.
These discoveries span several Rust versions, including 1.96.0, 1.97.0, 1.98.0, and 1.99.0 1. The report highlights that some of these flaws have long-standing origins; for instance, a bug concerning the signal stack dates back to 2015, and historical data references CVE-2020-36323 related to the join function 1. Remediation efforts are currently underway, impacting the Rust project's stability release plans, with allocator stabilization scheduled for Rust 1.100 on November 12 1.
评论
还没有评论,欢迎留下第一条。