Capability Hardware Enhanced RISC Instructions
   HOME

TheInfoList



OR:

Capability Hardware Enhanced RISC Instructions (CHERI) is a technology designed to improve security for
reduced instruction set computer In electronics and computer science, a reduced instruction set computer (RISC) is a computer architecture designed to simplify the individual instructions given to the computer to accomplish tasks. Compared to the instructions given to a com ...
(RISC) processors. CHERI aims to address the root cause of the problems caused by lack of memory safety in common implementations of
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s such as C and C++, which are responsible for around 70% of security vulnerabilities in modern systems. The hardware works by giving each reference to any piece of data or system resource its own access rules. This prevents programs from accessing or changing things they should not. It also makes it hard to trick a part of a program into accessing or changing something that it should be able to access, but at a different time. The same mechanism is used to implement
privilege separation Privilege may refer to: Arts and entertainment * Privilege (film), ''Privilege'' (film), a 1967 film directed by Peter Watkins * Privilege (Ivor Cutler album), ''Privilege'' (Ivor Cutler album), 1983 * Privilege (Television Personalities album ...
, dividing processes into compartments that limit the damage that a bug (security or otherwise) can do. CHERI can be added to many different
instruction set architecture In computer science, an instruction set architecture (ISA) is an abstract model that generally defines how software controls the CPU in a computer or a family of computers. A device or program that executes instructions described by that ISA, ...
s including MIPS,
AArch64 AArch64, also known as ARM64, is a 64-bit version of the ARM architecture family, a widely used set of computer processor designs. It was introduced in 2011 with the ARMv8 architecture and later became part of the ARMv9 series. AArch64 allows ...
, and
RISC-V RISC-V (pronounced "risk-five") is an open standard instruction set architecture (ISA) based on established reduced instruction set computer (RISC) principles. The project commenced in 2010 at the University of California, Berkeley. It transfer ...
, making it usable across a wide range of platforms. Software must be recompiled to gain fine-grained memory-safety benefits from CHERI, but most software requires few (if any) changes to the source code. CHERI's importance has been recognised by governments as a way to improve cybersecurity and protect critical systems. It is under active development by various business and academic organizations.


Background

CHERI is a capability architecture. Early capability architectures, such as the CAP computer and Intel iAPX 432, demonstrated secure memory management, but were hindered by performance overheads and complexity. As systems became faster and more complex, vulnerabilities like buffer overflows and use-after-free errors became widespread. CHERI addresses these challenges with a design intended for modern computing environments. It enforces memory safety and provides secure sharing and isolation to handle increasing software complexity and combat cyberattacks. In the 1970s and 1980s early capability architectures such as the CAP computer (developed at the University of Cambridge) and the Intel iAPX 432 demonstrated strong security properties. These systems relied on indirection tables to manage capabilities, introducing performance bottlenecks as memory access required multiple lookups. While this approach worked when processors were slow and memory was fast, it became impractical by the mid-1980s as processors became faster and memory access times lagged behind. In 2010 DARPA launched the Clean-slate design of Resilient, Adaptive, Secure Hosts (CRASH) programme, which tasked participants with redesigning computer systems to improve security.
SRI International SRI International (SRI) is a nonprofit organization, nonprofit scientific research, scientific research institute and organization headquartered in Menlo Park, California, United States. It was established in 1946 by trustees of Stanford Univer ...
and
University of Cambridge The University of Cambridge is a Public university, public collegiate university, collegiate research university in Cambridge, England. Founded in 1209, the University of Cambridge is the List of oldest universities in continuous operation, wo ...
team revisited capability architectures, seeking to address memory safety challenges inherent in conventional designs.


Mechanism

A CHERI system operates at a hardware level by providing a hardware-enforced type (a ''CHERI capability'') that authorises access to memory. This type includes an address and other ''metadata'', such as bounds and permissions. Instructions such as loads, stores, and jumps, that access memory use one of these types to authorise access, whereas on traditional architectures they would simply use an address. This metadata is stored inline, alongside the address, in the computer's memory and protected by a tag bit, which is cleared if the capability is tampered with. This informs the computer of which areas of memory can be accessed through a specific operation and how a program can modify or read memory through that operation. This allows CHERI systems to catch cases where memory that was outside the bounds of where the program was supposed to read or write to was operated on. Associating the metadata with the value used to access memory, rather than with the memory being accessed (in contrast to a
memory management unit A memory management unit (MMU), sometimes called paged memory management unit (PMMU), is a computer hardware unit that examines all references to computer memory, memory, and translates the memory addresses being referenced, known as virtual mem ...
) means that the hardware can catch cases where a program attempts to access a part of memory that it ''should'' have access to while intending to access a ''different'' piece of memory. Implementations of CHERI systems also include modifications to the default memory allocator, which is a component that defines that a range of addresses should be treated by a program as an
object Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an a ...
. On a CHERI system, it must also communicate this information to the hardware, by setting the bounds on the pointer (represented by a CHERI capability) that is returned. It may also communicate the ''lifetime'', to prevent use-after-free or use-after-reuse bugs. Depending on the context, CHERI systems can be used to enhance compiler-level checks, build secure enclaves, or even be used to augment existing instruction architectures. A report by
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
in 2019 found that CHERI's protections could be used to mitigate over 70% of memory safety issues found in 2019 at the company. CHERI architectures are also designed to be backward compatible with existing programming languages such as C and C++. A study performed by University of Cambridge researchers found that porting six million lines of C and C++
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
to CHERI required changes to 0.026% of the
source lines of code Source lines of code (SLOC), also known as lines of code (LOC), is a software metric used to measure the size of a computer program by counting the number of lines in the text of the program's source code. SLOC is typically used to predict the am ...
(LoC).


