Side Channel Vulnerabilities in Trusted Execution Environments

279 concepts230 papers3 proposals

Trusted Execution Environments (TEEs), such as Intel SGX, Intel TDX, and ARM CCA, promise a powerful security primitive: hardware-enforced isolation. In this model, an application runs inside a secure "enclave" where its memory is encrypted, shielding it from even a compromised operating system or hypervisor. As Lucjan Hanzlik et al. note in MLCapsule: Guarded Offline Deployment of Machine Learning as a Service, this creates an ideal environment for protecting intellectual property like machine learning models from local theft.

However, this "black box" is an illusion. While TEEs successfully isolate memory pages, they do not isolate execution hardware. The enclave must still share physical microarchitectural structures—such as CPU caches, branch predictors, and execution pipelines—with the untrusted host. This shared state creates side channels: indirect observation vectors where a malicious host can infer secrets by watching how the enclave affects the hardware environment. As Lina Qiu et al. argue in Differentially Oblivious Range and Join Queries with Private Data Structures, assuming perfect TEE security creates a dangerous gap in practical system design.

How Shared Caches Leak Memory Access Patterns

The most prominent side-channel vector stems from the CPU cache hierarchy. When an enclave executes code or looks up data, it loads that information into the shared CPU cache, evicting the host's data in the process. By carefully timing how long it takes to read its own memory, a malicious host process can determine exactly which cache lines the enclave evicted.

This cache-timing analysis allows an adversary to reconstruct the enclave's memory access patterns. For instance, Muoi Tran et al. demonstrate in Obscuro: A Bitcoin Mixer using Trusted Execution Environments that cache-timing can undermine cryptographic protocols by exposing internal execution states. Similarly, Chenghong Wang et al. show in PRESAGE: PRivacy-preserving gEnetic testing via SoftwAre Guard Extension how these timing variations can leak sensitive genomic data during processing.

Crucially, this vulnerability persists even if the data itself remains encrypted. If an application's memory access patterns depend on secret data (e.g., accessing a specific array index based on a private key bit), the cache timing directly betrays that secret.

Piercing Control Flow via Branch Shadowing

Side channels extend beyond data lookups to the very structure of the code being executed. Modern CPUs use Branch Prediction Units (BPUs) to guess the outcome of conditional statements (if-else branches) and speculatively execute instructions ahead of time to boost performance.

Because the hardware does not completely clear or isolate branch history when switching context out of an enclave, the enclave's execution leaves a footprint in the predictor. In Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing, Sangho Lee et al. reveal how a malicious operating system can exploit this behavior. By running a "shadow" version of the enclave's code in an untrusted space, the host can observe whether the CPU's branch predictor mispredicts its branches. This allows the attacker to align the predictor's state with the enclave's historical choices, effectively mapping out fine-grained control flow down to individual conditional statements.

Speculative Execution and Transient State Leakage

The risk intensifies when considering transient execution vulnerabilities like Spectre. When a CPU speculatively executes a path that turns out to be incorrect, it rolls back the architectural changes (like register values), but it does not roll back the microarchitectural changes (like data brought into the cache).

This means an enclave can be tricked into speculatively accessing sensitive data that it would normally protect. Kevin Cheang et al. formalize this challenge in A Formal Approach to Secure Speculation, highlighting that isolating the specific information leakage introduced by misspeculation from normal execution is a core hurdle in hardware security. If an enclave contains a speculative gadget, a host can manipulate the branch predictor to force the enclave to speculatively leak secrets into the cache before the execution is squashed.

The Information Asymmetry and the Limits of Mitigation

Defending against these attacks is exceptionally difficult due to a fundamental information asymmetry. As noted by the authors of SENSE: Enhancing Microarchitectural Awareness for TEEs via Subscription-Based Notification, a malicious host can monitor fine-grained microarchitectural signals with high precision, while the protected enclave remains completely blind to hardware-level interference.

To counter address-based side channels, developers often turn to data-oblivious algorithms, which ensure that memory access patterns are identical regardless of the underlying secrets. However, Shangqi Lai et al. demonstrate in OblivSketch: Oblivious Network Measurement as a Cloud Service that while data-oblivious memory access patterns protect against address-based side channels, they do not inherently mitigate vulnerabilities arising from speculative execution or power analysis. Furthermore, physical side channels like power consumption monitoring, as discussed by Tong Zhou et al. in NNSplitter: An Active Defense Solution for DNN Model via Automated Weight Obfuscation, present an entirely separate layer of leakage that software-level isolation cannot easily address.

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 226 papers
  2. Version 1 · 2026-10-04 · 366 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_side_channel_vulnerability_2352c6de,
  title = {side-channel vulnerability},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/side-channel-vulnerability/rdr_2352c6dec3ac46bf8abafe085912e631},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-21},
}

This exact version (version 2, frozen text):

@misc{lacuna_side_channel_vulnerability_2352c6de_v2,
  title = {side-channel vulnerability},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/side-channel-vulnerability/rdr_2352c6dec3ac46bf8abafe085912e631/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-21},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake