Swivel: Hardening WebAssembly against Spectre
Shravan Narayan, Craig Disselkoen, Daniel Moghimi, Sunjay Cauligi, Evan Johnson, Zhao Gang, Anjo Vahldiek-Oberwagner, Ravi Sahita, Hovav Shacham, Dean M. Tullsen, Deian Stefan
摘要
We describe Swivel, a new compiler framework for hardening WebAssembly (Wasm) against Spectre attacks. Outside the browser, Wasm has become a popular lightweight, in-process sandbox and is, for example, used in production to isolate different clients on edge clouds and function-as-a-service platforms. Unfortunately, Spectre attacks can bypass Wasm's isolation guarantees. Swivel hardens Wasm against this class of attacks by ensuring that potentially malicious code can neither use Spectre attacks to break out of the Wasm sandbox nor coerce victim code-another Wasm client or the embedding process-to leak secret data. We describe two Swivel designs, a software-only approach that can be used on existing CPUs, and a hardware-assisted approach that uses extension available in Intel 11th generation CPUs. For both, we evaluate a randomized approach that mitigates Spectre and a deterministic approach that eliminates Spectre altogether. Our randomized implementations impose under 10.3% overhead on the Wasm-compatible subset of SPEC 2006, while our deterministic implementations impose overheads between 3.3% and 240.2%. Though high on some benchmarks, Swivel's overhead is still between 9x and 36.3x smaller than existing defenses that rely on pipeline fences.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 34 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Spectre Attacks: Exploiting Speculative Execution 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- DynPTA: Combining Static and Dynamic Analysis for Practical Selective Data Protection 引用了 Spectre Attacks: Exploiting Speculative Execution
- DynPTA: Combining Static and Dynamic Analysis for Practical Selective Data Protection 引用了 Meltdown: Reading Kernel Memory from User Space
- DynPTA: Combining Static and Dynamic Analysis for Practical Selective Data Protection 引用了 A Systematic Evaluation of Transient Execution Attacks and Defenses
- An Analysis of Speculative Type Confusion Vulnerabilities in the Wild 引用了 Spectre Attacks: Exploiting Speculative Execution
- An Analysis of Speculative Type Confusion Vulnerabilities in the Wild 引用了 ZombieLoad: Cross-Privilege-Boundary Data Sampling
- An Analysis of Speculative Type Confusion Vulnerabilities in the Wild 引用了 Meltdown: Reading Kernel Memory from User Space
- ZombieLoad: Cross-Privilege-Boundary Data Sampling 引用了 Spectre Attacks: Exploiting Speculative Execution
- ZombieLoad: Cross-Privilege-Boundary Data Sampling 引用了 A Systematic Evaluation of Transient Execution Attacks and Defenses
- Meltdown: Reading Kernel Memory from User Space 引用了 Spectre Attacks: Exploiting Speculative Execution
- A Systematic Evaluation of Transient Execution Attacks and Defenses 引用了 Spectre Attacks: Exploiting Speculative Execution
- SoK: Practical Foundations for Software Spectre Defenses 引用了 Spectre Attacks: Exploiting Speculative Execution
- SoK: Practical Foundations for Software Spectre Defenses 引用了 An Analysis of Speculative Type Confusion Vulnerabilities in the Wild
- SoK: Practical Foundations for Software Spectre Defenses 引用了 ZombieLoad: Cross-Privilege-Boundary Data Sampling
- SoK: Practical Foundations for Software Spectre Defenses 引用了 Meltdown: Reading Kernel Memory from User Space
- SoK: Practical Foundations for Software Spectre Defenses 引用了 A Systematic Evaluation of Transient Execution Attacks and Defenses
引用它的顶会 Paper34
- SoK: Practical Foundations for Software Spectre DefensesSunjay Cauligi, Craig Disselkoen, Daniel Moghimi, Gilles Barthe 等S&P 2022 · 59 次引用
- DynPTA: Combining Static and Dynamic Analysis for Practical Selective Data ProtectionTapti Palit, Jarin Firose Moon, Fabian Monrose, Michalis PolychronakisS&P 2021 · 48 次引用
- An Empirical Study of Bugs in WebAssembly CompilersAlan Romano, Xinyue Liu, Yonghwi Kwon, Weihang WangASE 2021 · 43 次引用
- An Analysis of Speculative Type Confusion Vulnerabilities in the WildOfek Kirzner, Adam MorrisonUSENIX Security 2021 · 40 次引用
- Finding the dwarf: recovering precise types from WebAssembly binariesDaniel Lehmann, Michael PradelPLDI 2022 · 29 次引用
它引用的 Paper23
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
- Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher 等USENIX Security 2018 · 1,456 次引用
- Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch ShadowingSangho Lee, Ming-Wei Shih, Prasun Gera, Taesoo Kim 等USENIX Security 2017 · 536 次引用
- ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck 等CCS 2019 · 464 次引用
- A Systematic Evaluation of Transient Execution Attacks and DefensesClaudio Canella, Jo Van Bulck, Michael Schwarz, Moritz Lipp 等USENIX Security 2019 · 442 次引用
相关 Paper
- HoBBy: Hardening Unbalanced Branches against Control Flow Attacks on Intel SGX and AMD SEVChang Liu, Shuaihu Feng, Yuan Li, Dongsheng Wang 等DAC 2025 · 2 次引用
- Scaling Instruction-Selection Verification against Authoritative ISA SemanticsMichael McLoughlin, Ashley Sheng, Chris Fallin, Bryan Parno 等OOPSLA 2025
- WaSCR: A WebAssembly Instruction-Timing Side Channel RepairerLiyan Huang, Junzhou He, Chao Wang, Weihang WangWWW 2025 · 3 次引用
- Going beyond the Limits of SFI: Flexible and Secure Hardware-Assisted In-Process Isolation with HFIShravan Narayan, Tal Garfinkel, Mohammadkazem Taram, Joey Rudek 等ASPLOS 2023 · 27 次引用
- When Does Wasm Malware Detection Fail? A Systematic Analysis of Their Robustness to EvasionTaeyoung Kim, Sanghak Oh, Kiho Lee, Weihang Wang 等ASE 2025
