International Association for Cryptologic Research

International Association
for Cryptologic Research

CryptoDB

RASSLE: Return Address Stack based Side-channel LEakage

Authors:
Anirban Chakraborty , Indian Institute of Technology Kharagpur, India
Sarani Bhattacharya , Katholieke Universiteit Leuven, Belgium
Manaar Alam , Indian Institute of Technology Kharagpur, India
Sikhar Patranabis , ETH Zürich, Switzerland
Debdeep Mukhopadhyay , Indian Institute of Technology Kharagpur, India
Download:
DOI: 10.46586/tches.v2021.i2.275-303
URL: https://tches.iacr.org/index.php/TCHES/article/view/8795
Search ePrint
Search Google
Abstract: Microarchitectural attacks on computing systems often stem from simple artefacts in the underlying architecture. In this paper, we focus on the Return Address Stack (RAS), a small hardware stack present in modern processors to reduce the branch miss penalty by storing the return addresses of each function call. The RAS is useful to handle specifically the branch predictions for the RET instructions which are not accurately predicted by the typical branch prediction units. In particular, we envisage a spy process who crafts an overflow condition in the RAS by filling it with arbitrary return addresses, and wrestles with a concurrent process to establish a timing side channel between them. We call this attack principle, RASSLE 1 (Return Address Stack based Side-channel Leakage), which an adversary can launch on modern processors by first reverse engineering the RAS using a generic methodology exploiting the established timing channel. Subsequently, we show three concrete attack scenarios: i) How a spy can establish a covert channel with another co-residing process? ii) How RASSLE can be utilized to determine the secret key of the P-384 curves in OpenSSL (v1.1.1 library)? iii) How an Elliptic Curve Digital Signature Algorithm (ECDSA) secret key on P-256 curve of OpenSSL can be revealed using Lattice Attack on partially leaked nonces with the aid of RASSLE? In this attack, we show that the OpenSSL implementation of scalar multiplication on this curve has varying number of add-and-sub function calls, which depends on the secret scalar bits. We demonstrate through several experiments that the number of add-and-sub function calls can be used to template the secret bit, which can be picked up by the spy using the principles of RASSLE. Finally, we demonstrate a full end-to-end attack on OpenSSL ECDSA using curve parameters of curve P-256. In this part of our experiments with RASSLE, we abuse the deadline scheduler policy to attain perfect synchronization between the spy and victim, without any aid of induced synchronization from the victim code. This synchronization and timing leakage through RASSLE is sufficient to retrieve the Most Significant Bits (MSB) of the ephemeral nonces used while signature generation, from which we subsequently retrieve the secret signing key of the sender applying the Hidden Number Problem. 1RASSLE is a non-standard spelling for wrestle.
Video from TCHES 2021
BibTeX
@article{tches-2021-30800,
  title={RASSLE: Return Address Stack based Side-channel LEakage},
  journal={IACR Transactions on Cryptographic Hardware and Embedded Systems},
  publisher={Ruhr-Universität Bochum},
  volume={2021, Issue 2},
  pages={275-303},
  url={https://tches.iacr.org/index.php/TCHES/article/view/8795},
  doi={10.46586/tches.v2021.i2.275-303},
  author={Anirban Chakraborty and Sarani Bhattacharya and Manaar Alam and Sikhar Patranabis and Debdeep Mukhopadhyay},
  year=2021
}