[Paper Review] HybCache: Hybrid Side-Channel-Resilient Caches for Trusted Execution Environments
HybCache proposes a hybrid cache architecture that selectively applies side-channel-resilient cache behavior only to isolated execution domains—such as Intel SGX or ARM TrustZone—while preserving conventional cache performance for non-isolated workloads. By disabling set-associativity and using random replacement in isolated regions, it thwarts content-based and access-based cache side-channel attacks with only 3.5–5% performance overhead for security-critical code.
Modern multi-core processors share cache resources for maximum cache utilization and performance gains. However, this leaves the cache vulnerable to side-channel attacks, where timing differences in shared cache behavior are exploited to infer information on the victim's execution patterns, ultimately leaking private information. The root cause for these attacks is mutually distrusting processes sharing cache entries and accessing them in a deterministic manner. Various defenses against cache side-channel attacks have been proposed. However, they either degrade performance significantly, impose impractical restrictions, or can only defeat certain classes of these attacks. More importantly, they assume that side-channel-resilient caches are required for the entire execution workload and do not allow to selectively enable the mitigation only for the security-critical portion of the workload. We present a generic mechanism for a flexible and soft partitioning of set-associative caches and propose a hybrid cache architecture, called HybCache. HybCache can be configured to selectively apply side-channel-resilient cache behavior only for isolated execution domains, while providing the non-isolated execution with conventional cache behavior, capacity and performance. An isolation domain can include one or more processes, specific portions of code, or a Trusted Execution Environment. We show that, with minimal hardware modifications and kernel support, HybCache can provide side-channel-resilient cache only for isolated execution with a performance overhead of 3.5-5%, while incurring no performance overhead for the remaining execution workload. We provide a simulator-based and hardware implementation of HybCache to evaluate the performance and area overheads, and show how it mitigates typical access-based and contention-based cache attacks.
Motivation & Objective
- Address the growing threat of cache side-channel attacks in shared multi-core processors, especially within trusted execution environments (TEEs) like Intel SGX and ARM TrustZone.
- Overcome the limitations of existing defenses that either degrade performance significantly, impose impractical restrictions, or protect the entire workload regardless of security sensitivity.
- Enable fine-grained, selective protection by isolating only the security-critical portions of code—such as cryptographic operations or sensitive data processing—while leaving the rest of the workload unaffected.
- Provide a hardware-efficient, architecture-agnostic solution that avoids complex coherence protocol changes, cache flushing, or reliance on weak cryptographic functions.
- Achieve practical side-channel resilience without compromising the performance of non-security-critical workloads, thus resolving the performance-security trade-off in cache design.
Proposed method
- Introduce a hybrid cache architecture that combines conventional set-associative caching for non-isolated execution with a randomized, non-associative replacement policy for isolated execution domains.
- Disable set-associativity in isolated regions by allowing any cache line to be placed in any way within a subcache, using random replacement to eliminate predictable access patterns.
- Use a per-domain randomization scheme where the mapping of memory addresses to cache sets is unpredictable and varies per access, preventing adversaries from constructing effective eviction sets.
- Implement the mechanism with minimal hardware modifications and kernel support, ensuring compatibility with existing processor microarchitectures and TEEs.
- Leverage existing isolation boundaries (e.g., SGX enclaves or TrustZone) to define the scope of side-channel protection, enabling soft partitioning without altering the behavior of non-isolated code.
- Ensure no performance degradation for non-isolated workloads by maintaining standard cache behavior and capacity for all non-protected execution.
Experimental results
Research questions
- RQ1Can a hybrid cache architecture selectively apply side-channel-resilient caching only to security-critical code, while preserving full performance for non-critical workloads?
- RQ2How can cache side-channel attacks be effectively mitigated without relying on full cache partitioning or complex cryptographic indexing?
- RQ3What is the performance overhead of applying random replacement and disabling set-associativity only in isolated execution domains?
- RQ4Can the proposed mechanism defend against both access-based (e.g., Prime+Probe) and contention-based (e.g., Flush+Reload) cache side-channel attacks?
- RQ5Is it possible to achieve side-channel resilience with minimal hardware changes and without modifying coherence protocols or the clflush instruction?
Key findings
- HybCache achieves side-channel resilience for isolated execution domains—such as SGX enclaves or TrustZone—by disabling set-associativity and using random replacement, effectively preventing adversaries from constructing reliable eviction sets.
- The performance overhead for isolated execution is limited to 3.5–5% across the SPEC CPU2006 benchmark suite, demonstrating minimal impact on security-critical workloads.
- Non-isolated workloads incur no performance overhead, as they continue to use standard set-associative caching with full capacity and performance.
- The architecture is effective against both access-based attacks (e.g., Prime+Probe) and contention-based attacks (e.g., Flush+Reload), as demonstrated through simulation and hardware evaluation.
- HybCache requires only minimal hardware modifications and no changes to coherence protocols or the clflush instruction, making it practical for integration into existing processor designs.
- The solution is architecture-agnostic and does not rely on weak cryptographic functions or frequent re-keying, unlike prior randomization-based approaches such as Time-Secure Cache or CEASER.
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.