RegGuard:利用CPU寄存器缓解面向控制和数据的攻击
RegGuard: Leveraging CPU Registers for Mitigation of Control- and Data-Oriented Attacks
摘要:
CPU寄存器是小型离散存储单元,用于在CPU内保存临时数据和指令。寄存器不能像内存那样寻址,这使得它们不受内存攻击和其他方式的操纵。在本文中,我们利用这一点,提供了一个保护机制的关键程序数据,积极的局部变量和控制对象的堆栈上。这种保护有效地消除了面向控制和面向数据的攻击的威胁,即使对手完全了解活动堆栈。我们的解决方案RegGuard是一种编译器寄存器分配策略,它利用可用的CPU寄存器在执行期间保存关键变量。与传统的分配方案不同,RegGuard将程序变量的安全意义优先于其预期的性能增益。我们的方案可以有效地处理保存到堆栈的寄存器,即,当编译器需要释放寄存器为新的函数调用的变量腾出空间时。使用RegGuard,整个堆栈上任何位置的关键数据对象都可以有效地防止损坏,即使是具有任意读写访问权限的对手也可以。虽然我们的主要设计重点是安全性,但性能对于在实践中采用的方案非常重要。RegGuard仍然受益于通常与寄存器分配相关的性能增益,并且在大多数情况下,开销在其他不安全的寄存器分配方案的百分之几以内。我们提出了详细的实验,展示了性能的RegGuard使用不同的基准程序和ARM64平台上的C库。
英文摘要:
CPU registers are small discrete storage units, used to hold temporary data and instructions within the CPU. Registers are not addressable in the same way memory is, which makes them immune from memory attacks and manipulation by other means. In this paper, we take advantage of this to provide a protection mechanism for critical program data; both active local variables and control objects on the stack. This protection effectively eliminates the threat of control- and data-oriented attacks, even by adversaries with full knowledge of the active stack. Our solution RegGuard, is a compiler register allocation strategy that utilises the available CPU registers to hold critical variables during execution. Unlike conventional allocations schemes, RegGuard prioritises the security significance of a program variable over its expected performance gain. Our scheme can deal effectively with saved registers to the stack, i.e., when the compiler needs to free up registers to make room for the variables of a new function call. With RegGuard, critical data objects anywhere on the entire stack are effectively protected from corruption, even by adversaries with arbitrary read and write access. While our primary design focus is on security, performance is very important for a scheme to be adopted in practice. RegGuard is still benefiting from the performance gain normally associated with register allocations, and the overhead is within a few percent of other unsecured register allocation schemes for most cases. We present detailed experiments that showcase the performance of RegGuard using different benchmark programs and the C library on ARM64 platform.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。