There is a growing need for hardware-software contracts which precisely define the implications of microarchitecture on software security-i.e., security contracts. It is our view that such contracts should explicitly account for microarchitecture-level implementation details that underpin hardware leakage, thereby establishing a direct correspondence between a contract and the microarchitecture it represents. At the same time, these contracts should remain as abstract as possible so as to support efficient formal analyses. With these goals in mind, we propose leakage containment models (LCMs)-novel axiomatic security contracts which support formally reasoning about the security guarantees of programs when they run on particular microarchitectures. Our core contribution is an axiomatic vocabulary for formally defining LCMs, derived from the established axiomatic vocabulary used to formalize processor memory consistency models. Using this vocabulary, we formalize microarchitectural leakage-focusing on leakage through hardware memory systems-so that it can be automatically detected in programs. To illustrate the efficacy of LCMs, we present two case studies. First, we demonstrate that our leakage definition faithfully captures a sampling of (transient and non-transient) microarchitectural attacks from the literature. Second, we develop a static analysis tool based on LCMs which automatically identifies Spectre vulnerabilities in programs and scales to analyze realistic-sized codebases, like libsodium.
翻译:目前越来越需要硬件软件合同,以准确界定微结构对软件安全(即安全合同)的影响。我们认为,这些合同应明确说明支持硬件渗漏的微结构级执行细节,从而在合同和它所代表的微结构类合同之间建立直接的对应关系。与此同时,这些合同应尽量保持抽象,以便支持有效的正式分析。考虑到这些目标,我们提议渗漏控制模型(LCM)-新现象安全合同,支持在程序运行特定微结构时对方案的安全保障进行正式解释。我们的核心贡献是正式定义LCMM(LCM)的不言辞词汇,它源于用于正式确定进程记忆一致性模型的既定的对立词汇。我们使用这种词汇,将显微结构性渗漏确定为通过硬件内存系统渗漏的重点,以便可以在程序中自动检测到渗漏。为了说明LCM(LCM)的功效,我们提出了两个案例研究。首先,我们证明我们的渗漏定义忠实地从第二个文献库中提取了对LCM(透明和非直观)系统分析模型的样本。