Skip to main content
QUICK REVIEW

[Paper Review] EnclaveDom: Privilege Separation for Large-TCB Applications in Trusted Execution Environments

Marcela S. Melara, Michael J. Freedman|arXiv (Cornell University)|Jul 30, 2019
Security and Verification in ComputingComputer Science39 references9 citations
TL;DR

EnclaveDom is a hardware-assisted privilege separation system for large-TCB applications in Intel SGX trusted execution environments, using Memory Protection Keys (MPK) to partition enclaves into tagged memory regions and enforce fine-grained access control at the function level. It protects sensitive internal data structures in library OSes from tampering by untrusted application code, with minimal performance and memory overhead in prototype evaluation on Graphene-SGX.

ABSTRACT

Trusted executions environments (TEEs) such as Intel(R) SGX provide hardware-isolated execution areas in memory, called enclaves. By running only the most trusted application components in the enclave, TEEs enable developers to minimize the TCB of their applications thereby helping to protect sensitive application data. However, porting existing applications to TEEs often requires considerable refactoring efforts, as TEEs provide a restricted interface to standard OS features. To ease development efforts, TEE application developers often choose to run their unmodified application in a library OS container that provides a full in-enclave OS interface. Yet, this large-TCB development approach now leaves sensitive in-enclave data exposed to potential bugs or vulnerabilities in third-party code imported into the application. Importantly, because the TEE libOS and the application run in the same enclave address space, even the libOS management data structures (e.g. file descriptor table) may be vulnerable to attack, where in traditional OSes these data structures may be protected via privilege isolation. We present EnclaveDom, a privilege separation system for large-TCB TEE applications that partitions an enclave into tagged memory regions, and enforces per-region access rules at the granularity of individual in-enclave functions. EnclaveDom is implemented on Intel SGX using Memory Protection Keys (MPK) for memory tagging. To evaluate the security and performance impact of EnclaveDom, we integrated EnclaveDom with the Graphene-SGX library OS. While no product or component can be absolutely secure, our prototype helps protect internal libOS management data structures against tampering by application-level code. At every libOS system call, EnclaveDom then only grants access to those internal data structures which the syscall needs to perform its task.

Motivation & Objective

  • To address the security risk posed by large-TCB applications in TEEs, where untrusted third-party code can access and corrupt sensitive internal data structures in the library OS.
  • To provide fine-grained privilege separation within a single enclave, avoiding the complexity of multi-enclave architectures.
  • To protect sensitive in-enclave data structures—such as file descriptor tables—against tampering by application-level code.
  • To enable least-privilege access control at the granularity of individual in-enclave functions, improving security without sacrificing performance.
  • To integrate seamlessly with existing TEE application development models, particularly containerized library OSes like Graphene-SGX.

Proposed method

  • Using Intel SGX's Memory Protection Keys (MPK) to tag memory regions within a single enclave, enabling hardware-enforced access control.
  • Partitioning the enclave into multiple memory domains, each associated with a specific privilege level or access policy.
  • Enforcing access rules at the function level, so each system call only gains access to the minimal set of internal data structures it requires.
  • Integrating the system as a userspace API that developers can use to annotate and protect sensitive data objects and internal libOS structures.
  • Evaluating the prototype by integrating EnclaveDom into the Graphene-SGX library OS to demonstrate security and performance trade-offs.
  • Leveraging existing hardware support for memory protection to avoid the performance costs of virtualization or process-based isolation.

Experimental results

Research questions

  • RQ1Can hardware-assisted memory tagging via MPK be effectively used to enforce privilege separation within a single Intel SGX enclave?
  • RQ2Can EnclaveDom protect sensitive internal data structures in a library OS from tampering by untrusted application code?
  • RQ3Does EnclaveDom impose acceptable performance and memory overhead when integrated into a real-world TEE library OS like Graphene-SGX?
  • RQ4Can EnclaveDom provide fine-grained access control at the function level without requiring application refactoring into multiple processes?
  • RQ5How does EnclaveDom compare to existing approaches in protecting TEEs against supply chain attacks involving untrusted third-party libraries?

Key findings

  • EnclaveDom successfully isolates sensitive internal data structures in the Graphene-SGX library OS from untrusted application code, preventing unauthorized access and tampering.
  • The prototype imposes only modest performance and memory overheads, making it practical for real-world deployment in large-TCB TEE applications.
  • By enforcing least-privilege access at the function level, EnclaveDom ensures that each system call only accesses the minimal set of data structures required for its operation.
  • The use of MPK enables efficient, hardware-supported memory protection without requiring virtualization or process isolation.
  • EnclaveDom provides a viable alternative to multi-enclave architectures, reducing development complexity while improving security.
  • Evaluation confirms that EnclaveDom protects libOS management data structures—such as file descriptor tables—from corruption by malicious or vulnerable third-party code.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.