Limits

The architecture introduces hardware complexity due to the tag-bit mechanisms and capability checks needed to enforce memory safety. Although optimizing has been implemented to minimise these impacts, the performance trade-offs can vary depending on specific workloads and specific implementations. Further, CHERI needs modifications to both software and hardware ecosystems. Implementations such as Morello allow unmodified binaries to run, but these get no added security benefits. Software must be recompiled or adapted to use CHERI's capability-based model, and hardware makers must incorporate CHERI extensions into their designs. Standardisation remains an ongoing effort. While initiatives such as the CHERI Alliance and RISC-V standardisation aim to establish broader support, the lack of widely accepted industry standards for CHERI features have delayed adoption. Adapting legacy software or retrofitting existing systems to work with CHERI can be challenging, particularly for large and heterogeneous codebases. The difficulty often stems from programming practices used during the software's original development, such as implementing custom memory management, where identifying pointers from integers can be particularly problematic.


Implementations

The CHERI architecture has been implemented across multiple platforms and projects: * ''Morello'' – Developed by Arm as part of the UKRI-funded Digital Security by Design (DSbD) programme, the Morello chip is a superset architecture designed to evaluate experimental CHERI features for potential production use on the AArch64 architecture. The Morello board supports CheriBSD, custom versions of Android, and
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
. It remains a research prototype. * ''CHERIoT'' – Introduced by Microsoft in 2023 and now developed by multiple vendors, CHERIoT is a RISC-V CHERI adaptation optimised for small embedded devices. CHERIoT is a hardware-software co-designed project and builds a custom
real-time operating system A real-time operating system (RTOS) is an operating system (OS) for real-time computing applications that processes data and events that have critically defined time constraints. A RTOS is distinct from a time-sharing operating system, such as Unix ...
(RTOS) and compartment model along with specialised hardware to provide string security guarantees. It incorporates advanced memory safety features inspired by the CHERI temporal safety projects performed on Morello. * ''Sonata'' – Developed by lowRISC and manufactured by NewAE as part of the UKRI-funded Sunburst project, the Sonata platform is an FPGA-based system designed to run RISC-V architectures. The board has an open-source design, allowing researchers and developers to modify and adapt its hardware and software. Sonata is primarily designed as a prototyping system for CHERIoT. * ''X730'' – Released by
Codasip Codasip (Abrev., abrev. CO-Design Application-Specific Instruction-set Processor) is a Processor (computing), processor technology company enabling system-on-chip developers to differentiate their products. The company specializes in RISC-V proce ...
in 2024, this processor IP is an implementation of the draft RISC-V CHERI standard for an application-class processor. * ''ICENI'' – Announced by SCI Semiconductor in 2024, ICENI is a CHERIoT-compatible microcontroller designed for secure embedded systems. CHERI implementations that target mainstream
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s are designed to accommodate both legacy and pure capability software, allowing for gradual adaptation for existing applications. CHERI has also been implemented across various hardware architectures in a research setting, including MIPS, AArch64 (via the Morello platform), and RISC-V.


