paperbot · PL 论文追踪

全部论文 待读 收藏

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

SNIP:编译器变换中的推测执行与非干扰保持
POPL 9(POPL)2025匹配度 3/10 · 论文属于静态分析与形式化验证在编译器安全变换中的应用,涉及非干扰性与推测执行,与用户关注的形式化/静态分析方向有技术邻接;但它不涉及 LLM/Agent、机器学习系统、浮点程序分析或贝叶斯程序分析,未命中用户当前追踪的核心交叉问题。引用 9 inbox
Sören van der Wall, Roland Meyer
crossref: 2026-09-10

AI 速览

一句话:提出基于新型模拟关系的证明方法,统一保证编译器变换在推测语义下保持非干扰,并修复寄存器分配引入的安全缺陷。

本文研究编译器变换在推测执行语义下保持非干扰(non-interference)的问题。作者提出一种新的模拟关系作为证明方法,它作用于刻画攻击者控制微体系结构状态的指令(directives),并处理变换可能改变微体系结构状态对执行影响的情况。用该方法证明了死代码消除的正确性;在尝试证明寄存器分配时发现一个此前未知的弱点会引入非干扰违规,并在主流编译器的 libsodium 代码上确认。为恢复安全性,作者提出一种在源程序与寄存器分配后程序乘积上运行的静态分析,给出对现有寄存器分配实现的自动修复,并证明修复后的寄存器分配正确。

问题
编译器优化可能在推测执行语义下破坏程序的安全性质(如非干扰),而现有编译正确性证明未覆盖微体系结构状态受攻击者控制的情形。
方法
提出一种新型模拟关系,在攻击者 directive 层面统一证明源程序与变换后程序的非干扰保持;并结合源程序与寄存器分配后程序乘积上的静态分析修复寄存器分配缺陷。
评估
用该方法证明死代码消除正确,在主流编译器与 libsodium 代码上确认寄存器分配弱点,并给出自动修复及正确性证明。
原文摘要(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.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@article{abs-2407-15080,
  title = {SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations},
  author = {Sören van der Wall and Roland Meyer},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {POPL},
  year = {2025},
  doi = {10.1145/3704887}
}