A Low-Cost Secure Branch Predictor to Mitigate the Speculative Attacks by Disrupting Setup Phase
Many types of speculative attacks that exploit branch prediction bear a malicious training process on the branch predictor (BP) in the setup phase. Currently, defense mechanisms on the BP have been rarely studied, and the existing works are restricted to typical scenarios. In this article, we propose a low-cost secure BP to mitigate speculative attacks by monitoring suspicious branch prediction behaviors in all circumstances. We propose a secure mechanism to evaluate the risk level for every branch in the pattern history table. Additionally, we utilize a random number generator to randomly invert the prediction result so as to disrupt the training process, according to the risk level and the generated random number. The maximum inversion probability can be real-time configured during operation. Typically, we implement it on the BI-MODE BP in XuanTie-C910 RISC-V core with a minimal system on chip on field-programmable gate array (FPGA). The realistic hardware evaluation under SPEC2017 with Linux shows that, under the optimal tradeoff between security and performance with the maximum inversion probability of 20%, the hardware and performance overhead are less than 1%, and the speculative attacks including Spectre v1.x and Meltdown can be mitigated with the rates of 44%–88%.
Authors
- Zhiyi Yu (ORCID: https://orcid.org/0000-0002-8802-0457)
- Yuyang Liu (ORCID: https://orcid.org/0000-0003-0128-5039)
- Yujie Chen (ORCID: https://orcid.org/0000-0002-9905-9138)
- Yao Liu (ORCID: https://orcid.org/0000-0003-2719-4055)
- Runye Ding
Institutions
- Sun Yat-sen University (CN)
Publication Details
- Journal
- IEEE Transactions on Very Large Scale Integration (VLSI) Systems
- Published
- 2025-06-03
- DOI
- https://doi.org/10.1109/tvlsi.2025.3569219
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China
- National Key Research and Development Program of China