arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1809.08811cs.CR
收藏

指向正确的方向-在一个美好的世界中保护内存访问

Pointing in the Right Direction - Securing Memory Accesses in a Faulty World

Robert Schilling, Mario Werner, Pascal Nasahl, Stefan Mangard

摘要:

除了计算之外,读写内存是处理器执行的最常见的操作。因此,这些操作的正确性对于任何程序的正确执行都是至关重要的。然而,一旦考虑到故障攻击,假设硬件按照指示执行其存储器操作就不再有效。特别是,攻击者可能会以读取或写入错误寻址的存储器为目标来引发故障,这可能具有各种关键的安全性和安全性影响。在这项工作中,我们提出了一个解决方案,这个问题,并提出了一个新的方法来保护每一个内存访问程序内的地址篡改。该对策包括两个构件。首先,程序中的每个指针都使用多残留错误检测代码进行冗余编码。冗余信息存储在指针的未使用的高位中,在存储方面具有零开销。第二,加载和存储指令被扩展以将数据与来自指针的对应编码地址链接。错误的内存访问随后会感染数据值,从而允许软件检测错误。出于评估目的,我们将我们的对策实施到RISC-V处理器中,在FPGA开发板上进行测试,并评估了引起的开销。此外,基于LLVM的C编译器已被修改为自动编码所有数据指针,执行编码指针算术,并发出具有链接支持的扩展加载/存储指令。我们的评估表明,该对策引起的平均开销为10%的代码大小和7%的运行时,这使得它适合于实际采用。

英文摘要:

Reading and writing memory are, besides computation, the most common operations a processor performs. The correctness of these operations is therefore essential for the proper execution of any program. However, as soon as fault attacks are considered, assuming that the hardware performs its memory operations as instructed is not valid anymore. In particular, attackers may induce faults with the goal of reading or writing incorrectly addressed memory, which can have various critical safety and security implications. In this work, we present a solution to this problem and propose a new method for protecting every memory access inside a program against address tampering. The countermeasure comprises two building blocks. First, every pointer inside the program is redundantly encoded using a multi-residue error detection code. The redundancy information is stored in the unused upper bits of the pointer with zero overhead in terms of storage. Second, load and store instructions are extended to link data with the corresponding encoded address from the pointer. Wrong memory accesses subsequently infect the data value allowing the software to detect the error. For evaluation purposes, we implemented our countermeasure into a RISC-V processor, tested it on a FPGA development board, and evaluated the induced overhead. Furthermore, a LLVM-based C compiler has been modified to automatically encode all data pointers, to perform encoded pointer arithmetic, and to emit the extended load/store instructions with linking support. Our evaluations show that the countermeasure induces an average overhead of 10% in terms of code size and 7% regarding runtime, which makes it suitable for practical adoption.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