Rust is an emerging programming language that aims to prevent memory-safety bugs. However, the current design of Rust also brings side effects which may increase the risk of memory-safety issues. In particular, it employs OBRM (ownership-based resource management) and enforces automatic deallocation of unused resources without the garbage collector. It may therefore falsely deallocate reclaimed memory and lead to use-after-free or double-free issues. In this paper, we study the problem of invalid memory deallocation and propose SafeDrop, a static path-sensitive data-flow analysis approach to detect such bugs. Our approach analyzes each API of a Rust crate iteratively by traversing the control-flow graph and extracting all aliases of each data-flow. To guarantee precision and scalability, we leverage a modified Tarjan algorithm to achieve scalable path-sensitive analysis, and a cache-based strategy to achieve efficient inter-procedural analysis. Our experiment results show that our approach can successfully detect all existing CVEs of such issues with a limited number of false positives. The analysis overhead ranges from 1.0% to 110.7% in comparison with the original compilation time. We further apply our tool to several real-world Rust crates and find 8 Rust crates involved with invalid memory deallocation issues.


翻译:鲁斯特是一个新兴的编程语言,目的是防止记忆安全错误。 但是,鲁斯特目前的设计也会产生副作用,可能会增加记忆安全问题的风险。 特别是, 它使用基于自有的资源管理( OBRM), 强制自动分配未使用的资源而不使用垃圾收集器。 因此, 它可能错误地处理回收的记忆, 并导致使用无成本或无双重的问题。 在本文件中, 我们研究无效的内存交易定位问题, 并提出“ 安全数据流分析方案 ”, 这是一种静态的静态路径敏感数据流分析方法, 以探测这类错误。 我们的方法通过对控制流程图进行反复分析, 并提取每个数据流的所有别名。 为了保证准确性和可缩放性, 我们利用修改后的塔然算法实现可缩放路径敏感分析, 以及一个基于缓存的战略, 以实现高效的跨程序分析。 我们的实验结果表明, 我们的方法能够成功地检测出所有现存的这类问题的CVE, 并且检测到数量有限的假正数。 我们的分析方法从1. 0 % 至110.7 % 与原始的 RR8 将原始存储工具进一步应用原始的Rest 。

0
下载
关闭预览

相关内容

Rust 是一种注重高效、安全、并行的系统程序语言。
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
Fariz Darari简明《博弈论Game Theory》介绍,35页ppt
专知会员服务
106+阅读 · 2020年5月15日
专知会员服务
59+阅读 · 2020年3月19日
MIT新书《强化学习与最优控制》
专知会员服务
270+阅读 · 2019年10月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
当 WebAssembly 遇上 Serverless
高可用架构
4+阅读 · 2019年5月17日
已删除
架构文摘
3+阅读 · 2019年4月17日
《自然》(20190221出版)一周论文导读
科学网
6+阅读 · 2019年2月23日
计算机类 | ISCC 2019等国际会议信息9条
Call4Papers
5+阅读 · 2018年12月25日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
【今日新增】IEEE Trans.专刊截稿信息8条
Call4Papers
7+阅读 · 2017年6月29日
Arxiv
13+阅读 · 2021年3月3日
Few-shot Scene-adaptive Anomaly Detection
Arxiv
8+阅读 · 2020年7月15日
Deep Learning for Deepfakes Creation and Detection
Arxiv
6+阅读 · 2019年9月25日
VIP会员
相关VIP内容
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
当 WebAssembly 遇上 Serverless
高可用架构
4+阅读 · 2019年5月17日
已删除
架构文摘
3+阅读 · 2019年4月17日
《自然》(20190221出版)一周论文导读
科学网
6+阅读 · 2019年2月23日
计算机类 | ISCC 2019等国际会议信息9条
Call4Papers
5+阅读 · 2018年12月25日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
【今日新增】IEEE Trans.专刊截稿信息8条
Call4Papers
7+阅读 · 2017年6月29日
Top
微信扫码咨询专知VIP会员