SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations

Sören van der Wall, Roland Meyer
{"title":"SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations","authors":"Sören van der Wall, Roland Meyer","doi":"arxiv-2407.15080","DOIUrl":null,"url":null,"abstract":"We address the problem of preserving non-interference across compiler\ntransformations under speculative semantics. We develop a proof method that\nensures the preservation uniformly across all source programs. The basis of our\nproof method is a new form of simulation relation. It operates over directives\nthat model the attacker's control over the micro-architectural state, and it\naccounts for the fact that the compiler transformation may change the influence\nof the micro-architectural state on the execution (and hence the directives).\nUsing our proof method, we show the correctness of dead code elimination. When\nwe tried to prove register allocation correct, we identified a previously\nunknown weakness that introduces violations to non-interference. We have\nconfirmed the weakness for a mainstream compiler on code from the libsodium\ncryptographic library. To reclaim security once more, we develop a novel static\nanalysis that operates on a product of source program and register-allocated\nprogram. Using the analysis, we present an automated fix to existing register\nallocation implementations. We prove the correctness of the fixed register\nallocations with our proof method.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-07-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2407.15080","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

We address the problem of preserving non-interference across compiler transformations under speculative semantics. We develop a proof method that ensures the preservation uniformly across all source programs. The basis of our proof method is a new form of simulation relation. It operates over directives that model the attacker's control over the micro-architectural state, and it accounts for the fact that the compiler transformation may change the influence of the micro-architectural state on the execution (and hence the directives). Using our proof method, we show the correctness of dead code elimination. When we tried to prove register allocation correct, we identified a previously unknown weakness that introduces violations to non-interference. We have confirmed the weakness for a mainstream compiler on code from the libsodium cryptographic library. To reclaim security once more, we develop a novel static analysis that operates on a product of source program and register-allocated program. Using the analysis, we present an automated fix to existing register allocation implementations. We prove the correctness of the fixed register allocations with our proof method.
SNIP:编译器转换的推测性执行和非干涉保护
我们探讨了在推测语义下,如何在编译器变换中保持互不干涉的问题。我们开发了一种证明方法,可以确保在所有源程序中统一地保持不干涉。我们的证明方法的基础是一种新形式的模拟关系。它作用于模拟攻击者对微体系结构状态控制的指令,并考虑到编译器转换可能会改变微体系结构状态对执行(以及指令)的影响这一事实。当我们试图证明寄存器分配的正确性时,我们发现了一个以前未知的弱点,它引入了违反互不干涉原则的行为。我们在 libsodium 密码库代码的主流编译器中证实了这一弱点。为了再次找回安全性,我们开发了一种新颖的静态分析方法,可对源程序和寄存器分配程序的乘积进行操作。利用该分析,我们对现有的寄存器分配实现进行了自动修复。我们用证明方法证明了固定寄存器分配的正确性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
文献相关原料
公司名称 产品信息 采购帮参考价格
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信