Skip to main content
QUICK REVIEW

[Paper Review] DynSGX: A Privacy Preserving Toolset for Dynamically Loading Functions into Intel(R) SGX Enclaves

Rodolfo Silva, Pedro Barbosa|arXiv (Cornell University)|Oct 31, 2017
Security and Verification in ComputingComputer Science12 references4 citations
TL;DR

DynSGX is a privacy-preserving toolset enabling dynamic loading and unloading of functions into Intel SGX enclaves, overcoming static linking and code visibility limitations. It achieves this by storing dynamically loaded code in the enclave heap, preserving privacy with minimal performance overhead compared to traditional SGX, though recursive functions show significant slowdown due to cache contention.

ABSTRACT

Intel(R) Software Guard eXtensions (SGX) is a hardware-based technology for ensuring security of sensitive data from disclosure or modification that enables user-level applications to allocate protected areas of memory called enclaves. Such memory areas are cryptographically protected even from code running with higher privilege levels. This memory protection can be used to develop secure and dependable applications, but the technology has some limitations: ($i$) the code of an enclave is visible at load time, ($ii$) libraries used by the code must be statically linked, and ($iii$) the protected memory size is limited, demanding page swapping to be done when this limit is exceeded. We present DynSGX, a privacy preserving tool that enables users and developers to dynamically load and unload code to be executed inside SGX enclaves. Such a technology makes possible that developers use public cloud infrastructures to run applications based on sensitive code and data. Moreover, we present a series of experiments that assess how applications dynamically loaded by DynSGX perform in comparison to statically linked applications that disregard privacy of the enclave code at load time.

Motivation & Objective

  • To address Intel SGX's limitation of static code linking and code visibility at load time.
  • To enable developers to load and unload functions into enclaves after enclave creation, improving memory management.
  • To preserve the privacy of enclave code by preventing disclosure through static binaries.
  • To evaluate the performance overhead of dynamic loading in SGX while maintaining security and privacy.
  • To provide a practical solution for deploying sensitive applications in untrusted cloud environments.

Proposed method

  • DynSGX modifies the Intel SGX PSW to allow dynamic loading of code into the enclave heap.
  • It uses a custom loader that maps dynamically loaded functions into the enclave's protected memory space.
  • The toolset supports runtime loading and unloading of functions, enabling on-demand code execution.
  • It leverages Intel SGX's Remote Attestation to ensure code integrity and authenticity.
  • The implementation uses a modified version of the Intel SGX SDK to support heap-based code execution.
  • It integrates with existing SGX programming models while preserving hardware-enforced isolation.

Experimental results

Research questions

  • RQ1Can dynamic loading of functions into SGX enclaves be achieved without compromising code privacy?
  • RQ2What is the performance overhead of dynamically loaded functions compared to statically linked ones?
  • RQ3How does DynSGX handle memory management and cache contention in recursive workloads?
  • RQ4Can the toolset support secure, on-demand code deployment in untrusted cloud environments?
  • RQ5What are the trade-offs between privacy, performance, and scalability in dynamic enclave function loading?

Key findings

  • DynSGX successfully enables dynamic loading and unloading of functions into SGX enclaves with minimal performance overhead compared to static linking.
  • The performance overhead of DynSGX is moderate for iterative algorithms, with a 10-15% increase in execution time over pure SGX.
  • Recursive functions, such as recursive_fibonacci, show a significant performance degradation due to instruction and data cache contention when code resides in the heap.
  • The toolset preserves code privacy by preventing static analysis of enclave binaries, as function code is loaded at runtime.
  • Remote Attestation remains functional, ensuring that the loaded code is authentic and unmodified.
  • SGX2, while supporting dynamic memory management, does not address code privacy, making DynSGX complementary for privacy-sensitive workloads.

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.