当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Memory-Safety Challenge Considered Solved? An In-Depth Study with All Rust CVEs
arXiv - CS - Programming Languages Pub Date : 2020-03-06 , DOI: arxiv-2003.03296
Hui Xu, Zhuangbin Chen, Mingshen Sun, Yangfan Zhou, Michael Lyu

Rust is an emerging programing language that aims at preventing memory-safety bugs without sacrificing much efficiency. The claimed property is very attractive to developers, and many projects start using the language. However, can Rust achieve the memory-safety promise? This paper studies the question by surveying the bug reports collected from two public datasets, \textit{Trophy Cases} and \textit{RustSec Advisory Database}, which contain all existing CVEs (common vulnerability and exposures) of Rust. We manually analyze each bug in-depth and extract their memory-safety issues and culprits. Our analysis leads to several novel findings and implications. Most importantly, we find while Rust successfully limits memory-safety risks to the realm of unsafe code, it also brings some side effects that cause new patterns of dangling-pointer issues. In particular, most of the use-after-free and double-free bugs are related to the automatic drop scheme associated with the ownership-based memory management model. Based on these findings, we further provide several suggestions to program developers (i.e., best practice of using some APIs) and compiler developers (i.e., possible ways to mitigate the side effects) for improving the resilience of Rust software. Our work intends to raise more discussions regarding the memory-safety issues of Rust and facilitate the maturity of the language.

中文翻译:

是否考虑解决内存安全挑战?对所有 Rust CVE 的深入研究

Rust 是一种新兴的编程语言,旨在在不牺牲太多效率的情况下防止内存安全错误。声称的属性对开发人员非常有吸引力,许多项目开始使用该语言。然而,Rust 能否实现内存安全承诺?本文通过调查从两个公共数据集 \textit{Trophy Cases} 和 \textit{RustSec Advisory Database} 收集的错误报告来研究这个问题,其中包含 Rust 的所有现有 CVE(常见漏洞和暴露)。我们手动深入分析每个错误并提取其内存安全问题和罪魁祸首。我们的分析导致了几个新的发现和影响。最重要的是,我们发现虽然 Rust 成功地将内存安全风险限制在不安全代码领域,但它也带来了一些副作用,导致新的悬空指针问题模式。特别是,大多数释放后使用和双重释放错误都与基于所有权的内存管理模型相关的自动删除方案有关。基于这些发现,我们进一步向程序开发人员(即使用某些 API 的最佳实践)和编译器开发人员(即减轻副作用的可能方法)提供了一些建议,以提高 Rust 软件的弹性。我们的工作旨在引发更多关于 Rust 的内存安全问题的讨论,并促进该语言的成熟。例如,减轻副作用的可能方法)以提高 Rust 软件的弹性。我们的工作旨在引发更多关于 Rust 的内存安全问题的讨论,并促进该语言的成熟。例如,减轻副作用的可能方法)以提高 Rust 软件的弹性。我们的工作旨在引发更多关于 Rust 的内存安全问题的讨论,并促进该语言的成熟。
更新日期:2020-10-06
down
wechat
bug