按年被提到
20202020 · 6 次2026
编程语言与编译器›Rust 与内存安全·arXiv:2003.03296 · cs.PL

Memory-Safety Challenge Considered Solved? An In-Depth Study with All Rust CVEs

内存安全挑战已被解决了吗?对全部 Rust CVE 的深入研究
Hui Xu, Zhuangbin Chen, Mingshen Sun, Yangfan Zhou, Michael Lyu · 2020

人工分析 186 个 Rust 内存安全漏洞,检验 Rust 的安全承诺

开始阅读 ↗PDFalphaXiv 讨论
被推荐 · 7 人首次 2020-06-03 · 最近 2024-07-16
7不同的人
7活跃月份
10讨论串
79被引(OpenAlex)

论文调查截至 2020 年 12 月 31 日所有与内存安全相关的 Rust CVE,共 186 份真实漏洞报告,逐一人工分析并提取成因模式。结果显示 Rust 的承诺基本成立:所有内存安全漏洞都需要 unsafe 代码,且不少只是轻微的健全性(soundness)问题。作者归纳出三类典型漏洞:自动内存回收、不健全的函数、不健全的泛型或 trait,并提出两个提升 Rust 开发安全性的方向,包括使用特定 API 的最佳实践和检测涉及 unsafe 代码的 bug 的方法。

HN 为什么提它

HN 上的人引用它争论 Rust 的内存安全:有人用它强调 unsafe 的风险和 Rust 仍会出现内存安全问题(如与 C++ 的 FFI 边界),也有人认为它恰恰支持了 Rust 的安全主张。

实证研究难度 3 / 5约 45 分钟有时效性
读之前最好知道
1Rust 所有权与借用检查
2unsafe Rust
3内存安全漏洞类型(UAF、缓冲区溢出)
4CVE 漏洞库

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
推荐timschmidt · 2024-07

“Seems persuasive to me.”

认为这项 Rust CVE 研究有说服力
Tell HN: When Firefox jumps the shark, the call to action is Ladybird原评论 ↗
引用rvz · 2020-06

“Use unsafe{} at your own risk.”

借它警告使用 unsafe 代码要自担风险
Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming原评论 ↗
引用rvz · 2020-07

“it is no safer in both safe Rust and unsafe Rust according to this memory saftey assessment study”

引用它称无论 safe 还是 unsafe Rust 都并不更安全
Linux kernel in-tree Rust support原评论 ↗
引用rvz · 2020-08

“Yet once the Chromium team goes down that Rust to C++ FFI route, they will encounter the same old bugs outlined in this paper.”

预言 Chromium 走 Rust 与 C++ FFI 路线会遇到论文里的老 bug
Rust and C++ Interoperability in Chrome原评论 ↗
引用Arch-TK · 2021-02

“After all, it seems rust still has memory safety issues despite the borrow checker: Memory-Safety Challenge Considered Solved? An In-Depth Study with All Rust CVEs”

引用它说明 Rust 即便有 borrow checker 仍有内存安全问题
Mitigating Memory Safety Issues in Open Source Software原评论 ↗
引用timschmidt · 2023-01

“Rust is an emerging programing language that aims at preventing memory-safety bugs without sacrificing much efficiency.”

引用这项对全部 Rust CVE 内存安全 bug 的研究
Fish (shell) porting to Rust from C++原评论 ↗
被提交为 story · 4 次