TL;DR
Sanctorum introduces a minimal, formally verified security monitor (SM) that enables secure enclaves on in-order multiprocessor systems. It achieves this by enforcing strict isolation of machine resources, preventing even privileged software from compromising enclave confidentiality and integrity, and enabling robust attestation of enclave state.
What Problem Does This Paper Address?
The paper tackles the challenge of building secure enclaves, which are isolated environments designed to protect sensitive computations from a potentially malicious operating system or other software. While existing solutions like Intel SGX offer strong guarantees, they often rely on complex, undocumented hardware or microcode, making them difficult to inspect and verify. The authors aim to provide a more transparent and verifiable approach by using a small, trusted software component (the Security Monitor, or SM) that leverages hardware primitives to enforce enclave isolation. This approach allows for greater flexibility in hardware evolution and a smaller, more manageable trusted computing base (TCB).
Methods
Sanctorum's core innovation lies in its lightweight Security Monitor (SM). This SM acts as a privileged piece of software that sits between the untrusted OS and the enclaves. It doesn't manage resources directly but rather enforces policies on how the OS allocates and uses them. Key techniques include:
- Partitioned Caches and State Flushing: Sanctorum utilizes partitioned caches and ensures that shared state is flushed during context switches to prevent side-channel attacks (e.g., cache timing attacks).
- Formal Verification Foundation: While Sanctorum itself isn't fully formally verified, its design is based on a formally verified specification for enclaves, lending it a strong theoretical grounding.
- Attestation Mechanism: Sanctorum provides a robust attestation mechanism, allowing enclaves to prove their initial state and identity to local or remote parties. This involves cryptographic measurements of the enclave's initial configuration and code.
- API for Resource Management: The SM exposes a narrow API that enclaves and the OS use to request and manage resources. This API is designed to prevent malicious actions and ensure that resource allocations respect protection domain boundaries.
- Hardware Requirements: Sanctorum relies on specific hardware capabilities, including memory isolation, isolated computation across protection domains, exclusive elevated privilege for the SM, and cryptographic support for attestation.
Datasets
Not discussed in the paper.
Key Insights and Ideas
- Minimal TCB is Achievable: The paper demonstrates that a highly secure enclave system can be built with a surprisingly small trusted software component (the SM), shifting much of the security burden to well-defined hardware primitives.
- Software-Defined Isolation Enforcement: Sanctorum highlights the power of a privileged software monitor to enforce low-level hardware isolation policies, offering a flexible alternative to purely hardware-based solutions.
- Side-Channel Defense through Resource Management: The SM's approach to managing shared resources, particularly caches and TLBs, is crucial for mitigating a wide range of side-channel attacks that exploit data-dependent access patterns.
- Attestation as a Foundation for Trust: The robust attestation mechanism is presented as a critical component for establishing trust in enclaves, enabling secure remote execution and verification.
Key Results
The paper describes the Sanctorum system and its implementation on the MIT Sanctum processor and the Keystone enclave framework. While specific quantitative performance results are not the primary focus, the paper emphasizes the security guarantees provided:
- Confidentiality and Integrity: Sanctorum ensures that enclaves maintain their confidentiality and integrity against a privileged software adversary.
- Mitigation of Side Channels: The system is designed to prevent common side-channel attacks, including those exploiting cache timing and demand paging.
- Lightweight TCB: The Sanctorum SM is described as minimal, with the MIT Sanctum implementation being around 1011 lines of C99 code for the platform-independent SM code.
Limitations and Future Work
- Hardware Dependency: Sanctorum's effectiveness is tied to the underlying hardware's ability to provide the specified isolation primitives. The threat model and guarantees can vary based on the hardware platform.
- Speculative Execution: The paper acknowledges that Sanctorum, as described, does not explicitly defend against all forms of speculative execution attacks (like Spectre). However, it notes that the framework can be expanded to include proposed defenses against such attacks.
- Formal Verification of SM: While the design is based on formal specifications, the SM itself is not fully formally verified. This is a potential area for future work to further strengthen the TCB.
- Dynamic Resource Management: The paper touches upon dynamic behaviors like demand paging, suggesting that further exploration of how enclaves can collaborate with the OS for dynamic resource management is a promising direction.
Summary updated