Cache Scrambling Keys for VM Side-Channel Mitigation

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveresource utilization efficiencyVSAvoidinformation leakage
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improveinformation leakageVSAvoidcache hit rate
Core Design Contradiction:
Object-affected harmful factorsVSReliability

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.

Inventive Principle:
Principle #15Dynamics

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.

Inventive Principle:
Principle #7Nested doll (Nesting)

Data Source

PatentUS11972034B1Hardware-assisted obscuring of cache access patterns
Publication Date: 2024.04.30 AMAZON TECH INC
  • US11972034B1 patent drawing
  • US11972034B1 patent drawing
  • US11972034B1 patent drawing

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.