A Formal CHERI-C Semantics for Verification

11/14/2022
by   Seung Hoon Park, et al.
0

CHERI-C extends the C programming language by adding hardware capabilities, ensuring a certain degree of memory safety while remaining efficient. Capabilities can also be employed for higher-level security measures, such as software compartmentalization, that have to be used correctly to achieve the desired security guarantees. As the extension changes the semantics of C, new theories and tooling are required to reason about CHERI-C code and verify correctness. In this work, we present a formal memory model that provides a memory semantics for CHERI-C programs. We present a generalised theory with rich properties suitable for verification and potentially other types of analyses. Our theory is backed by an Isabelle/HOL formalisation that also generates an OCaml executable instance of the memory model. The verified and extracted code is then used to instantiate the parametric Gillian program analysis framework, with which we can perform concrete execution of CHERI-C programs. The tool can run a CHERI-C test suite, demonstrating the correctness of our tool, and catch a good class of safety violations that the CHERI hardware might miss.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/28/2018

KRust: A Formal Executable Semantics of Rust

Rust is a new and promising high-level system programming language. It p...
research
12/26/2022

Modular Formal Verification of Rust Programs with Unsafe Blocks

Rust is a modern systems programming language whose type system guarante...
research
11/27/2012

On the Use of Underspecified Data-Type Semantics for Type Safety in Low-Level Code

In recent projects on operating-system verification, C and C++ data type...
research
03/16/2023

Formally Verified Animation for RoboChart using Interaction Trees

RoboChart is a core notation in the RoboStar framework. It is a timed an...
research
08/29/2022

MSWasm: Soundly Enforcing Memory-Safe Execution of Unsafe Code

Most programs compiled to WebAssembly (Wasm) today are written in unsafe...
research
03/01/2022

Relaxed virtual memory in Armv8-A (extended version)

Virtual memory is an essential mechanism for enforcing security boundari...
research
09/08/2023

A Grounded Conceptual Model for Ownership Types in Rust

Programmers learning Rust struggle to understand ownership types, Rust's...

Please sign up or login with your details

Forgot password? Click here to reset