Despite extensive testing and correctness certification of their functional semantics, a number of compiler optimizations have been shown to violate security guarantees implemented in source code. While prior work has shed light on how such optimizations may introduce semantic security weaknesses into programs, there remains a significant knowledge gap concerning the impacts of compiler optimizations on non-semantic properties with security implications. In particular, little is currently known about how code generation and optimization decisions made by the compiler affect the availability and utility of reusable code segments called gadgets required for implementing code reuse attack methods such as return-oriented programming. In this paper, we bridge this gap through a study of the impacts of compiler optimization on code reuse gadget sets. We analyze and compare 1,187 variants of 20 different benchmark programs built with two production compilers (GCC and Clang) to determine how their optimization behaviors affect the code reuse gadget sets present in program variants with respect to both quantitative and qualitative metrics. Our study exposes an important and unexpected problem; compiler optimizations introduce new gadgets at a high rate and produce code containing gadget sets that are generally more useful to an attacker than those in unoptimized code. Using differential binary analysis, we identify several undesirable behaviors at the root of this phenomenon. In turn, we propose and evaluate several strategies to mitigate these behaviors. In particular, we show that post-production binary recompilation can effectively mitigate these behaviors with negligible performance impacts, resulting in optimized code with significantly smaller and less useful gadget sets.


翻译:尽管对其功能语义进行了广泛的测试和校正认证,但一些编译器优化显示违反了源代码中实施的安全保障。虽然先前的工作揭示了这种优化如何在程序中引入语义安全弱点,但对于编译器优化对具有安全影响的非语义属性的影响,仍然存在巨大的知识差距。特别是,目前对编译器的代码生成和优化决定如何影响可重新使用的代码元件的可用性和实用性知之甚少,这些元件被称作工具,用于实施代码再利用袭击方法,如返回导向程序等。在本文件中,我们通过研究编译器优化对代码再利用工具组的影响来弥补这一差距。我们分析并比较了由两个生产编译器(GCC和Clang)组成的20个不同基准程序的1 187个变量,以确定其优化行为如何影响在定量和定性尺度上出现的代码再使用。我们的研究揭示了一个重要和意外的问题;编译器优化采用新的拼写法,以高速率引入新的拼写器,并生成了含有关于代码对代码对代码对代码再利用的准确性的影响。我们通常在使用这些硬性分析中会更有用的方法,从而展示一些不易分析。我们更有助于展示了这些变化的代码,从而展示了这些变化的代码,从而显示这些变数,这些变化的变化的变化了这些变数,从而显示了一种更易变数。

0
下载
关闭预览

相关内容

专知会员服务
45+阅读 · 2020年10月31日
专知会员服务
40+阅读 · 2020年9月6日
专知会员服务
162+阅读 · 2020年1月16日
开源书:PyTorch深度学习起步
专知会员服务
51+阅读 · 2019年10月11日
强化学习最新教程,17页pdf
专知会员服务
177+阅读 · 2019年10月11日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
MIT新书《强化学习与最优控制》
专知会员服务
278+阅读 · 2019年10月9日
已删除
将门创投
8+阅读 · 2019年8月28日
Arxiv
19+阅读 · 2021年1月14日
Arxiv
15+阅读 · 2020年2月6日
Arxiv
5+阅读 · 2018年3月16日
VIP会员
相关VIP内容
专知会员服务
45+阅读 · 2020年10月31日
专知会员服务
40+阅读 · 2020年9月6日
专知会员服务
162+阅读 · 2020年1月16日
开源书:PyTorch深度学习起步
专知会员服务
51+阅读 · 2019年10月11日
强化学习最新教程,17页pdf
专知会员服务
177+阅读 · 2019年10月11日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
MIT新书《强化学习与最优控制》
专知会员服务
278+阅读 · 2019年10月9日
相关资讯
已删除
将门创投
8+阅读 · 2019年8月28日
Top
微信扫码咨询专知VIP会员