paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Rusted Types: Static Detection of Rust Type Confusion Bugs

锈蚀的类型:Rust 类型混淆缺陷的静态检测
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 2/10 · 该文属于纯静态分析/抽象解释的安全类工作(检测 Rust 不安全类型转换引发的类型混淆),虽与用户偏好的程序分析方向有交集,但完全不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析这三个核心交叉点,也未把静态分析应用于 ML/Agentic 程序,属于用户画像中未被覆盖的邻域而非核心方向。引用 0 inbox
Zeyang Zhuang, Wei Meng, Michael R. Lyu
crossref: 2026-09-12

AI 速览

一句话:提出首个面向 Rust 的静态分析工具 DeRust,通过跨过程数据流追踪检测不安全类型转换引发的类型混淆缺陷。

Rust 以严格的内存与并发安全为目标,但 unsafe 代码仍可引入内存安全问题。其中不安全类型转换会把数据从一种类型重新解释为另一种类型,破坏类型的空间与时间属性,导致内存安全与数据损坏;此类转换还可能违背程序员意图的转换语义,使攻击者得以访问敏感内存,因此类型混淆缺陷具有严重安全影响。尽管 Rust 类型混淆缺陷不断增多,社区尚未系统研究并解决该问题。本文提出 DeRust——首个新颖的 Rust 类型混淆缺陷静态分析工具。DeRust 精确追踪从 unsafe 类型转换到敏感操作的跨过程数据流,从而高效且有效地识别类型混淆缺陷。评估表明,DeRust 能检出基准数据集中的全部类型混淆缺陷,并在前 1000 个 Rust 包中报告了 54 个此前未知的缺陷,其中 13 个获得 RustSec ID。

问题
Rust 中的不安全类型转换可破坏类型的空间与时间属性,造成内存安全和数据损坏,并可能被攻击者利用访问敏感内存,但该问题此前缺乏系统性研究与检测手段。
方法
提出静态分析工具 DeRust,精确追踪从 unsafe 类型转换到敏感操作的跨过程数据流,以识别类型混淆缺陷。
评估
在基准数据集上 DeRust 检出了全部类型混淆缺陷;对前 1000 个 Rust 包的分析报告了 54 个此前未知缺陷,其中 13 个获得 RustSec ID。
原文摘要(Abstract)

Rust is a modern programming language designed for strict memory and concurrency safety. Despite the safety checks, unsafe code in Rust can introduce memory safety issues. Unsafe type conversion, which reinterprets data from one type to another type, can alter the type spatial and temporal properties, leading to memory safety and data corruption issues. Since an unsafely converted value could violate a programmer’s intended conversion semantics and allows attackers to access the sensitive memory, type confusion bugs have critical security implications. Despite the increasing number of Rust type confusion bugs, the problem has not been systematically studied and addressed by the Rust community. In this paper, we propose DeRust, the first and a novel static analysis tool for detecting Rust type confusion bugs. By precisely tracking the inter-procedural data flows from unsafe type conversions to sensitive operations, DeRust can effectively and efficiently identify type confusion bugs. Our evaluation shows that DeRust can detect all the type confusion bugs in the benchmark datasets, and further helped report 54 previously unknown bugs in the top 1000 Rust packages with 13 RustSec IDs assigned.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11733,
  title = {Rusted Types: Static Detection of Rust Type Confusion Bugs},
  author = {Zeyang Zhuang and Wei Meng and Michael R. Lyu},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3764571}
}