A Tale of Two Worlds: Assessing the Vulnerability of Enclave Shielding Runtimes
Jo Van Bulck, David F. Oswald, Eduard Marin, Abdulla Aldoseri, Flavio D. Garcia, Frank Piessens
摘要
This paper analyzes the vulnerability space arising in Trusted Execution Environments (TEEs) when interfacing a trusted enclave application with untrusted, potentially malicious code. Considerable research and industry effort has gone into developing TEE runtime libraries with the purpose of transparently shielding enclave application code from an adversarial environment. However, our analysis reveals that shielding requirements are generally not well-understood in real-world TEE runtime implementations. We expose several sanitization vulnerabilities at the level of the Application Binary Interface (ABI) and the Application Programming Interface (API) that can lead to exploitable memory safety and side-channel vulnerabilities in the compiled enclave. Mitigation of these vulnerabilities is not as simple as ensuring that pointers are outside enclave memory. In fact, we demonstrate that state-of-the-art mitigation techniques such as Intel's edger8r, Microsoft's "deep copy marshalling", or even memory-safe languages like Rust fail to fully eliminate this attack surface. Our analysis reveals 35 enclave interface sanitization vulnerabilities in 8 major open-source shielding frameworks for Intel SGX, RISC-V, and Sancus TEEs. We practically exploit these vulnerabilities in several attack scenarios to leak secret keys from the enclave or enable remote code reuse. We have responsibly disclosed our findings, leading to 5 designated CVE records and numerous security patches in the vulnerable open-source projects, including the Intel SGX-SDK, Microsoft Open Enclave, Google Asylo, and the Rust compiler.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 42 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- SmashEx: Smashing SGX Enclaves Using Exceptions 引用了 Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
- SmashEx: Smashing SGX Enclaves Using Exceptions 引用了 Panoply: Low-TCB Linux Applications With SGX Enclaves
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection 引用了 Plundervolt: Software-based Fault Injection Attacks against Intel SGX
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection 引用了 Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- HECKLER: Breaking Confidential VMs with Malicious Interrupts 引用了 WeSee: Using Malicious #VC Interrupts to Break AMD SEV-SNP
- WeSee: Using Malicious #VC Interrupts to Break AMD SEV-SNP 引用了 HECKLER: Breaking Confidential VMs with Malicious Interrupts
- HECKLER: Breaking Confidential VMs with Malicious Interrupts 引用了 Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
- Plundervolt: Software-based Fault Injection Attacks against Intel SGX 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- Plundervolt: Software-based Fault Injection Attacks against Intel SGX 引用了 Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
- Plundervolt: Software-based Fault Injection Attacks against Intel SGX 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution 引用了 Panoply: Low-TCB Linux Applications With SGX Enclaves
- Panoply: Low-TCB Linux Applications With SGX Enclaves 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution 引用了 Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution 引用了 Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
引用它的顶会 Paper42
- Plundervolt: Software-based Fault Injection Attacks against Intel SGXKit Murdock, David F. Oswald, Flavio D. Garcia, Jo Van Bulck 等S&P 2020 · 369 次引用
- LVI: Hijacking Transient Execution through Microarchitectural Load Value InjectionJo Van Bulck, Daniel Moghimi, Michael Schwarz, Moritz Lipp 等S&P 2020 · 275 次引用
- HECKLER: Breaking Confidential VMs with Malicious InterruptsBenedict Schlüter, Supraja Sridhara, Mark Kuhne, Andrin Bertschi 等USENIX Security 2024 · 48 次引用
- WeSee: Using Malicious #VC Interrupts to Break AMD SEV-SNPBenedict Schlüter, Supraja Sridhara, Andrin Bertschi, Shweta ShindeS&P 2024 · 42 次引用
- SmashEx: Smashing SGX Enclaves Using ExceptionsJinhua Cui, Jason Zhijingcheng Yu, Shweta Shinde, Prateek Saxena 等CCS 2021 · 32 次引用
它引用的 Paper12
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order ExecutionJo Van Bulck, Marina Minkin, Ofir Weisse, Daniel Genkin 等USENIX Security 2018 · 1,175 次引用
- Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch ShadowingSangho Lee, Ming-Wei Shih, Prasun Gera, Taesoo Kim 等USENIX Security 2017 · 536 次引用
- ARMageddon: Cache Attacks on Mobile DevicesMoritz Lipp, Daniel Gruss, Raphael Spreitzer, Clémentine Maurice 等USENIX Security 2016 · 451 次引用
- Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved ExecutionJo Van Bulck, Nico Weichbrodt, Rüdiger Kapitza, Frank Piessens 等USENIX Security 2017 · 316 次引用
- Panoply: Low-TCB Linux Applications With SGX EnclavesShweta Shinde, Dat Le Tien, Shruti Tople, Prateek SaxenaNDSS 2017 · 274 次引用
相关 Paper
- Towards Memory Safe Enclave Programming with Rust-SGXHuibo Wang, Pei Wang, Yu Ding, Mingshen Sun 等CCS 2019 · 86 次引用
- TeeRex: Discovery and Exploitation of Memory Corruption Vulnerabilities in SGX EnclavesTobias Cloosters, Michael Rodler, Lucas DaviUSENIX Security 2020
- EnclaveFuzz: Finding Vulnerabilities in SGX ApplicationsLiheng Chen, Zheming Li, Zheyu Ma, Yuan Li 等NDSS 2024
- On (the Lack of) Code Confidentiality in Trusted Execution EnvironmentsIvan Puddu, Moritz Schneider, Daniele Lain, Stefano Boschetto 等S&P 2024 · 14 次引用
- Hacking in Darkness: Return-oriented Programming against Secure EnclavesJae-Hyuk Lee, Jin Soo Jang, Yeongjin Jang, Nohyun Kwak 等USENIX Security 2017 · 191 次引用
