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

Author:

Xu Hui1,Chen Zhuangbin2,Sun Mingshen3,Zhou Yangfan4,Lyu Michael R.2

Affiliation:

1. School of Computer Science, Fudan University, Shanghai, China

2. Department of CSE, The Chinese University of Hong Kong, Shatin, N.T., China

3. Baidu Security, Sunnyvale, CA

4. School of Computer Science, Fudan University and Shanghai Key Laboratoryof Intelligent Information Processing, Shanghai, China

Abstract

Rust is an emerging programming 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 article studies the question by surveying 186 real-world bug reports collected from several origins, which contain all existing Rust common vulnerability and exposures (CVEs) of memory-safety issues by 2020-12-31. We manually analyze each bug and extract their culprit patterns. Our analysis result shows that Rust can keep its promise that all memory-safety bugs require unsafe code, and many memory-safety bugs in our dataset are mild soundness issues that only leave a possibility to write memory-safety bugs without unsafe code. Furthermore, we summarize three typical categories of memory-safety bugs, including automatic memory reclaim, unsound function, and unsound generic or trait. While automatic memory claim bugs are related to the side effect of Rust newly-adopted ownership-based resource management scheme, unsound function reveals the essential challenge of Rust development for avoiding unsound code, and unsound generic or trait intensifies the risk of introducing unsoundness. Based on these findings, we propose two promising directions toward improving the security of Rust development, including several best practices of using specific APIs and methods to detect particular bugs involving unsafe code. Our work intends to raise more discussions regarding the memory-safety issues of Rust and facilitate the maturity of the language.

Funder

China Education and Research Network

Research Grants Council of the Hong Kong Special Administrative Region, China

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Cited by 23 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. FRIES: Fuzzing Rust Library Interactions via Efficient Ecosystem-Guided Target Generation;Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis;2024-09-11

2. An Empirical Study on the Energy Usage and Performance of Pandas and Polars Data Analysis Python Libraries;Proceedings of the 28th International Conference on Evaluation and Assessment in Software Engineering;2024-06-18

3. Understanding and Detecting Real-World Safety Issues in Rust;IEEE Transactions on Software Engineering;2024-06

4. ERASan: Efficient Rust Address Sanitizer;2024 IEEE Symposium on Security and Privacy (SP);2024-05-19

5. Towards Understanding Rust in the Era of AI for Science at an Ecosystem Scale;2024 6th International Conference on Communications, Information System and Computer Engineering (CISCE);2024-05-10

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3