Cache Scrambling Keys for VM Side-Channel Mitigation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Virtualization systems face side-channel attacks due to shared cache resources, where an attacker VM can exploit the cache access patterns of a victim VM to extract confidential information, such as encryption keys, leading to potential information leakage and compromised isolation between virtual machines.
Innovation Solution
Implementing hardware-assisted obscuring of cache access patterns through Enclave Cache Scrambling Keys (ECSKs) and scrambling functions, which modify cache mappings to make cache line placement unpredictable between virtual machines, thereby preventing attackers from monitoring cache usage and establishing covert communication channels.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a shared last level cache (LLC) is employed among multiple guest virtual machines (VMs) on a host, then resource utilization efficiency is improved, but information leakage between VMs occurs through side-channel attacks
Solution Approach 1:
The shared last level cache is segmented into multiple isolated cache partitions, each assigned to a specific guest VM. This segmentation prevents one VM from accessing another VM's cache data while maintaining efficient cache utilization within each partition. The cache is divided into separate ways or sets that are exclusively accessible by designated VMs, eliminating the side-channel attack vector while preserving resource efficiency benefits.
Solution Approach 2:
A cache management intermediary layer is introduced between the guest VMs and the physical cache hardware. This intermediary (implemented through modified cache control logic or software) translates VM cache requests into partition-specific physical addresses, ensuring that each VM accesses only its designated cache partition. This mediator prevents direct access to shared cache resources that would enable side-channel attacks while maintaining the appearance of a shared cache to the VMs.
2Object-affected harmful factors
If cache partitions are made small to enhance security isolation, then information leakage is reduced, but cache hit rate decreases due to insufficient capacity
Solution Approach 1:
The cache partition boundaries are made dynamic rather than static. Cache partitions can be dynamically allocated, expanded, or contracted based on the actual memory access patterns and working set sizes of each guest VM. This dynamic adjustment allows the system to provide sufficient cache capacity to each VM for maintaining high hit rates while ensuring that partitions remain isolated for security. The partitioning strategy adapts to workload characteristics to balance security and performance.
Solution Approach 2:
Cache partitions are organized in a nested hierarchical structure where smaller secure partitions are nested within the larger shared cache framework. Each VM receives a guaranteed minimum partition size for security isolation, while additional cache capacity can be nested or allocated based on demand. This nested structure allows small secure partitions to coexist with overall large cache capacity, maintaining both security isolation and high cache hit rates through multi-level cache organization.
Data Source
AI summary
A computer system and associated methods are disclosed for mitigating side-channel attacks using a shared cache. The computer system includes a host having a main memory and a shared cache. The host executes a virtual machine manager (VMM) that determines respective security keys for a plurality of co-located virtual machines (VMs). A cache controller for the shared cache includes a scrambling function that scrambles addresses of memory accesses performed by threads of the VMs according to the respective security keys. Different cache tiers may implement different scrambling functions optimized to the architecture of each cache tier. Security keys may be periodically updated to further reduce predictability of shared cache to memory address mappings.


