Leaking Secrets through Modern Branch Predictor in the Speculative World
Open Access
- 27 October 2021
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Computers
- Vol. PP (00189340) , 1
Abstract
Transient-execution attacks that exploit speculation have raised significant concerns in computer systems. Typically, branch-predictors are leveraged to trigger mis-speculation in transient-execution attacks. In this work, we demonstrate a new class of speculation-based attack that targets branch-prediction unit. We find that speculative resolution of conditional branches alter the states of pattern-history table in modern processors, which are not restored after the corresponding branches are later squashed. Such characteristic allows attackers to exploit BPU as the secret transmitting-medium in transient-execution attacks. To evaluate the discovered vulnerability, we build a novel attack-framework, BranchSpectre, that enables unintended secrets exfiltration through observing speculative PHT updates. We further investigate PHT-collision mechanism in the history-based predictor as well as the branch-prediction mode transitions in Intel processors. We implement a covert-channel (BranchSpectre-cc) and two side channels (BranchSpectre-v1 and BranchSpectre-v2) that rely on BPU for mis-speculation trigger and secret inference in the speculative domain. Notably, BranchSpectre side channels take advantage of much simpler code patterns than the ones used in Spectre attacks. We present an extensive BranchSpectre code gadget analysis on several popular real-world application code-bases followed by a demonstration of real-world side-channel attack on OpenSSL. Finally, we discuss secure branch prediction mechanisms that can mitigate transient execution attacks.Keywords
All Related Versions
This publication has 34 references indexed in Scilit:
- Covert Timing Channels Exploiting Cache Coherence Hardware: Characterization and DefenseInternational Journal of Parallel Programming, 2018
- BranchScope2018
- Are Coherence Protocol States Vulnerable to Information Leakage?2018
- Covert Timing Channels Exploiting Non-Uniform Memory Access based Architectures2017
- Detecting Hardware Covert Timing ChannelsIEEE Micro, 2016
- Understanding and Mitigating Covert Channels Through Branch PredictorsACM Transactions on Architecture and Code Optimization, 2016
- CATalyst: Defeating last-level cache side channel attacks in cloud computing2016
- Covert and Side Channels Due to Processor ArchitectureTwenty-Third Annual Computer Security Applications Conference (ACSAC 2007), 2006
- The effect of speculative updating branch history on branch prediction accuracy, revisited2005
- The Alpha 21264 microprocessorIEEE Micro, 1999