Lune

CCS2019Top-tier venue

Towards Memory Safe Enclave Programming with Rust-SGX

Huibo Wang, Pei Wang, Yu Ding, Mingshen Sun, Yiming Jing, Ran Duan, Long Li, Yulong Zhang, Tao Wei, Zhiqiang Lin

Abstract

Intel Software Guard eXtension (SGX), a hardware supported trusted execution environment (TEE), is designed to protect security critical applications. However, it does not terminate traditional memory corruption vulnerabilities for the software running inside enclave, since enclave software is still developed with type unsafe languages such as C/C++. This paper presents Rust-SGX, an efficient and layered approach to exterminating memory corruption for software running inside SGX enclaves. The key idea is to enable the development of enclave programs with an efficient memory safe system language Rust with a Rust-SGX SDK by solving the key challenges of how to (1) make the SGX software memory safe and (2) meanwhile run as efficiently as with the SDK provided by Intel. We therefore propose to build Rust-SGX atop Intel SGX SDK, and tame unsafe components with formally proven memory safety. We have implemented Rust-SGX and tested with a series of benchmark programs. Our evaluation results show that Rust-SGX imposes little extra overhead (less than 5% with respect to the SGX specific features and services compared to software developed by Intel SGX SDK), and meanwhile have stronger memory safety.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

24 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SmashEx: Smashing SGX Enclaves Using Exceptions cites Hacking in Darkness: Return-oriented Programming against Secure Enclaves
  • SmashEx: Smashing SGX Enclaves Using Exceptions cites SGX-Shield: Enabling Address Space Layout Randomization for SGX Programs
  • SmashEx: Smashing SGX Enclaves Using Exceptions cites Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
  • SmashEx: Smashing SGX Enclaves Using Exceptions cites Panoply: Low-TCB Linux Applications With SGX Enclaves
  • SmashEx: Smashing SGX Enclaves Using Exceptions cites The Guard's Dilemma: Efficient Code-Reuse Attacks Against Intel SGX
  • SoK: SGX.Fail: How Stuff Gets eXposed cites Hacking in Darkness: Return-oriented Programming against Secure Enclaves
  • SoK: SGX.Fail: How Stuff Gets eXposed cites SmashEx: Smashing SGX Enclaves Using Exceptions
  • SoK: SGX.Fail: How Stuff Gets eXposed cites SGX-Shield: Enabling Address Space Layout Randomization for SGX Programs
  • SoK: SGX.Fail: How Stuff Gets eXposed cites The Guard's Dilemma: Efficient Code-Reuse Attacks Against Intel SGX
  • The Guard's Dilemma: Efficient Code-Reuse Attacks Against Intel SGX cites Hacking in Darkness: Return-oriented Programming against Secure Enclaves
  • The Guard's Dilemma: Efficient Code-Reuse Attacks Against Intel SGX cites SGX-Shield: Enabling Address Space Layout Randomization for SGX Programs
  • Occlum: Secure and Efficient Multitasking Inside a Single Enclave of Intel SGX cites Panoply: Low-TCB Linux Applications With SGX Enclaves
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers24

  1. Occlum: Secure and Efficient Multitasking Inside a Single Enclave of Intel SGXYouren Shen, Hongliang Tian, Yu Chen, Kang Chen et al.ASPLOS 2020 · 144 citations
  2. Twine: An Embedded Trusted Runtime for WebAssemblyJämes Ménétrey, Marcelo Pasin, Pascal Felber, Valerio SchiavoniICDE 2021 · 58 citations
  3. SoK: SGX.Fail: How Stuff Gets eXposedStephan van Schaik, Alexander Seto, Thomas Yurek, Adam Batori et al.S&P 2024 · 52 citations
  4. SmashEx: Smashing SGX Enclaves Using ExceptionsJinhua Cui, Jason Zhijingcheng Yu, Shweta Shinde, Prateek Saxena et al.CCS 2021 · 32 citations
  5. vSGX: Virtualizing SGX Enclaves on AMD SEVShixuan Zhao, Mengyuan Li, Yinqian Zhang, Zhiqiang LinS&P 2022 · 32 citations

Builds on5

  1. Data-Oriented Programming: On the Expressiveness of Non-control Data AttacksHong Hu, Shweta Shinde, Sendroiu Adrian, Zheng Leong Chua et al.S&P 2016 · 420 citations
  2. Panoply: Low-TCB Linux Applications With SGX EnclavesShweta Shinde, Dat Le Tien, Shruti Tople, Prateek SaxenaNDSS 2017 · 274 citations
  3. SGX-Shield: Enabling Address Space Layout Randomization for SGX ProgramsJaebaek Seo, Byoungyoung Lee, Seong-Min Kim, Ming-Wei Shih et al.NDSS 2017 · 227 citations
  4. Hacking in Darkness: Return-oriented Programming against Secure EnclavesJae-Hyuk Lee, Jin Soo Jang, Yeongjin Jang, Nohyun Kwak et al.USENIX Security 2017 · 191 citations
  5. The Guard's Dilemma: Efficient Code-Reuse Attacks Against Intel SGXAndrea Biondo, Mauro Conti, Lucas Davi, Tommaso Frassetto et al.USENIX Security 2018 · 126 citations

Related papers

  1. TeeRex: Discovery and Exploitation of Memory Corruption Vulnerabilities in SGX EnclavesTobias Cloosters, Michael Rodler, Lucas DaviUSENIX Security 2020
  2. T-SGX: Eradicating Controlled-Channel Attacks Against Enclave ProgramsMing-Wei Shih, Sangho Lee, Taesoo Kim, Marcus PeinadoNDSS 2017 · 431 citations
  3. A Tale of Two Worlds: Assessing the Vulnerability of Enclave Shielding RuntimesJo Van Bulck, David F. Oswald, Eduard Marin, Abdulla Aldoseri et al.CCS 2019 · 159 citations
  4. SGXFuzz: Efficiently Synthesizing Nested Structures for SGX Enclave FuzzingTobias Cloosters, Johannes Willbold, Thorsten Holz, Lucas DaviUSENIX Security 2022
  5. COIN Attacks: On Insecurity of Enclave Untrusted Interfaces in SGXMustakimur Rahman Khandaker, Yueqiang Cheng, Zhi Wang, Tao WeiASPLOS 2020 · 46 citations
Dusk over the sea between two cliffs drawn in fine vertical lines