Recognition: 2 theorem links
· Lean TheoremJanus: Compiler-Based Defense Against Transient Execution Attacks Using ARM Hardware Primitives
Pith reviewed 2026-05-12 02:28 UTC · model grok-4.3
The pith
Janus uses ARM pointer authentication and branch target identification in a compiler to block Spectre-style transient execution attacks while keeping overhead under 4 percent on average.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
Janus integrates speculative execution and control flow dependencies with PA modifiers, using PA and BTI microarchitectural features to prevent control-flow speculation attacks and secure both control flow and speculative execution through existing control-flow integrity mechanisms, while applying modifier fusion and carrier reuse to limit performance and code-size costs.
What carries the argument
Compiler instrumentation that merges PA modifiers across speculative and non-speculative paths and reuses registers to carry protected values, extending ARM's existing PA/BTI CFI primitives to cover transient execution.
If this is right
- Existing ARM control-flow integrity hardware can be reused to protect against transient-execution attacks rather than requiring separate mitigations.
- Modifier fusion and register reuse keep the defense overhead low enough for production use on SPEC workloads and typical applications.
- Both control-flow hijacking and speculative leakage are addressed by the same instrumentation pass.
- The defense applies at compile time and therefore scales to entire codebases without runtime binary rewriting.
Where Pith is reading between the lines
- Similar compiler passes could be developed for other ISAs that expose comparable pointer-authentication or branch-target primitives.
- The technique might combine with hardware speculation barriers for defense-in-depth without doubling the cost.
- If the static analysis misses rare paths, dynamic feedback or profiling could be added later to close remaining gaps.
Load-bearing premise
A compiler can statically identify and instrument every possible speculative execution path and control-flow dependency so that the added PA and BTI checks leave no gaps an attacker could exploit.
What would settle it
An end-to-end Spectre-style exploit that succeeds on Janus-protected ARM64 binaries, either by bypassing the inserted modifiers or by using an uninstrumented speculation path.
Figures
read the original abstract
We present Janus, a compiler-based security framework that mitigates transient execution attacks like Spectre and control-flow hijacking on ARM64 platforms. Janus integrates speculative execution and control flow dependencies with PA modifiers, using PA and BTI microarchitectural features to prevent control-flow speculation attacks and secure both control flow and speculative execution through existing control-flow integrity mechanisms. To optimize performance, Janus minimizes overhead by merging defense operations across different defense layers (modifier fusion) and reusing registers of protected variables (carrier reuse), while maintaining strong security guarantees. Evaluation on SPEC CPU2017 shows an average performance overhead of 3.85%, with real-world applications exhibiting overheads ranging from 2.97% to 7.80%. Janus offers effective speculative execution security and low performance and code size overhead, making it a robust solution for ARM-based systems.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents Janus, a compiler-based framework for ARM64 that mitigates transient execution attacks (Spectre-style) and control-flow hijacking by integrating speculative execution and control-flow dependencies with Pointer Authentication (PA) modifiers. It leverages existing PA and Branch Target Identification (BTI) microarchitectural features to enforce control-flow integrity on both committed and transient paths. Optimizations include modifier fusion across defense layers and carrier reuse of registers for protected variables. Evaluation reports 3.85% average overhead on SPEC CPU2017 and 2.97–7.80% on real-world applications, claiming strong security with low performance and code-size cost.
Significance. If the security guarantees hold, the work is significant for providing a practical, low-overhead defense on ARM platforms that reuses existing hardware CFI primitives rather than requiring new instructions or microarchitectural changes. The empirical results on standard benchmarks and the focus on compiler integration of speculation tracking with PA/BTI are strengths that could influence secure compilation practices.
major comments (3)
- [Abstract and §5] Abstract and §5 (Evaluation): The reported performance numbers (3.85% SPEC average) are given without accompanying data on attack coverage, residual gadget count, or threat-model completeness. This is load-bearing because the central claim is that PA/BTI enforcement plus compiler tracking closes all transient channels; without coverage metrics or gadget enumeration, the security result cannot be assessed.
- [§3 and §4] §3 (Design) and §4 (Implementation): The description of compile-time tracking of speculative execution paths and control-flow dependencies does not address completeness for data-dependent indirect branches, aliasing, or cross-function speculation. The optimizations (modifier fusion, carrier reuse) are presented as preserving guarantees, but no argument or static analysis is supplied showing they do not introduce new transient gadgets or leave sites uninstrumented.
- [§3.1–3.3] §3.1–3.3: No formal model of the instrumentation semantics or proof that the PA modifier placement plus BTI enforcement is sufficient to block all control-flow speculation attacks is provided. The security argument therefore rests entirely on the unverified assumption that static analysis can identify every relevant dependency.
minor comments (2)
- [Abstract] The abstract claims 'strong security guarantees' are maintained by the optimizations; a short paragraph clarifying the threat model (e.g., whether it includes all Spectre variants or only control-flow ones) would improve clarity.
- [§5] Table or figure presenting code-size overhead alongside the performance numbers is missing; adding one would make the 'low code size overhead' claim easier to evaluate.
Simulated Author's Rebuttal
We thank the referee for the constructive and detailed feedback. We address each major comment below, indicating revisions where the manuscript will be updated to improve clarity and completeness without altering the core claims.
read point-by-point responses
-
Referee: [Abstract and §5] Abstract and §5 (Evaluation): The reported performance numbers (3.85% SPEC average) are given without accompanying data on attack coverage, residual gadget count, or threat-model completeness. This is load-bearing because the central claim is that PA/BTI enforcement plus compiler tracking closes all transient channels; without coverage metrics or gadget enumeration, the security result cannot be assessed.
Authors: The evaluation in §5 focuses on performance as the primary quantitative result, while security is argued via the design in §3–4. We will revise §2 to include an explicit threat model and add to §5 a discussion of coverage for common Spectre-style patterns (e.g., bounds-check bypass, indirect-branch poisoning) together with a qualitative analysis of residual gadgets after instrumentation. Full per-benchmark gadget enumeration was not performed due to its high computational cost and is noted as a limitation; the quantitative security claim is therefore scoped to the enforcement properties rather than exhaustive enumeration. revision: partial
-
Referee: [§3 and §4] §3 (Design) and §4 (Implementation): The description of compile-time tracking of speculative execution paths and control-flow dependencies does not address completeness for data-dependent indirect branches, aliasing, or cross-function speculation. The optimizations (modifier fusion, carrier reuse) are presented as preserving guarantees, but no argument or static analysis is supplied showing they do not introduce new transient gadgets or leave sites uninstrumented.
Authors: The tracking pass in §4 builds on LLVM’s existing control-flow and alias analyses, conservatively instrumenting all indirect branches and call sites; data-dependent branches are handled by propagating speculation tags through the SSA form. Cross-function speculation is addressed by PA-protected returns and BTI at call targets. Modifier fusion merges only semantically equivalent PA operations, and carrier reuse is restricted to registers already carrying protected values, preserving the authentication invariants. We will add a new subsection in §4.3 that states the soundness assumptions of the analysis and provides a short argument, with examples, that the optimizations do not create new transient control-flow paths. revision: yes
-
Referee: [§3.1–3.3] §3.1–3.3: No formal model of the instrumentation semantics or proof that the PA modifier placement plus BTI enforcement is sufficient to block all control-flow speculation attacks is provided. The security argument therefore rests entirely on the unverified assumption that static analysis can identify every relevant dependency.
Authors: We provide an informal security argument based on the documented semantics of ARM PA authentication failures and BTI traps, showing that any speculative deviation from the intended control flow will trigger a fault before observable effects. We will expand §3.1–3.3 with a structured proof sketch that enumerates the possible speculation points and demonstrates that each is covered by the inserted checks. A machine-checked formal model lies outside the scope of the current work and would require substantial additional effort; we will note this explicitly as future work. revision: partial
Circularity Check
No circularity: engineering system with empirical evaluation only
full rationale
The paper presents an engineering compiler framework (Janus) that instruments code using ARM PA/BTI primitives, with optimizations such as modifier fusion and carrier reuse, followed by SPEC CPU2017 benchmarks reporting 3.85% average overhead. No mathematical derivation chain, equations, fitted parameters, or predictions exist that could reduce to inputs by construction. Security claims rest on the described instrumentation and measured performance rather than self-referential logic or self-citation load-bearing steps. The work is self-contained against external benchmarks.
Axiom & Free-Parameter Ledger
axioms (2)
- domain assumption ARM PA and BTI hardware primitives enforce the intended control-flow and pointer integrity properties when used as described.
- domain assumption The compiler's static analysis of speculative execution and control-flow dependencies is complete and sound for the targeted attack classes.
Lean theorems connected to this paper
-
IndisputableMonolith/Foundation/RealityFromDistinction.leanreality_from_one_distinction unclearJanus integrates speculative execution and control flow dependencies with PA modifiers, using PA and BTI microarchitectural features to prevent control-flow speculation attacks
-
IndisputableMonolith/Cost/FunctionalEquation.leanwashburn_uniqueness_aczel unclearmodifier fusion ... reusing registers of protected variables (carrier reuse)
Reference graph
Works this paper leans on
-
[1]
Enrico Barberis, Pietro Frigo, Marius Muench, Herbert Bos, and Cristiano Giuf- frida. 2022. Branch History Injection: On the Effectiveness of Hardware Mit- igations Against Cross-Privilege Spectre-v2 Attacks. In31st USENIX Security Symposium (USENIX Security 22). USENIX Association, Boston, MA, 971–988. https://www.usenix.org/conference/usenixsecurity22/p...
work page 2022
-
[2]
Markus Bauer, Lorenz Andreas Hetterich, Christian Rossow, and Michael Schwarz
-
[3]
Switchpoline: A Software Mitigation for Spectre-BTB and Spectre-BHB on ARMv. (2024)
work page 2024
-
[4]
Tyler Bletsch, Xuxian Jiang, Vince W Freeh, and Zhenkai Liang. 2011. Jump- oriented programming: a new class of code-reuse attack. InProceedings of the 6th ACM symposium on information, computer and communications security. 30–40
work page 2011
-
[5]
Nathan Burow, Scott A Carr, Joseph Nash, Per Larsen, Michael Franz, Stefan Brunthaler, and Mathias Payer. 2017. Control-flow integrity: Precision, security, and performance.ACM Computing Surveys (CSUR)50, 1 (2017), 1–33
work page 2017
-
[6]
Nicholas Carlini, Antonio Barresi, Mathias Payer, David Wagner, and Thomas R Gross. 2015. Control-flow bending: On the effectiveness of control-flow integrity. In24th USENIX Security Symposium (USENIX Security 15). 161–176
work page 2015
-
[7]
2024.Speculative Load Hardening
Chandler Carruth. 2024.Speculative Load Hardening. Technical Report
work page 2024
-
[8]
Miguel Castro, Manuel Costa, and Tim Harris. 2006. Securing software by enforcing data-flow integrity. InProceedings of the 7th symposium on Operating systems design and implementation. 147–160
work page 2006
-
[9]
Xiangdong Chen, Zhaofeng Li, Tirth Jain, Vikram Narayanan, and Anton Burtsev
-
[10]
In2024 USENIX Annual Technical Conference (USENIX ATC 24)
Limitations and opportunities of modern hardware isolation mechanisms. In2024 USENIX Annual Technical Conference (USENIX ATC 24). 349–368
-
[11]
Neophytos Christou, Alexander J Gaidis, Vaggelis Atlidakis, and Vasileios P Ke- merlis. 2024. Eclipse: Preventing Speculative Memory-error Abuse with Artificial Data Dependencies. InProceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security. 3913–3927
work page 2024
-
[12]
Crispin Cowan, Perry Wagle, Calton Pu, Steve Beattie, and Jonathan Walpole
-
[13]
InProceedings of the DARPA Information Survivability Conference & Exposition
Buffer overflows: Attacks and defenses for the vulnerability of the decade. InProceedings of the DARPA Information Survivability Conference & Exposition. IEEE, 119–129
-
[14]
Luís Fiolhais and Leonel Sousa. 2023. Transient-Execution Attacks: A Com- puter Architect Perspective.Comput. Surveys56 (2023), 1 – 38. https: //api.semanticscholar.org/CorpusID:259120377
work page 2023
-
[15]
Saber Ganjisaffar, Esmaeil Mohmmadian Koruyeh, Jason Zellmer, Hodjat Asghari Esfeden, Chengyu Song, and Nael Abu-Ghazaleh. 2025. SpecASan: Mitigating Transient Execution Attacks Using Speculative Address Sanitization. InProceed- ings of the 52nd Annual International Symposium on Computer Architecture (ISCA ’25). Association for Computing Machinery, New Yo...
-
[16]
Enes Göktas, Kaveh Razavi, Georgios Portokalidis, Herbert Bos, and Cristiano Giuffrida. 2020. Speculative probing: Hacking blind in the Spectre era. InPro- ceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security. 1871–1885
work page 2020
-
[17]
Deepak Gupta. 2024. riscv control-flow integrity for usermode. https://lwn.net/ Articles/990220/
work page 2024
-
[18]
Hong Hu, Shweta Shinde, Sendroiu Adrian, Zheng Leong Chua, Prateek Saxena, and Zhenkai Liang. 2016. Data-oriented programming: On the expressiveness of non-control data attacks. In2016 IEEE Symposium on Security and Privacy (SP). IEEE, 969–986
work page 2016
-
[19]
2023.IntelAnalysisofSpeculativeExecutionSideChannels
Intel. 2023.IntelAnalysisofSpeculativeExecutionSideChannels. Technical Report. Intel
work page 2023
-
[20]
Intel Corporation. 2019. Control-flow Enforcement Technology Specification (Revision 3.0). https://kib.kiev.ua/x86docs/Intel/CET/334525-003.pdf
work page 2019
-
[21]
Paul Kocher, Jann Horn, Anders Fogh, Daniel Genkin, Daniel Gruss, Werner Haas, Mike Hamburg, Moritz Lipp, Stefan Mangard, Thomas Prescher, et al. 2020. Spectre attacks: Exploiting speculative execution.Commun. ACM63, 7 (2020), 93–101
work page 2020
-
[22]
Khasawneh, Chengyu Song, and Nael B
Esmaeil Mohammadian Koruyeh, Khaled N. Khasawneh, Chengyu Song, and Nael B. Abu-Ghazaleh. 2018. Spectre Returns! Speculation Attacks Using the Re- turn Stack Buffer.IEEE Design & Test41 (2018), 47–55. https://api.semanticscholar. org/CorpusID:49901800
work page 2018
-
[23]
2022.ARM Architecture Reference Manual ARMv8, for ARMv8-A architec- ture profile
ARM Ltd. 2022.ARM Architecture Reference Manual ARMv8, for ARMv8-A architec- ture profile. ARM Ltd. https://developer.arm.com/documentation/ddi0487/latest
work page 2022
-
[24]
Arm Ltd. 2023.Arm A -profile Architecture: Feature Description – FEAT_FPAC (Faulting on Pointer Authentication failures). Technical Report. Arm Ltd. Accessed: YYYY-MM-DD
work page 2023
-
[25]
Tiziano Marinaro, Pablo Buiras, Andreas Lindner, Roberto Guanciale, and Hamed Nemati. 2024. Beyond Over-Protection: A Targeted Approach to Spectre Mit- igation and Performance Optimization. InProceedings of the 19th ACM Asia Conference on Computer and Communications Security. 203–216
work page 2024
-
[26]
Matt Miller. 2019. Trends and challenges in the vulnerability mitigation landscape. USENIX Association(2019)
work page 2019
-
[27]
PaX Team. 2003. PaX Address Space Layout Randomization (ASLR). https: //pax.grsecurity.net/docs/aslr.txt
work page 2003
-
[28]
Marios Pomonis, Theofilos Petsios, Angelos Dennis Keromytis, Michalis Poly- chronakis, and Vasileios P. Kemerlis. 2017. 𝑘𝑅 𝑋 : Comprehensive Kernel Protec- tion against Just-In-Time Code Reuse.Proceedings of the Twelfth European Con- ference on Computer Systems(2017). https://api.semanticscholar.org/CorpusID: 592404
work page 2017
-
[29]
Joseph Ravichandran, Weon Taek Na, Jay Lang, and Mengjia Yan. 2022. PACMAN: attacking ARM pointer authentication with speculative execution. InProceedings of the 49th Annual International Symposium on Computer Architecture. 685–698
work page 2022
-
[30]
Ryan Roemer, Erik Buchanan, Hovav Shacham, and Stefan Savage. 2012. Return- oriented programming: Systems, languages, and applications.ACM Transactions on Information and System Security (TISSEC)15, 1 (2012), 1–34
work page 2012
- [31]
-
[32]
Felix Schuster, Thomas Tendyck, Christopher Liebchen, Lucas Davi, Ahmad-Reza Sadeghi, and Thorsten Holz. 2015. Counterfeit object-oriented programming: On the difficulty of preventing code reuse attacks in C++ applications. In2015 IEEE Symposium on Security and Privacy. IEEE, 745–762
work page 2015
-
[33]
Armanuzzaman, Zheyuan Ma, Gaoxiang Liu, Alex Eastman, Hongxin Hu, and Ziming Zhao
Xi Tan, Sagar Mohan, Md. Armanuzzaman, Zheyuan Ma, Gaoxiang Liu, Alex Eastman, Hongxin Hu, and Ziming Zhao. 2024. Is the Canary Dead? On the Effectiveness of Stack Canaries on Microcontroller Systems.Proceedings of the 39th ACM/SIGAPP Symposium on Applied Computing(2024). https://api. semanticscholar.org/CorpusID:269951615
work page 2024
-
[34]
Marco Vassena, Craig Disselkoen, Klaus von Gleissenthall, Sunjay Cauligi, Rami Gökhan Kıcı, Ranjit Jhala, Dean Tullsen, and Deian Stefan. 2021. Au- tomatically eliminating speculative leaks from cryptographic code with blade. Proceedings of the ACM on Programming Languages5, POPL (2021), 1–30
work page 2021
-
[35]
Sander Wiebing, Alvise de Faveri Tron, Herbert Bos, and Cristiano Giuffrida. 2024. {InSpectre} Gadget: Inspecting the Residual Attack Surface of Cross-privilege Spectre v2. In33rd USENIX Security Symposium (USENIX Security 24). 577–594
work page 2024
-
[36]
Wenjie Xiong and Jakub Szefer. 2021. Survey of Transient Execution Attacks and Their Mitigations.ACM Computing Surveys (CSUR)54 (2021), 1 – 36. https: //api.semanticscholar.org/CorpusID:235348755
work page 2021
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.