CryptSan: Leveraging ARM Pointer Authentication for Memory Safety in C/C++

Konrad Hohentanner, Philipp Zieris, Julian Horsch
2/17/2022
cs.CRcs.PLcs.SE

Official code: Fraunhofer-AISEC/cryptsan (5 stars, Shell, last commit 2023-04-13).

Abstract

Memory safety bugs remain in the top ranks of security vulnerabilities, even after decades of research on their detection and prevention. Various mitigations have been proposed for C/C++, ranging from language dialects to instrumentation.

Show full abstract

Among these, compiler-based instrumentation is particularly promising, not requiring manual code modifications and being able to achieve precise memory safety. Unfortunately, existing compiler-based solutions compromise in many areas, including performance but also usability and memory safety guarantees. New developments in hardware can help improve performance and security of compiler-based memory safety. ARM Pointer Authentication, added in the ARMv8.3 architecture, is intended to enable hardware-assisted Control Flow Integrity (CFI). But since its operations are generic, it also enables other, more comprehensive hardware-supported runtime integrity approaches. As such, we propose CryptSan, a memory safety approach based on ARM Pointer Authentication. CryptSan uses pointer signatures to retrofit memory safety to C/C++ programs, protecting heap, stack, and globals against temporal and spatial vulnerabilities. We present a full LLVM-based prototype implementation, running on an M1 MacBook Pro, i.e., on actual ARMv8.3 hardware. Our prototype evaluation shows that the system outperforms similar approaches under real-world conditions. This, together with its interoperability with uninstrumented libraries and cryptographic protection against attacks on metadata, makes CryptSan a viable solution for retrofitting memory safety to C/C++ programs.

View on arXivView PDF

Code Implementations(1)

51Shell, CDec 19, 20223 years ago

Similar Papers

Cite this paper

@article{hohentanner2022cryptsan,
  title  = {CryptSan: Leveraging ARM Pointer Authentication for Memory Safety in C/C++},
  author = {Konrad Hohentanner and Philipp Zieris and Julian Horsch},
  year   = {2022},
  eprint = {2202.08669},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.08669}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.08669.svg)](https://codeofpaper.com/paper/2202.08669)

Discussion