Safe Speculation for CHERI
Authors:
- 18 November 2024
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 364-372
Abstract
We present an architectural Capability Speculation Contract (CSC) for CHERI implementations, test for violations in the CHERI-Toooba microarchitecture, and develop and evaluate a conforming implementation. The CHERI capability instruction-set extension promises proven architectural guarantees for memory safety and pointer provenance. However, superscalar and out-of-order CHERI implementations will need to contend with microarchitectural transient-execution side-channel attacks. To ensure the safety of all CHERI implementations, we articulate CSC: a universal architectural speculation contract for the CHERI architecture that maintains key capability invariants in speculation. We then develop tests against sub-classes of CSC, and discover violations in CHERI-Toooba that lead to a new class of transient-execution attacks, Meltdown-CF (Capability Forgery) for which we develop a user-mode exploit that allows reads of secret data. We then develop strategies to fully enforce CSC in CHERI-Toooba. We find that simplistic, strong enforcement in-curs a low performance overhead of only 3.43% in SPECint2006 benchmarks, with promise for more optimal designs in the future. Our architectural recommendations to mitigate Meltdown-CF have been accepted by the upstream CHERI architecture and are included in current CHERI-RISC-V drafts for ratification.Keywords
Funding Information
- Engineering and Physical Sciences Research Council (EP/S030867/1)
- Air Force Research Laboratory (AFRL)
- Defense Advanced Research Projects Agency (DARPA) (FA8750-24-C-B047,HR0011-18-C-0016,HR0011-22-C-0110)
This publication has 15 references indexed in Scilit:
- Spectre Returns! Speculation Attacks Using the Return Stack BufferIEEE Design & Test, 2024
- Architectural Contracts for Safe Speculation2023
- The Arm Morello Evaluation Platform—Validating CHERI-Based Security in a High-Performance SystemIEEE Micro, 2023
- Randomized Testing of RISC-V CPUs Using Direct Instruction InjectionIEEE Design & Test, 2023
- Hardware-Software Contracts for Secure Speculation2021
- LVI: Hijacking Transient Execution through Microarchitectural Load Value Injection2020
- Rigorous engineering for hardware security: Formal modelling and proof in the CHERI design and implementation process2020
- Spectre Attacks: Exploiting Speculative Execution2019
- ret2spec2018
- Composable Building Blocks to Open up Processor Design2018