The 9 Lives of Bleichenbacher's CAT: New Cache ATtacks on TLS Implementations

Eyal Ronen, Robert Gillham, Daniel Genkin, Adi Shamir, David Wong, Yuval Yarom

TL;DR

Twenty years after the seminal Bleichenbacher attack, researchers have proven that RSA padding oracles are still alive and kicking in modern TLS implementations. By exploiting microarchitectural side channels (like CPU caches) and a novel lattice-based parallelization technique, the authors successfully broke the security of seven out of nine major TLS stacks, recovering 2048-bit RSA keys in under 30 seconds.

What Problem Does This Paper Address?

The paper revisits a classic vulnerability: the Bleichenbacher padding oracle attack (1998). In RSA PKCS #1 v1.5, messages are padded in a specific format. If a server reveals whether a decrypted message is correctly padded (even via an error message or timing difference), an attacker can use that "oracle" to decrypt any ciphertext or forge signatures.

While developers have spent two decades implementing "constant-time" mitigations to hide this "good/bad" signal, this paper shows those defenses are often insufficient. The authors tackle two main challenges:

  1. Microarchitectural Leaks: Even if code looks constant-time, the CPU hardware (caches and branch predictors) still leaks information about the padding.
  2. The Timeout Wall: Modern browsers kill TLS handshakes after ~30 seconds. Traditional Bleichenbacher attacks are sequential and require thousands of queries, making them too slow for "Man-in-the-Browser" attacks.

Methods

The authors combined low-level hardware exploitation with high-level algorithmic optimization:

  • Cache ATtacks (CATs): They used techniques like FLUSH+RELOAD and PRIME+PROBE to monitor the CPU cache. By observing which memory locations or code branches were accessed during decryption, they could determine if the padding was valid without the server ever sending an explicit error message.
  • Vulnerability Classification: They audited nine popular TLS implementations (OpenSSL, Amazon s2n, MbedTLS, etc.) across three stages: Data Conversion, Verification, and Mitigation.
  • Lattice-Based Parallelization: This is the paper's most significant algorithmic contribution. Standard Bleichenbacher attacks are inherently sequential. The authors transformed the problem into a Closest Vector Problem (CVP). This allowed them to run multiple partial attacks in parallel across different servers sharing the same RSA key and then combine the results using the LLL (Lenstra–Lenstra–Lovász) lattice reduction algorithm.
  • Downgrade Attacks: They demonstrated how to force modern clients (even those using TLS 1.3, which doesn't support RSA key exchange) to downgrade to vulnerable RSA-based handshakes.

Datasets

The "datasets" in this research were the target implementations themselves. The authors evaluated:

  • Vulnerable: OpenSSL, Amazon s2n, MbedTLS, Apple CoreTLS, Mozilla NSS, WolfSSL, and GnuTLS.
  • Resistant: BearSSL and Google’s BoringSSL (the only two that were truly constant-time).

They also performed 500,000 simulations of their parallelized attack to empirically determine query complexity and success rates.

Key Insights and Ideas

  • The Hardware Doesn't Lie: Even when developers use "constant-time" primitives, helper functions (like logging, error handling, or big-number serialization) often introduce branches that leak the padding state to the CPU cache.
  • Parallelization is Possible: The common wisdom was that you couldn't parallelize a padding oracle attack because each query depends on the last. By using lattices, the authors proved you can gather "bits of information" from multiple sources simultaneously.
  • The "Long Tail" Strategy: Instead of trying to guarantee a 100% success rate on one connection, an attacker can use a "BEAST-style" approach—repeatedly triggering new connections until one succeeds within the 30-second window.
  • Legacy Support is a Universal Risk: Supporting RSA key exchange for the ~6% of legacy clients puts the other 94% at risk because an attacker can use those same RSA certificates to mount a downgrade attack.

Key Results

  • Widespread Vulnerability: 7 out of 9 tested implementations were broken.
  • Speed and Efficiency: Using their parallelization technique, the authors recovered a full 2048-bit RSA plaintext using 5 servers in under 30 seconds.
  • Significant Query Reduction: For the OpenSSL API, they reduced the required number of oracle queries by a factor of 6 compared to previous state-of-the-art attacks.
  • Real-World Impact: The researchers coordinated a massive disclosure effort in late 2018, resulting in multiple CVEs (e.g., CVE-2018-12404, CVE-2018-19608) and patches across the industry.

Limitations and Future Work

  • Co-location Requirements: Some of the cache attacks require the attacker to run code on the same physical hardware as the victim (e.g., in a multi-tenant cloud environment).
  • Network Position: The downgrade and parallelization attacks require a "Man-in-the-Middle" or "Man-in-the-Browser" position to intercept and redirect traffic.
  • Future Work: The authors suggest a systematic review of client-side handshake timeouts and further investigation into "Keyless TLS" architectures, where private key operations are offloaded to separate, potentially vulnerable, servers.

Summary updated

BibTeX
@inproceedings{ronen2019lives,
  author = {Eyal Ronen and Robert Gillham and Daniel Genkin and Adi Shamir and David Wong and Yuval Yarom},
  title = {{The 9 Lives of Bleichenbacher's CAT: New Cache ATtacks on TLS Implementations}},
  booktitle = {IEEE Symposium on Security and Privacy},
  year = {2019},
  doi = {10.1109/sp.2019.00062},
}
Figure