Content deleted Content added
Guy Harris (talk | contribs) Combine duplicate references. Use {{cite magazine}} for a magazine article. Add author. |
Anomalocaris (talk | contribs) m dash; straight apostrophes; improve <ref>s; standardize {{cite}} whitespace: unspaced equals, space before not after pipe |
||
Line 1:
{{Short description|Computer architecture for security}}
{{use dmy dates|date=January 2025}]
'''Capability Hardware Enhanced RISC Instructions''' ('''CHERI''') is a computer processor technology designed to improve security. CHERI aims to address the root cause of the problems that are caused by a lack of [[memory safety]] in common implementations of languages such as [[C (programming language)|C]]/[[C++]], which are responsible for around 70% of security vulnerabilities in modern systems.<ref>{{cite web |url=https://www.zdnet.com/article/chrome-70-of-all-security-bugs-are-memory-safety-issues/ |publisher=ZDNet |title=Chrome: 70% of all security bugs are memory safety issues |
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]], dividing processes into compartments that limit the damage that a bug (security or otherwise) can do.
Line 7 ⟶ 8:
CHERI can be added to many different [[instruction set architecture]][[instruction set architecture|s]] including [[MIPS architecture|MIPS]], [[AArch64]], and [[RISC-V]], making it usable across a wide range of platforms.
Software must be recompiled to use CHERI, but most software requires few (if any) changes to the source code.<ref name="ecosystemviability">{{cite tech report |title=Assessing the Viability of an Open-Source CHERI Desktop Software Ecosystem |author1=Robert N. M. Watson |author2=Ben Laurie |author3=Alex Richardson |date=17 September 2021 |publisher=Capabilities Ltd |url=https://www.cl.cam.ac.uk/research/security/ctsrd/pdfs/20210917-capltd-cheri-desktop-report-version1-FINAL.pdf}}</ref>
== Background ==
CHERI is a [[Capability-based addressing|capability]] architecture.<ref name=isca /> Early capability architectures, such as the [[CAP computer]] and [[Intel iAPX 432]], demonstrated secure memory management but were hindered by performance overheads and complexity.<ref name="capbook">{{cite book |last=Levy |first=Henry M. |year=1984 |title=Capability-based computer systems |url=https://archive.org/details/capabilitybasedc0000levy |___location=Bedford, Mass. |publisher=Digital Press |isbn=978-1483107400 |access-date=24 January 2025}}</ref> As systems became faster and more complex, vulnerabilities like [[Buffer overflow|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.
== Mechanism ==
Line 21:
Implementations of CHERI systems also include modifications to the default [[Memory management|memory allocator]]. A memory allocator is a component that defines that a range of addresses should be treated by the programmer as an object. 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.<ref>{{Cite conference |last1=Bramley |first1=Jacob |last2=Jacob |first2=Dejice |last3=Lascu |first3=Andrei |last4=Singer |first4=Jeremy |last5=Tratt |first5=Laurence |title=Picking a CHERI Allocator: Security and Performance Considerations |date=2023-06-06 |book-title=Proceedings of the 2023 ACM SIGPLAN International Symposium on Memory Management |url=https://eprints.gla.ac.uk/297961/1/297961.pdf |series=ISMM 2023 |___location=New York, NY, USA |publisher=Association for Computing Machinery |pages=111–123 |doi=10.1145/3591195.3595278 |isbn=979-8-4007-0179-5}}</ref> It may also communicate the ''lifetime'', to prevent use-after-free or use-after-reuse bugs.<ref name="cornucopiareloaded">{{cite conference |author1=Nathaniel Wesley Filardo |author2=Brett F. Gutstein |author3=Jonathan Woodruff |author4=Jessica Clarke |author5=Peter Rugg |author6=Brooks Davis |author7=Mark Johnston |author8=Robert Norton |author9=David Chisnall |author10=Simon W. Moore |author11=Peter G. Neumann |author12=Robert N. M. Watson |date=2024 |title=Cornucopia Reloaded: Load Barriers for CHERI Heap Temporal Safety |book-title=Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2 (ASPLOS '24) |volume=2 |publisher=Association for Computing Machinery |___location=New York, NY, USA |pages=251–268 |doi=10.1145/3620665.3640416 |url=https://doi.org/10.1145/3620665.3640416}}</ref><ref name="cheriot">{{cite conference |author1=Saar Amar |author2=David Chisnall |author3=Tony Chen |author4=Nathaniel Wesley Filardo |author5=Ben Laurie |author6=Kunyan Liu |author7=Robert Norton |author8=Simon W. Moore |author9=Yucong Tao |author10=Robert N. M. Watson |author11=Hongyan Xia |date=2023 |title=CHERIoT: Complete Memory Safety for Embedded Devices |book-title=Proceedings of the 56th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO '23) |publisher=Association for Computing Machinery |___location=New York, NY, USA |pages=641–653 |doi=10.1145/3613424.3614266 |url=https://doi.org/10.1145/3613424.3614266}}</ref><ref name="pdp11">{{cite conference |author1=David Chisnall |author2=Colin Rothwell |author3=Robert N.M. Watson |author4=Jonathan Woodruff |author5=Munraj Vadera |author6=Simon W. Moore |author7=Michael Roe |author8=Brooks Davis |author9=Peter G. Neumann |date=2015 |title=Beyond the PDP-11: Architectural Support for a Memory-Safe C Abstract Machine |book-title=Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '15) |publisher=Association for Computing Machinery |___location=New York, NY, USA |pages=117–130 |doi=10.1145/2694344.2694367 |url=https://doi.org/10.1145/2694344.2694367}}</ref>
Depending on the context, CHERI systems can be used to enhance compiler-level checks, build [[Trusted execution environment|secure enclaves]],<ref>{{Cite conference |last1=Van Strydonck |first1=Thomas |last2=Noorman |first2=Job |last3=Jackson |first3=Jennifer |last4=Alves Dias |first4=Leonardo |last5=Vanderstraeten |first5=Robin |last6=Oswald |first6=David |last7=Piessens |first7=Frank |last8=Devriese |first8=Dominique |title=CHERI-TrEE: Flexible enclaves on capability machines |date=2023-07-01 |conference=2023 IEEE 8th European Symposium on Security and Privacy (EuroS&P) |url=https://lirias.kuleuven.be/retrieve/715646/ |publisher=IEEE |pages=1143–1159 |doi=10.1109/EuroSP57164.2023.00070 |isbn=978-1-6654-6512-0}}</ref> or even be used to augment existing instruction architectures. A report by Microsoft in 2019 found that
== Limitations ==
The architecture introduces hardware complexity due to the tag-bit mechanisms and capability checks required for enforcing memory safety. Although optimisations have been implemented to minimise these impacts<ref name=":1" />, the performance trade-offs can vary depending on specific workloads and specific implementations. Additionally, CHERI requires modifications to both software and hardware ecosystems. Implementations such as Morello allow unmodified binaries to run but these do not get any additional security benefits. Software must be recompiled or adapted to utilise
Standardisation remains an ongoing effort. While initiatives such as the CHERI Alliance and RISC-V standardisation<ref name=":2" /> 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.<ref>{{cite journal |author1=Robert N.M. Watson |author2=David Chisnall |author3=Jessica Clarke |author4=Brooks Davis |author5=Nathaniel Wesley Filardo |author6=Ben Laurie |author7=Simon W. Moore |author8=Peter G. Neumann |author9=Alexander Richardson |author10=Peter Sewell |author11=Konrad Witaszczyk |author12=Jonathan Woodruff |title=CHERI: Hardware-Enabled C/C++ Memory Protection at Scale |journal=IEEE Security & Privacy |volume=22 |issue=4 |pages=50–61 |date=July–August 2024|doi=10.1109/MSEC.2024.3396701 }}</ref>
Line 32:
* '''Morello''': Developed by Arm as part of the UKRI-funded Digital Security by Design (DSbD) programme,<ref>{{cite web |url=https://www.arm.com/architecture/cpu/morello |title=Arm Morello Program |access-date=9 January 2025}}</ref><ref>{{cite web |last1=Robinson |first1=Dan |title=How Arm popped CHERI architecture into Morello Program hardware |url=https://www.theregister.com/2022/08/26/arm_cheri_morello/ |publisher=The Register |access-date=11 January 2025}}</ref> 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. It remains a research prototype.
* '''CHERIoT''':<ref name="cheriot" /> Introduced by Microsoft in 2023<ref>{{cite tech report |author1=Saar Amar |author2=Tony Chen |author3=David Chisnall |author4=Felix Domke |author5=Nathaniel Filardo |author6=Kunyan Liu |author7=Robert Norton-Wright |author8=Yucong Tao |author9=Robert N. M. Watson |author10=Hongyan Xia |title=CHERIoT: Rethinking security for low-cost embedded systems |id=MSR-TR-2023-6 |date=February 2023 |publisher=Microsoft |url=https://www.microsoft.com/en-us/research/publication/cheriot-rethinking-security-for-low-cost-embedded-systems/}}</ref> and now developed by multiple vendors,<ref>{{cite web
* '''Sonata''':<ref>{{cite web |url=https://www.sunburst-project.org |
* '''ICENI''': Announced by SCI Semiconductors in 2024,<ref name="iceni" /> ICENI is a CHERIoT-compatible microcontroller designed for secure embedded systems.
CHERI implementations that target mainstream operating systems, are designed to accommodate both legacy and pure capability software, to allow for gradual adaptation for existing applications. CHERI has also been implemented across various hardware architectures in a research setting, including MIPS,<ref name=isca /> AArch64 (via the Morello platform), and RISC-V.<ref>{{cite web
== History ==
Line 43:
In 2010 DARPA launched the Clean-slate design of Resilient, Adaptive, Secure Hosts (CRASH) programme,<ref>{{cite web |year=2010 |title=CRASH: Clean-slate design of Resilient, Adaptive, Secure Hosts |url=https://www.darpa.mil/research/programs/clean-slate-design-of-resilient-adaptive-secure-hosts |access-date=18 January 2025 |publisher=DARPA}}</ref><ref>{{cite web |date=21 December 2012 |title=DARPA's CRASH Program Reinvents The Computer For Better Security |url=https://breakingdefense.com/2012/12/darpa-crash-program-seeks-to-reinvent-computers-for-better-secur/ |access-date=18 January 2025 |publisher=Breaking Defence}}</ref> which tasked participants with redesigning computer systems to improve security. [[SRI International]] and [[University of Cambridge]] team revisited capability architectures, seeking to address memory safety challenges inherent in conventional designs.
By 2012 early CHERI prototypes were presented,<ref>{{cite conference |author1=Robert N.M. Watson |author2=Peter G. Neumann |author3=Jonathan Woodruff |author4=Jonathan Anderson |author5=Ross Anderson |author6=Nirav Dave |author7=Ben Laurie |author8=Simon W. Moore |author9=Steven J. Murdoch |author10=Philip Paeps |author11=Michael Roe |author12=Hassen Saidi |title=CHERI: a research platform deconflating hardware virtualization and protection |conference=Workshop on Runtime Environments, Systems, Layering and Virtualized Environments (RESoLVE 2012) |date=
In 2014 CHERI hardware demonstrated its ability to run a full UNIX-like operating system, [[FreeBSD]]. This demonstration showed that
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,<ref name="pdp11" /> 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,<ref name=":1">{{cite journal |author1=Jonathan Woodruff |author2=Alexandre Joannou |author3=Hongyan Xia |author4=Anthony Fox |author5=Robert Norton |author6=Thomas Bauereiss |author7=David Chisnall |author8=Brooks Davis |author9=Khilan Gudka |author10=Nathaniel W. Filardo |author11=A. Theodore Markettos |author12=Michael Roe |author13=Peter G. Neumann |author14=Robert N. M. Watson |author15=Simon W. Moore |title=CHERI Concentrate: Practical Compressed Capabilities |journal=IEEE Transactions on Computers |doi=10.1109/TC.2019.2914037 |publisher=IEEE |date=2019|volume=68 |issue=10 |pages=1455–1469 |url=https://www.repository.cam.ac.uk/handle/1810/292406 }}</ref> a compressed encoding model that reduced capability size to 128 bits by eliminating redundancy between the base, address, and top.
Line 53:
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<ref name="dsbd">{{cite web |author=<!-- not stated --> |year=2020 |title=Digital security by design |url=https://www.ukri.org/what-we-do/browse-our-areas-of-investment-and-support/digital-security-by-design/ |access-date=2025-01-18 |publisher=UK Research and Innovation}}</ref> to address adoption barriers for CHERI. The programme allocated £70M, matched by £100M of industrial investment, to build the CHERI software ecosystem.<ref name="dsbd" />
This initiative funded
In 2023 Microsoft introduced CHERIoT<ref name="cheriot" />, a [[RISC-V]] 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.<ref name=":2">{{cite web |title=CHERI Ratification Plan |url=https://lf-riscv.atlassian.net/wiki/spaces/CTXX/pages/47022116/CHERI+Ratification+Plan |access-date=10 January 2025}}</ref> Codasip announced that they had RISC-V IP cores with CHERI extensions available to license.<ref>{{cite web |url=https://www.eenewseurope.com/en/codasip-delivers-first-commercial-cheri-processor-using-risc-v/
By 2024 SCI Semiconductors announced ICENI,<ref name=iceni>{{cite web |last1=Flaherty |first1=Nick |date=23 October 2024 |title=First CHERI RISC-V embedded chip and Early Access Programme |url=https://www.eenewseurope.com/en/first-cheri-risc-v-embedded-chip-and-early-access-programme/ |access-date=11 January 2025 |publisher=eeNews Europe}}</ref> a CHERIoT-compatible chip designed specifically for secure embedded systems. Codasip is actively developing a Linux kernel implementation for the RISC-V architecture.<ref>{{cite web |url=https://codasip.com/press-release/2024/10/21/codasip-enables-secure-linux-by-donating-cheri-risc-v-sdk-to-the-cheri-alliance/ |title=
==References==
|