MODRACXKENNETH D'SILVA

← Archive & Insights

Zenbleed (CVE-2023-20593) & Downfall (CVE-2022-40982): CPU Microarchitectural Flaws

Stealing 30 KB/sec per core across virtual machines. How Zenbleed (AMD Zen 2) and Downfall (Intel AVX) broke CPU hardware isolation boundaries to leak encryption keys and memory across multi-tenant clouds.

By Kenneth D'SilvaReading Time: 28 min readCategory: Security & Compliance

1. When the Silicon Itself Leaks Secrets

Modern multi-tenant cloud infrastructure (AWS EC2, Google Cloud Compute Engine, Azure VMs, Kubernetes worker nodes) relies fundamentally on the hardware CPU to enforce strict memory isolation between virtual machines. In 2023, two hardware-level microarchitectural vulnerabilities demonstrated that unprivileged virtual machines could steal raw memory, passwords, and cryptographic keys directly from adjacent tenant VMs sharing the same physical CPU core: Zenbleed (CVE-2023-20593) affecting AMD Zen 2 processors and Downfall (CVE-2022-40982) affecting Intel Core and Xeon CPUs.

2. Hardware Vulnerability Matrix

Vulnerability CVE ID Target Architecture Leak Rate & Mechanism
Zenbleed CVE-2023-20593 AMD Zen 2 (Ryzen 3000–5000, EPYC Rome) ~30 KB/sec per core via speculative register zeroing (vzeroupper)
Downfall CVE-2022-40982 Intel Core 6th–11th Gen, Xeon Scalable Gather instruction transient execution leaking AVX vector registers

3. Zenbleed: The Register Allocation Speculation Bug

Zen 2 processors utilize Simultaneous Multithreading (SMT) where two logical threads share the same physical execution pipeline and SIMD vector register file (AVX-512 / YMM registers). To optimize performance, the CPU uses speculative execution and out-of-order execution.

Google security researcher Tavis Ormandy discovered that executing a speculative vector instruction followed immediately by a branch misprediction and a vzeroupper instruction caused the processor's register allocation table to fail to correctly track the physical register's zero state.

When the CPU recovered from the mispredicted branch, the physical register was marked as valid, but still contained the raw data belonging to the other SMT sibling thread — allowing an unprivileged user-space script to steal encryption keys from OpenSSL, Nginx, or adjacent VMs executing on the same physical CPU core at high throughput without triggering kernel alarms:


// Conceptual Zenbleed exploit loop reading sibling thread YMM registers
for (;;) {
    // Trigger branch misprediction with speculatively executed vector instruction
    asm volatile(
        "movaps %%xmm0, %%xmm1
"
        "vzeroupper
"
        ::: "xmm0", "xmm1"
    );
    // YMM registers now contain residual data from sibling CPU thread
}

4. Downfall: Gathering Vector Data Across Isolation Boundaries

Downfall exploited Intel's GATHER instruction (used in AVX2/AVX-512 to collect non-contiguous memory chunks into vector registers). During speculative execution, the internal gather buffers transiently leaked data from previously executed memory loads across distinct processes and hypervisor boundaries.

5. Remediation & Microcode Patching Protocol


# Check if your Linux kernel has Zenbleed and Downfall mitigations applied
grep -E '(zenbleed|downfall)' /sys/devices/system/cpu/vulnerabilities/*
  1. Apply official AMD/Intel CPU microcode updates via your Linux distribution's package manager: amd64-microcode or intel-microcode.
  2. Ensure hypervisor hosts have updated Linux kernel packages that set the hardware control chicken bits (MSR 0xC0011029 on AMD Zen 2).
  3. In multi-tenant high-security environments, consider disabling SMT (Hyper-Threading) for isolated tenant nodes.

Suggested & Related Reading

Explore related engineering guides from Kenneth D'Silva: