一句话:首次将完整 C 语言操作系统 FreeBSD 与企业数据库 PostgreSQL 适配到 CHERI 能力架构,实现空间与引用内存安全。
CHERI 架构将指针实现为能力(capability)而非整数虚拟地址,在兼容并强化 C 语言语义的同时提供强完整性、受强制来源有效性和访问单调性。然而,这些架构能力必须与操作系统、运行时、动态链接、内存管理及用户-内核交互的真实行为相协调;仅靠简单的能力派生不足以描述程序在某一执行点应被允许的内存访问。本文提出“抽象能力”概念来弥合这一缺口,用其描述内核或用户态在给定执行点应允许的访问。为在规模化场景中验证该思想,作者首次将完整 C 语言操作系统 FreeBSD 与企业数据库 PostgreSQL 适配到 CHERI,以实现完整的空间与引用内存安全。评估表明,结合抽象能力感知与 CHERI 架构能力,可获得比 pre-CHERI 基线和纯软件方案更完整的保护、强兼容性以及可接受的性能开销,并对其他缓解技术具有潜在启示。
The CHERI architecture allows pointers to be implemented as capabilities (rather than integer virtual addresses) in a manner that is compatible with, and strengthens, the semantics of the C language. In addition to the spatial protections offered by conventional fat pointers, CHERI capabilities offer strong integrity, enforced provenance validity, and access monotonicity. The stronger guarantees of these architectural capabilities must be reconciled with the real-world behavior of operating systems, run-time environments, and applications. When the process model, user-kernel interactions, dynamic linking, and memory management are all considered, we observe that simple derivation of architectural capabilities is insufficient to describe appropriate access to memory. We bridge this conceptual gap with a notional abstract capability that describes the accesses that should be allowed at a given point in execution, whether in the kernel or userspace. To investigate this notion at scale, we describe the first adaptation of a full C-language operating system (FreeBSD) with an enterprise database (PostgreSQL) for complete spatial and referential memory safety. We show that awareness of abstract capabilities, coupled with CHERI architectural capabilities, can provide more complete protection, strong compatibility, and acceptable performance overhead compared with the pre-CHERI baseline and software-only approaches. Our observations also have potentially significant implications for other mitigation techniques.
@inproceedings{paperbot4914,
title = {CheriABI},
author = {Brooks Davis and Robert N. M. Watson and Alexander Richardson and Peter G. Neumann and Simon W. Moore and John Baldwin and David Chisnall and Jessica Clarke and Nathaniel Wesley Filardo and Khilan Gudka and Alexandre Joannou and Ben Laurie and A. Theodore Markettos and J. Edward Maste and Alfredo Mazzinghi and Edward Tomasz Napierala and Robert M. Norton and Michael Roe and Peter Sewell and Stacey Son and Jonathan Woodruff},
booktitle = {ASPLOS},
year = {2019},
doi = {10.1145/3297858.3304042}
}