PIBE: practical kernel control-flow hardening with profile-guided indirect branch elimination
Victor Duta, Cristiano Giuffrida, Herbert Bos, Erik van der Kouwe
摘要
Control-flow hijacking, which allows an attacker to execute arbitrary code, remains a dangerous software vulnerability. Controlflow hijacking in speculated or transient execution is particularly insidious as it allows attackers to leak data from operating system kernels and other targets on commodity hardware, even in the absence of software bugs. Having made the jump from regular to transient execution in recent attacks, control-flow hijacking has become a top priority for developers. While powerful defenses against control-flow hijacking in regular execution are now sufficiently low-overhead to see wide-spread adoption, this is not the case for defenses in transient execution. Unfortunately, current techniques for mitigating attacks in transient execution exhibit high overheadsÐrequiring a costly combination of defenses for every indirect branch.
We show that the high overhead incurred by state-of-the-art mitigations is mostly due to the effect of hardening frequently executed branches. We propose PIBE, which offers comprehensive protection against control-flow hijacking at a fraction of the cost of existing solutions, by revisiting design choices in the compiler's optimization passes. For every indirect branch, it decides whether to harden it with instrumentation code or elide it altogether using code transformations. By specifically removing the heavy hitters among the indirect branches through tailored profile-guided optimization, PIBE aggressively reduces the number of vulnerable branches to allow the simultaneous application of multiple state-ofthe-art defenses on the remaining branches with practical overhead. Demonstrating our solution on the Linux kernel, one of the largest, most complex and most security-critical code bases on modern systems, we show that PIBE reduces the overhead of comprehensive defenses against transient control flow hijacking by an order of magnitude, from 149% to 10.6% on microbenchmarks and from 40% to around 6% on several application benchmarks.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Verified programs can party: optimizing kernel extensions via post-verification merging 引用了 Spectre Attacks: Exploiting Speculative Execution
- Verified programs can party: optimizing kernel extensions via post-verification merging 引用了 Meltdown: Reading Kernel Memory from User Space
- ZombieLoad: Cross-Privilege-Boundary Data Sampling 引用了 Spectre Attacks: Exploiting Speculative Execution
- ZombieLoad: Cross-Privilege-Boundary Data Sampling 引用了 A Systematic Evaluation of Transient Execution Attacks and Defenses
- Meltdown: Reading Kernel Memory from User Space 引用了 Spectre Attacks: Exploiting Speculative Execution
- Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 Attacks 引用了 Spectre Attacks: Exploiting Speculative Execution
- Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 Attacks 引用了 ZombieLoad: Cross-Privilege-Boundary Data Sampling
- Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 Attacks 引用了 Meltdown: Reading Kernel Memory from User Space
- Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 Attacks 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- A Systematic Evaluation of Transient Execution Attacks and Defenses 引用了 Spectre Attacks: Exploiting Speculative Execution
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution 引用了 Spectre Attacks: Exploiting Speculative Execution
- BeeBox: Hardening BPF against Transient Execution Attacks 引用了 Spectre Attacks: Exploiting Speculative Execution
- BeeBox: Hardening BPF against Transient Execution Attacks 引用了 ZombieLoad: Cross-Privilege-Boundary Data Sampling
- BeeBox: Hardening BPF against Transient Execution Attacks 引用了 A Systematic Evaluation of Transient Execution Attacks and Defenses
引用它的顶会 Paper5
- Verified programs can party: optimizing kernel extensions via post-verification mergingHsuan-Chi Kuo, Kai-Hsun Chen, Yicheng Lu, Dan Williams 等EuroSys 2022 · 17 次引用
- BeeBox: Hardening BPF against Transient Execution AttacksDi Jin, Alexander J. Gaidis, Vasileios P. KemerlisUSENIX Security 2024 · 10 次引用
- Branch History Injection: On the Effectiveness of Hardware Mitigations Against Cross-Privilege Spectre-v2 AttacksEnrico Barberis, Pietro Frigo, Marius Muench, Herbert Bos 等USENIX Security 2022
- Predictive Context-sensitive FuzzingPietro Borrello, Andrea Fioraldi, Daniele Cono D'Elia, Davide Balzarotti 等NDSS 2024
- Retrofitting XoM for Stripped Binaries without Embedded Data RelocationChenke Luo, Jiang Ming, Mengfei Xie, Guojun Peng 等NDSS 2025
它引用的 Paper10
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
- Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher 等USENIX Security 2018 · 1,456 次引用
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order ExecutionJo Van Bulck, Marina Minkin, Ofir Weisse, Daniel Genkin 等USENIX Security 2018 · 1,175 次引用
- ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck 等CCS 2019 · 464 次引用
- A Systematic Evaluation of Transient Execution Attacks and DefensesClaudio Canella, Jo Van Bulck, Michael Schwarz, Moritz Lipp 等USENIX Security 2019 · 442 次引用
相关 Paper
- System Register Hijacking: Compromising Kernel Integrity By Turning System Registers Against the SystemJennifer Miller, Manas Ghandat, Kyle Zeng, Hongkai Chen 等USENIX Security 2025
- Perspective: A Principled Framework for Pliable and Secure Speculation in Operating SystemsTae Hoon Kim, David Rudo, Kaiyang Zhao, Zirui Neil Zhao 等ISCA 2024 · 6 次引用
- SpecCFI: Mitigating Spectre Attacks using CFI Informed SpeculationEsmaeil Mohammadian Koruyeh, Shirin Haji Amin Shirazi, Khaled N. Khasawneh, Chengyu Song 等S&P 2020 · 74 次引用
- Defeating Transient Execution Attacks by Limiting Secret Reachability Through Register Hiding and ShadowCFIDaniël Trujillo, Jagadish Kotra, David Kaplan, Mengjia YanS&P 2026 · 1 次引用
- Kasper: Scanning for Generalized Transient Execution Gadgets in the Linux KernelBrian Johannesmeyer, Jakob Koschel, Kaveh Razavi, Herbert Bos 等NDSS 2022
