Memory-safety bugs introduce critical software-security issues. Rust provides memory-safe mechanisms to avoid memory-safety bugs in programming, while still allowing unsafe escape hatches via unsafe code. However, the unsafe code that enhances the usability of Rust provides clear spots for finding memory-safety bugs in Rust source code. In this paper, we claim that these unsafe spots can still be identifiable in Rust binary code via machine learning and be leveraged for finding memory-safety bugs. To support our claim, we propose the tool textttrustspot, that enables reverse engineering to learn an unsafe classifier that proposes a list of functions in Rust binaries for downstream analysis. We empirically show that the function proposals by textttrustspot can recall $92.92\%$ of memory-safety bugs, while it covers only $16.79\%$ of the entire binary code. As an application, we demonstrate that the function proposals are used in targeted fuzzing on Rust packages, which contribute to reducing the fuzzing time compared to non-targeted fuzzing.
翻译:内存安全错误引入了关键的软件安全问题。 鲁斯特提供记忆安全机制, 以避免编程中的记忆安全错误, 同时仍然允许通过不安全代码进行不安全的解密。 但是, 增强鲁斯特源代码中内内存安全错误的可用性的不安全代码提供了清晰点。 在本文中, 我们声称这些不安全点仍然可以通过机器学习在鲁斯特二进制代码中识别, 并被利用以寻找记忆安全错误。 为支持我们的主张, 我们提议工具文本托拉斯点, 使反向工程能够学习一个不安全的分类器, 在鲁斯特二进制中提出用于下游分析的功能清单。 我们的经验显示, 文本托拉斯点的功能提案可以回顾92. 92 美元, 而仅涵盖整个二进制代码中的16. 79 美元。 作为应用程序, 我们证明这些功能提案被用于在鲁斯特软件包上有目标的模糊, 这有助于减少与非目标的模糊性模糊性混淆时间 。