TEE Shared Library Memory Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current implementations of trusted execution environments (TEEs) inefficiently handle shared libraries by loading separate copies for each application, leading to redundancies and inefficiencies, as they contradict the concept of shared libraries.
Innovation Solution
A mechanism is introduced to securely share libraries within a TEE by providing a shared library memory region with a metadata table that manages shared libraries and reference counting, allowing multiple applications to access the same libraries while ensuring security and reducing redundancy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If separate copies of shared libraries are loaded for each application in TEE, then security isolation is maintained, but memory efficiency and system performance deteriorate due to redundancy
Solution Approach 1:
The patent segments the library loading mechanism into two distinct parts: (1) a shared library region in the untrusted memory space where a single copy of the library is loaded, and (2) individual application processes in the trusted TEE space that reference the shared library. This segmentation allows the library code to be physically shared while maintaining logical isolation through the LibOS layer, thus resolving the contradiction between security isolation and memory efficiency.
Solution Approach 2:
The patent introduces LibOS (Library Operating System) as an intermediary layer between the trusted application code and the untrusted shared library. LibOS provides the mapping and access control mechanisms that allow applications in the TEE to securely reference and execute code from the untrusted shared library region. This intermediary enables memory sharing while preserving security boundaries, as LibOS manages the interface between trusted and untrusted regions.
2Reliability
If separate copies of shared libraries are loaded for each application in TEE, then security is maintained, but system performance and resource utilization worsen due to loading the same code multiple times
Solution Approach 1:
The patent merges the shared library execution into a single instance in the untrusted memory region, while multiple trusted applications simultaneously reference and execute the same library code through controlled access via LibOS. This merging eliminates redundant code loading and execution, improving system performance and resource utilization while maintaining security through the intermediary access control mechanism.
Solution Approach 2:
The shared library region in untrusted space serves multiple functions: it stores the library code, provides execution environment for shared code, and acts as a common resource for multiple applications. The LibOS layer provides universal access control that allows any trusted application to reference the shared library, making the system more efficient without compromising security.
3Quantity of substance
If the same shared library is shared across multiple applications in TEE, then memory efficiency improves, but security control and access management become more complex
Solution Approach 1:
The patent uses LibOS as an intermediary that abstracts and simplifies the complex access management requirements. Instead of implementing complex access control logic in each application or in the TEE hardware, LibOS provides a standardized interface that manages library loading, mapping, and access permissions. This intermediary layer handles the complexity of sharing management, making it transparent to applications while maintaining security.
Solution Approach 2:
The system implements self-service mechanisms where the shared library region automatically manages its own memory space, and applications automatically gain access through the established LibOS interface. The reference counting mechanism automatically tracks usage and manages library lifecycle, reducing the need for complex manual access management while maintaining memory efficiency.
Data Source
AI summary
An apparatus comprising a memory comprising a protected memory region and a processor comprising a trusted execution environment (TEE) to load a library in a shared library region within the protected memory region and execute a plurality of applications to share access to the library in the shared library region.


