Skip to main content
QUICK REVIEW

[Paper Review] PTAuth: Temporal Memory Safety via Robust Points-to Authentication

Reza Mirzazade Farkhani, Mansour Ahmadi|arXiv (Cornell University)|Feb 19, 2020
Security and Verification in ComputingComputer Science30 references12 citations
TL;DR

PTAuth is a hardware-assisted runtime system that detects all forms of heap-based temporal memory corruptions—such as use-after-free, double-free, and invalid-free—via pointer authentication codes (PAC) on ARMv8.3+ architectures. By embedding cryptographic authentication codes (AC) inline in pointers and object IDs in memory, PTAuth enables efficient, metadata-integrity-protected checks at every dereference, achieving 100% detection with only 26% overhead (software-emulated PAC), and 2% memory overhead.

ABSTRACT

Temporal memory corruptions are commonly exploited software vulnerabilities that can lead to powerful attacks. Despite significant progress made by decades of research on mitigation techniques, existing countermeasures fall short due to either limited coverage or overly high overhead. Furthermore, they require external mechanisms (e.g., spatial memory safety) to protect their metadata. Otherwise, their protection can be bypassed or disabled. To address these limitations, we present robust points-to authentication, a novel runtime scheme for detecting all kinds of temporal memory corruptions. We built a prototype system, called PTAuth, that realizes this scheme on ARM architectures. PTAuth contains a customized compiler for code analysis and instrumentation and a runtime library for performing the points-to authentication as a protected program runs. PTAuth leverages the Pointer Authentication Code (PAC) feature, provided by the ARMv8.3 and later CPUs, which serves as a simple hardware-based encryption primitive. PTAuth uses minimal in-memory metadata and protects its metadata without requiring spatial memory safety. We report our evaluation of PTAuth in terms of security, robustness and performance using 150 vulnerable programs from Juliet test suite and the SPEC CPU2006 benchmarks. PTAuth detects all three categories of heap-based temporal memory corruptions, generates zero false alerts, and slows down program execution by 26% (this number was measured based on software-emulated PAC; it is expected to decrease to 20% when using hardware-based PAC). We also show that PTAuth incurs 2% memory overhead thanks to the efficient use of metadata.

Motivation & Objective

  • To address the limitations of existing temporal memory corruption detection techniques, which often require spatial memory safety, incur high overhead, or have limited coverage.
  • To design a runtime system that detects all categories of heap-based temporal memory corruptions without relying on external spatial safety mechanisms.
  • To minimize metadata size and optimize metadata placement for better performance and compatibility with pointer propagation.
  • To leverage hardware-assisted pointer authentication codes (PAC) to protect metadata integrity without requiring additional spatial safety.
  • To achieve high detection accuracy with low performance and memory overhead in real-world workloads.

Proposed method

  • PTAuth assigns a unique ID to each heap-allocated object and stores it at the object's base address.
  • It computes a cryptographic authentication code (AC) using a secret key, object ID, and base address, and embeds the AC into the unused bits of the pointer via ARM's Pointer Authentication Code (PAC) feature.
  • During every pointer dereference, PTAuth re-computes the AC and verifies it against the stored value to detect tampering or invalid use.
  • The system uses a customized compiler to instrument code with inline checks and a runtime library to manage AC generation and verification.
  • OS-level patches configure PAC settings to support the required pointer authentication semantics.
  • Metadata integrity is ensured via PAC’s hardware-level signing, making forged or corrupted metadata detectable without relying on spatial memory safety.

Experimental results

Research questions

  • RQ1Can a runtime system detect all forms of heap-based temporal memory corruptions without requiring external spatial memory safety?
  • RQ2Can a system achieve high detection accuracy with minimal performance and memory overhead using only hardware-assisted pointer authentication?
  • RQ3How can metadata be stored and verified efficiently to support pointer dereference checks without increasing attack surface?
  • RQ4Can inline metadata embedded in pointers and objects be made resilient to corruption while maintaining performance?
  • RQ5What is the practical performance and memory overhead of a system that uses PAC for robust, unified integrity and identity checking of pointers?

Key findings

  • PTAuth detects all three categories of heap-based temporal memory corruptions—use-after-free, double-free, and invalid-free—with 100% accuracy on 150 vulnerable programs from the Juliet test suite.
  • The system generates zero false positives or false negatives during evaluation, demonstrating perfect detection precision and recall.
  • With software-emulated PAC, PTAuth incurs a 26% performance overhead on average, which is expected to reduce to 20% when using native hardware-based PAC.
  • The memory overhead is only 2%, due to the minimal and efficiently placed metadata (object IDs and PAC tags).
  • PTAuth’s metadata protection is robust against tampering, as PAC ensures that any modification to the AC or ID is detected during verification.
  • The system is resilient to attacks that attempt to bypass metadata protection, as the secret key in AC computation prevents forgeries without access to the key.

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.