News for hackers. Stuff that matters.
Re:Formal CHERI: rigorous engineering and design-time proof ... by nullc on Thursday August 29, 2024 @07:55AM (#41389868)
CHERI is more powerful than memory-safe-C because it's a capability system. It's also still useful in a world where memory safe languages are common because the there is still a large amount of unsafe code that world and CHERI lets that unsafe code still maintain the guarantees the safe code relies on.

The cheri extension is rather small and simple, though isn't not extremely cheap due to the longer pointers and the tag bit.

Cheri does have an answer to temporal safety too, though it has added costs. Freed memory is not immediately reused, eventually the tagged memory is swept for references then the pointer freed memory can be reused. This is both safe and faster than you might guess because all tagged objects are capabilities and all capabilities are tagged.

The simplicity of cheri itself makes it easier to be confident that its protection is correct-- relative to the entirety of a compiler/libc/etc.

The cheri solution to use after free still kinda stinks though, so I think a combination of safer languages and cheri will be interesting in the future.

Edit: I see now that Fil-c is also a capabilities system. Thanks for bringing it to my attention.

Re:Formal CHERI: rigorous engineering and design-time proof ... by pizlonator on Thursday August 29, 2024 @10:12AM (#41391025)
> The simplicity of cheri itself makes it easier to be confident that its protection is correct-- relative to the entirety of a compiler/libc/etc.

To get confidence in Fil-C’s safety, you don’t have to prove anything about the libc because the libc is compiled with Fil-C.

You have to prove stuff about the compiler and Fil-C’s runtime. The runtime is about 100KLoC.