LeapFrog: The Rowhammer Instruction Skip Attack
Andrew Adiletta, M. Caner Tol, Kemal Derya, Berk Sunar, Saad Islam
TL;DR
LeapFrog identifies a new Rowhammer fault vector that directly targets the Program Counter stored on the stack to subvert execution flow. The approach combines a formal definition of LeapFrog gadgets with a dedicated detection framework (MFS) and a memory-profiling pipeline to automate gadget discovery. Through demonstrations on OpenSSL TLS handshakes and Post-Quantum cryptographic implementations, the work shows practical bypasses of cryptographic and authentication routines, highlighting significant implications for data integrity and security. The findings underscore the need for Rowhammer-aware hardware defenses or compiler-level mitigations to protect critical control-flow paths in real-world software.
Abstract
Since its inception, Rowhammer exploits have rapidly evolved into increasingly sophisticated threats compromising data integrity and the control flow integrity of victim processes. Nevertheless, it remains a challenge for an attacker to identify vulnerable targets (i.e., Rowhammer gadgets), understand the outcome of the attempted fault, and formulate an attack that yields useful results. In this paper, we present a new type of Rowhammer gadget, called a LeapFrog gadget, which, when present in the victim code, allows an adversary to subvert code execution to bypass a critical piece of code (e.g., authentication check logic, encryption rounds, padding in security protocols). The LeapFrog gadget manifests when the victim code stores the Program Counter (PC) value in the user or kernel stack (e.g., a return address during a function call) which, when tampered with, repositions the return address to a location that bypasses a security-critical code pattern. This research also presents a systematic process to identify LeapFrog gadgets. This methodology enables the automated detection of susceptible targets and the determination of optimal attack parameters. We first show the attack on a decision tree algorithm to show the potential implications. Secondly, we employ the attack on OpenSSL to bypass the encryption and reveal the plaintext. We then use our tools to scan the Open Quantum Safe library and report on the number of LeapFrog gadgets in the code. Lastly, we demonstrate this new attack vector through a practical demonstration in a client/server TLS handshake scenario, successfully inducing an instruction skip in a client application. Our findings extend the impact of Rowhammer attacks on control flow and contribute to developing more robust defenses against these increasingly sophisticated threats.
