paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Do You Even Lift? Strengthening Compiler Security Guarantees against Spectre Attacks

Do You Even Lift? 强化编译器针对 Spectre 攻击的安全保证
POPL 9(POPL)2025匹配度 2/10 · 该论文属于程序语言与编译器安全、形式化验证方向,关注 Spectre 防御的安全编译证明提升,但未涉及用户核心关注的 LLM/Agent 与静态分析结合、浮点程序分析或贝叶斯程序分析。它与形式化验证和编译器安全有弱关联,但不在当前研究画像的主线方向内。引用 8 inbox
Xaver Fabian, Marco Patrignani, Marco Guarnieri, Michael Backes
crossref: 2026-09-10

AI 速览

一句话:提出安全编译 lifting 框架,将 Spectre 防御的安全保证从弱推测语义提升到强推测语义,无需新证明。

主流编译器的 Spectre 防御常缺乏形式化保证,或仅在忽略部分推测机制的弱推测语义下得到证明。理想的安全证明应覆盖现代 CPU 全部推测机制,但这需要为新增机制重做安全编译证明。本文提出安全编译 lifting 框架,可将防御的安全保证从弱推测语义提升到强推测语义,而无需新的证明。基于该框架,作者分析了主流编译器的 9 种 Spectre 防御与 5 类攻击,并在考虑 5 种推测机制的语义下证明其安全性。结果显示,fence 与 retpoline 类防御可安全提升至所研究的最强语义,而 speculative load hardening 类防御无法提升到支持间接跳转推测的语义。

问题
主流编译器的 Spectre 防御缺少形式化保证,或仅在忽略若干推测机制的弱推测语义下被证明安全,难以覆盖现代 CPU 的全部推测行为。
方法
提出安全编译 lifting 框架,将防御的安全保证从弱推测语义提升到强推测语义,避免为新增推测机制重新进行安全编译证明。
评估
对主流编译器中的 9 种 Spectre 防御和 5 类攻击进行形式化安全分析,并在涵盖 5 种推测机制的推测语义下验证其可提升性。
原文摘要(Abstract)

Mainstream compilers implement different countermeasures to prevent specific classes of speculative execution attacks. Unfortunately, these countermeasures either lack formal guarantees or come with proofs restricted to speculative semantics capturing only a subset of the speculation mechanisms supported by modern CPUs, thereby limiting their practical applicability. Ideally, these security proofs should target a speculative semantics capturing the effects of all speculation mechanisms implemented in modern CPUs. However, this is impractical and requires new secure compilation proofs to support additional speculation mechanisms. In this paper, we address this problem by proposing a novel secure compilation framework that allows lifting the security guarantees provided by Spectre countermeasures from weaker speculative semantics (ignoring some speculation mechanisms) to stronger ones (accounting for the omitted mechanisms) without requiring new secure compilation proofs. Using our lifting framework, we performed the most comprehensive security analysis of Spectre countermeasures implemented in mainstream compilers to date. Our analysis spans 9 different countermeasures against 5 classes of Spectre attacks, which we proved secure against a speculative semantics accounting for 5 different speculation mechanisms. Our analysis highlights that fence-based and retpoline-based countermeasures can be securely lifted to the strongest speculative semantics under study. In contrast, countermeasures based on speculative load hardening cannot be securely lifted to semantics supporting indirect jump speculation.

链接与引用

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

BibTeX
@article{FabianPGB25,
  title = {Do You Even Lift? Strengthening Compiler Security Guarantees against Spectre Attacks},
  author = {Xaver Fabian and Marco Patrignani and Marco Guarnieri and Michael Backes},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {POPL},
  year = {2025},
  doi = {10.1145/3704867}
}