History

By 2012 early CHERI prototypes were presented, These prototypes ran a microkernel with hand-written assembly for manipulating capabilities. CHERI was designed to be easy to implement on modern superscalar pipelined architectures. Unlike earlier capability systems, CHERI eliminated the need for indirection tables, avoiding the associated performance issues and proving that modern capability architectures could be efficiently implemented. In 2014 CHERI hardware demonstrated its ability to run a full UNIX-like operating system,
FreeBSD FreeBSD is a free-software Unix-like operating system descended from the Berkeley Software Distribution (BSD). The first version was released in 1993 developed from 386BSD, one of the first fully functional and free Unix clones on affordable ...
. This demonstration showed that CHERI's capability model can integrate with existing software ecosystems. CHERI was originally prototyped as an extension to MIPS-64. The implementation used 256-bit capabilities, containing fields for a 64-bit base, length, object type, and permissions, with some bits reserved for experimental purposes. In 2015 CHERI introduced a new capability encoding model that separated the address (referred to as a ''cursor'') from the bounds and permissions. This refinement allowed capabilities to function as pointers in compiled C code, improving usability. That same year, Arm joined the project and provided critical feedback, highlighting that while doubling pointer sizes might be acceptable, quadrupling them would not. This feedback led to the development of CHERI Concentrate, a compressed encoding model that reduced capability size to 128 bits by eliminating redundancy between the base, address, and top. In 2019 CheriABI demonstrated a fully memory-safe implementation of POSIX, allowing existing desktop software to become memory safe with a single recompile. By 2020 it became evident that software vendors were reluctant to port their software without hardware vendor support, while hardware vendors were unwilling to produce chips without sufficient customer demand. UK Research and Innovation (UKRI) launched the Digital Security by Design (DSbD) programme to address adoption barriers for CHERI. The programme allocated £70M, matched by £100M of industrial investment, to build the CHERI software ecosystem. This initiative funded Arm's Morello chip, a ''superset architecture'' designed to evaluate experimental CHERI features for potential production use based on
AArch64 AArch64, also known as ARM64, is a 64-bit version of the ARM architecture family, a widely used set of computer processor designs. It was introduced in 2011 with the ARMv8 architecture and later became part of the ARMv9 series. AArch64 allows ...
. The Morello board was designed to run CheriBSD, and custom versions of Android and Linux. At the same time, the Cornucopia project demonstrated that CHERI could enforce both spatial and temporal memory safety, offering deterministic protection against heap object temporal aliasing (roughly, "use-after-free"). The follow-up project, Cornucopia Reloaded, showcased efficient temporal safety using page-table features in Morello, in particular, near-negligible pause times for the application making use of revocation. In 2023 Microsoft introduced CHERIoT, a
RISC-V RISC-V (pronounced "risk-five") is an open standard instruction set architecture (ISA) based on established reduced instruction set computer (RISC) principles. The project commenced in 2010 at the University of California, Berkeley. It transfer ...
CHERI adaptation optimised for small embedded devices. CHERIoT incorporated ideas from Cornucopia and memory colouring techniques such as SPARC ADI and Arm MTE to enhance security. As part of the UKRI-funded Sunburst project, lowRISC launched the Sonata platform to advance RISC-V-based CHERI development and support standardisation efforts. Both the CHERI RISC-V research work and CHERIoT fed into the standardisation process for an official CHERI family of RISC-V extensions.
Codasip Codasip (Abrev., abrev. CO-Design Application-Specific Instruction-set Processor) is a Processor (computing), processor technology company enabling system-on-chip developers to differentiate their products. The company specializes in RISC-V proce ...
announced that they had RISC-V IP cores with CHERI extensions available to license. By 2024 SCI Semiconductors announced ICENI, a CHERIoT-compatible chip designed specifically for secure embedded systems. Codasip is actively developing a Linux kernel implementation for the RISC-V architecture. The CHERI Alliance, a non-profit organisation based in Cambridge, UK, was established to promote the adoption of CHERI technology and its integration into secure digital products and systems, including Google as a founding member.


References

{{Reflist Capability systems Computer architecture Computer memory Memory management Operating system security