Skip to main content
QUICK REVIEW

[Paper Review] In-Kernel Control-Flow Integrity on Commodity OSes using ARM Pointer Authentication

Sungbae Yoo, Jinbum Park|arXiv (Cornell University)|Dec 14, 2021
Security and Verification in ComputingComputer Science8 citations
TL;DR

This paper proposes PAL, a hardware-assisted in-kernel control-flow integrity (CFI) mechanism for commodity OSes like Linux and FreeBSD using ARM Pointer Authentication (PA). PAL enhances CFI precision via automated context-aware refinement and ensures correctness through a static validator, achieving near-zero performance overhead (<1% on Apache, 3–5% on Linux perf) while uncovering new attack vectors in iOS and other PA-based systems.

ABSTRACT

This paper presents an in-kernel, hardware-based control-flow integrity (CFI) protection, called PAL, that utilizes ARM's Pointer Authentication (PA). It provides three important benefits over commercial, state-of-the-art PA-based CFIs like iOS's: 1) enhancing CFI precision via automated refinement techniques, 2) addressing hindsight problems of PA for in kernel uses such as preemptive hijacking and brute-forcing attacks, and 3) assuring the algorithmic or implementation correctness via post validation. PAL achieves these goals in an OS-agnostic manner, so could be applied to commodity OSes like Linux and FreeBSD. The precision of the CFI protection can be adjusted for better performance or improved for better security with minimal engineering efforts if a user opts in to. Our evaluation shows that PAL incurs negligible performance overhead: e.g., &lt;1% overhead for Apache benchmark and 3~5% overhead for Linux perf benchmark on the latest Mac mini (M1). Our post-validation approach helps us ensure the security invariant required for the safe uses of PA inside the kernel, which also reveals new attack vectors on the iOS kernel. PAL as well as the CFI-protected kernels will be open sourced.

Motivation & Objective

  • Address the lack of precise, deployable in-kernel CFI for commodity OSes like Linux and FreeBSD using ARM Pointer Authentication.
  • Overcome limitations of existing PA-based CFI schemes—such as poor precision and susceptibility to hindsight attacks—by enabling automated, OS-agnostic refinement.
  • Ensure correctness and security of PA-based CFI through a static validator that detects compiler optimization pitfalls and implementation flaws in kernel images.
  • Minimize performance overhead to enable practical deployment while maintaining strong security guarantees.
  • Expose and analyze new attack vectors in existing PA-based protections (e.g., iOS kernel) through systematic threat modeling.

Proposed method

  • Leverage ARM Pointer Authentication (PA) to generate signed function pointers that authenticate control-flow transfers at runtime.
  • Implement a context analyzer that automatically infers kernel-specific idioms and design patterns (e.g., object invariants, calling contexts) to refine indirect call targets and improve CFI precision.
  • Use a static validator to verify that all PA-signed pointers in the final kernel image adhere to security invariants, detecting issues like premature pointer storage or optimization-induced disarming.
  • Integrate the CFI mechanism into the GCC compiler pipeline at the GIMPLE intermediate representation (IR) level, enabling OS-agnostic deployment without modifying the kernel source.
  • Reserve one PA key for kernel protection and another for user-space, with per-application key multiplexing to prevent key reuse attacks.
  • Apply post-validation at runtime to detect raw pointers or authentication failures, ensuring robustness against edge cases and compiler misoptimizations.

Experimental results

Research questions

  • RQ1How can PA-based CFI be made both precise and efficient enough for deployment in commodity OS kernels like Linux and FreeBSD?
  • RQ2What are the new attack vectors that arise when using PA for in-kernel CFI, particularly due to compiler optimizations or misuse?
  • RQ3Can automated refinement techniques based on kernel design patterns significantly improve CFI precision without manual instrumentation?
  • RQ4To what extent can a static validator detect subtle security flaws in PA-protected kernel images that are invisible to runtime checks?
  • RQ5What performance overhead does a PA-based in-kernel CFI impose on real-world workloads, and can it be considered practical for production use?

Key findings

  • PAL reduces the number of indirect calls with >100 targets from 7.0% (Android CFI) to 0.08%, demonstrating a significant improvement in CFI precision.
  • The Apache benchmark shows less than 1% performance overhead, and Linux perf benchmarks show 3–5% overhead, indicating negligible performance impact on real hardware (M1 Mac mini).
  • The static validator uncovered new attack vectors in the latest iOS kernel and revealed bugs in existing PA-based schemes like PARTS and Apple’s CFI.
  • PAL’s approach is OS-agnostic and can be applied to Linux and FreeBSD with minimal engineering effort, enabling high-precision CFI through automated context analysis.
  • The system successfully prevents common PA-related attacks such as preemptive hijacking and brute-forcing by enforcing strict invariants via static and runtime validation.
  • PAL is open-sourced, including compiler plugins, static validator, and CFI-hardened kernels for Linux and FreeBSD, enabling reproducibility and further research.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.