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

Introduction

In 1998, Daniel Bleichenbacher published a seminal paper demonstrating a padding oracle attack against RSA PKCS #1 v1.5. The attack allowed an adversary to decrypt ciphertexts or forge digital signatures by observing a server's response to incorrectly padded messages. Over the following two decades, the security community responded with complex "constant-time" mitigations designed to ensure that a server's processing time and error responses remain identical regardless of whether the padding is valid or invalid.

However, recent research proves that these defenses are often illusory. By combining microarchitectural side channels with advanced lattice-based parallelization, researchers have demonstrated that RSA padding oracles remain a critical threat to modern TLS implementations. This paper explores the "CAT" (Cache ATtack) methodology that successfully compromised seven of the nine most popular TLS stacks.

The Persistence of Padding Oracles

The core of the Bleichenbacher attack relies on a "padding oracle"—a mechanism that reveals if a decrypted RSA block follows the PKCS #1 v1.5 format (starting with 00 02). While modern implementations avoid sending explicit error messages, they often fail to account for microarchitectural leaks. Even if the high-level code appears constant-time, the underlying hardware behavior can betray the internal state of the decryption process.

Microarchitectural Side Channels

The researchers utilized Cache ATtacks (CATs), specifically techniques like FLUSH+RELOAD and PRIME+PROBE. These methods monitor the CPU cache to observe memory access patterns. If a TLS implementation branches to a specific error-handling function or accesses a particular memory location only when padding is invalid, an attacker co-located on the same physical hardware can detect this activity.

Assembly-level conditional branches in a TLS implementation that leak padding validity via the CPU cache.

As shown in the assembly snippet above, conditional branches (such as je) based on data values (like the result of a test instruction on a register) create measurable timing and cache differences. These "micro-leaks" are sufficient to reconstruct the padding oracle signal that developers worked so hard to hide at the application layer.

Breaking the Sequential Barrier: Lattice-Based Parallelization

Historically, Bleichenbacher attacks were considered impractical for "Man-in-the-Browser" scenarios because they are inherently sequential. Each query depends on the result of the previous one, and thousands of queries are typically required to recover a single key. Modern browsers exacerbate this by terminating TLS handshakes that take longer than approximately 30 seconds.

To overcome this "timeout wall," the researchers introduced a novel algorithmic contribution: transforming the padding oracle problem into a Closest Vector Problem (CVP). By using the Lenstra–Lenstra–Lovász (LLL) lattice reduction algorithm, they were able to parallelize the attack. This allows an attacker to query multiple servers that share the same RSA key simultaneously, gathering "bits of information" in parallel and combining them to recover the plaintext far faster than previously possible.

Empirical Evaluation of TLS Stacks

The researchers audited nine major TLS implementations, evaluating them across three critical stages: Data Conversion, PKCS #1 v1.5 Verification, and TLS Mitigation. The results were startling, revealing widespread vulnerability across the industry.

Summary of vulnerabilities across major TLS stacks, categorized by the stage of the handshake process.

As illustrated in the table, only BoringSSL and BearSSL were found to be truly resistant to these cache-based padding oracle attacks. Other industry standards, including OpenSSL, Amazon s2n, and Mozilla NSS, exhibited various levels of vulnerability (marked as 'M' for memory-based leaks or 'F/T' for specific timing/functional leaks).

Key Results and Impact

The practical impact of this research is significant:

  • Speed: Using five servers in parallel, the authors recovered a 2048-bit RSA plaintext in under 30 seconds, successfully beating the browser timeout.
  • Efficiency: For certain implementations like the OpenSSL API, the query complexity was reduced by a factor of six.
  • Downgrade Attacks: The researchers demonstrated that even clients using TLS 1.3 (which does not support RSA key exchange) are at risk. An attacker can perform a downgrade attack to force the use of a vulnerable RSA-based handshake if the server still supports legacy configurations.

Conclusion

The "9 Lives of Bleichenbacher's CAT" serves as a stark reminder that software-level constant-time mitigations are insufficient if they do not account for hardware-level behavior. The research led to the assignment of multiple CVEs and prompted a global patching effort. It highlights the urgent need for the industry to move away from RSA PKCS #1 v1.5 and to adopt truly constant-time cryptographic libraries like BoringSSL or BearSSL.

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