Technical reports
Capability Hardware Enhanced RISC Instructions: CHERI Programmer’s Guide
Robert N. M. Watson, David Chisnall, Brooks Davis, Wojciech Koszek, Simon W. Moore, Steven J. Murdoch, Peter G. Neumann, Jonathan Woodruff
September 2015, 58 pages
Approved for public release; distribution is unlimited. Sponsored by the Defense Advanced Research Projects Agency (DARPA) and the Air Force Research Laboratory (AFRL), under contracts FA8750-10-C-0237 (“CTSRD”) as part of the DARPA CRASH research program. The views, opinions, and/or findings contained in this report are those of the authors and should not be interpreted as representing the official views or policies, either expressed or implied, of the Department of Defense or the U.S. Government.
DOI: 10.48456/tr-877
Abstract
This work presents CHERI, a practical extension of the 64-bit MIPS instruction set to support capabilities for fine-grained memory protection.
Traditional paged memory protection has proved inadequate in the face of escalating security threats and proposed solutions include fine-grained protection tables (Mondrian Memory Protection) and hardware fat-pointer protection (Hardbound). These have emphasised transparent protection for C executables but have lacked flexibility and practicality. Intel’s recent memory protection extensions (iMPX) attempt to adopt some of these ideas and are flexible and optional but lack the strict correctness of these proposals.
Capability addressing has been the classical solution to efficient and strong memory protection but it has been thought to be incompatible with common instruction sets and also with modern program structure which uses a flat memory space with global pointers.
CHERI is a fusion of capabilities with a paged flat memory producing a program-managed fat pointer capability model. This protection mechanism scales from application sandboxing to efficient byte-level memory safety with per-pointer permissions. I present an extension to the 64-bit MIPS architecture on FPGA that runs standard FreeBSD and supports self-segmenting applications in user space.
Unlike other recent proposals, the CHERI implementation is open-source and of sufficient quality to support software development as well as community extension of this work. I compare with published memory safety mechanisms and demonstrate competitive performance while providing assurance and greater flexibility with simpler hardware requirements.
Full text
PDF (0.4 MB)
BibTeX record
@TechReport{UCAM-CL-TR-877, author = {Watson, Robert N. M. and Chisnall, David and Davis, Brooks and Koszek, Wojciech and Moore, Simon W. and Murdoch, Steven J. and Neumann, Peter G. and Woodruff, Jonathan}, title = {{Capability Hardware Enhanced RISC Instructions: CHERI Programmer's Guide}}, year = 2015, month = sep, url = {https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-877.pdf}, institution = {University of Cambridge, Computer Laboratory}, doi = {10.48456/tr-877}, number = {UCAM-CL-TR-877} }