[Paper Review] SGX-LKL: Securing the Host OS Interface for Trusted Execution
SGX-LKL runs unmodified Linux binaries inside SGX enclaves and exposes a minimal, encrypted, and oblivious host interface with a complete in-enclave library OS to protect I/O from the untrusted host.
Hardware support for trusted execution in modern CPUs enables tenants to shield their data processing workloads in otherwise untrusted cloud environments. Runtime systems for the trusted execution must rely on an interface to the untrusted host OS to use external resources such as storage, network, and other functions. Attackers may exploit this interface to leak data or corrupt the computation. We describe SGX-LKL, a system for running Linux binaries inside of Intel SGX enclaves that only exposes a minimal, protected and oblivious host interface: the interface is (i) minimal because SGX-LKL uses a complete library OS inside the enclave, including file system and network stacks, which requires a host interface with only 7 calls; (ii) protected because SGX-LKL transparently encrypts and integrity-protects all data passed via low-level I/O operations; and (iii) oblivious because SGX-LKL performs host operations independently of the application workload. For oblivious disk I/O, SGX-LKL uses an encrypted ext4 file system with shuffled disk blocks. We show that SGX-LKL protects TensorFlow training with a 21% overhead.
Motivation & Objective
- Motivate secure host interfaces for TEEs in cloud settings where the host OS is untrusted.
- Propose a minimal, protected, and oblivious host interface for SGX-enabled runtimes.
- Demonstrate that running unmodified Linux binaries inside enclaves is feasible with acceptable overhead.
- Provide in-enclave OS functionality to support POSIX-like applications without leaking sensitive host metadata.
Proposed method
- Define a minimal host interface consisting of 7 I/O and control calls for storage and networking.
- Implement in-enclave OS functionality via a complete Linux library OS (LKL) to support POSIX apps inside the enclave.
- Protect the host interface by encrypting and integrity-protecting all crossing data.
- Provide obliviousness by batching host calls and using dummy calls to hide workload patterns.
- Use dm-crypt/dm-verity/dm-integrity via the Linux device mapper to protect disk I/O.
- Use a WireGuard-based VPN for in-enclave network traffic and a virtual network device for packet processing.
- Implement attestation and provisioning to verify enclave integrity and distribute secrets.
Experimental results
Research questions
- RQ1How can a host interface for TEEs be minimized to reduce information leaks and attack surface while still enabling unmodified Linux binaries to run inside enclaves?
- RQ2Can in-enclave OS components and a minimal host interface provide POSIX compatibility without exposing sensitive metadata to the host?
- RQ3What performance overheads arise when protecting disk and network I/O in SGX-LKL, and how do they compare in single-machine versus distributed deployments?
- RQ4How can secure attestation and provisioning be integrated to establish trust and keys for encrypted disk images and VPN channels?
Key findings
- SGX-LKL uses a 7-call host interface for disk and network I/O, events, and time.
- Disk I/O is protected via a mapped ext4 root image with dm-crypt/dm-verity/dm-integrity, enabling configurable confidentiality and integrity.
- Network I/O is protected by a WireGuard-based VPN, providing layer-3 encryption for all enclave traffic.
- In-enclave library OS (via LKL) supplies POSIX functionality, including filesystem, networking, threading, memory management, signals, and time.
- Experimental results show 14–21% overhead for TensorFlow training in emulated SGX enclaves, and 2.7×–2.9× overhead in distributed deployments; PARSEC benchmarks show 3.1× overhead with oblivious calls and 1.5× without.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.