An Armful of CHERIs
msrc-blog.microsoft.com
msrc-blog.microsoft.com
Wow.
> When malloc or operator new returns a new object, it will subdivide one of these capabilities and provide a pointer that gives access to precisely one object. No mechanism in the system can turn that into a pointer to another object.
Impressive. This is a game-changer, will eliminate a whole class of side -channel attacks.
Is that a confirmed statement or is that an assumption? Just wondering.
Some applications may even see improved performance, since relying on hardware bounds checking can allow software bounds checking to be elided.
That seems like a very very good trade off! Do we know any downside to it? Sorry I tend to ask for cons when things sounds too good to be true. ( Apart from the need to recompile )
I could see a Cheri V2 that uses multi level schemes for both the object lookup and the offset address to pack it back into 64 bits, but that's added complexity that's not strictly needed for an MVP of test designs.
I haven't seen any benchmark of any real application. (I might just have missed it though)
https://en.wikipedia.org/wiki/Burroughs_large_systems_descriptors
The PDP-11 minicomputer was a low-cost and undoubtably successful for its time system but a low bar for architectural sophistication or an exemplar for state of the art in computer architecture particularly in terms of memory design.CHERI is a welcome development in producing safer systems, but it is packaging ideas that have been around for 50+ years, long overdue of course, but finally hardware costs have commoditised such that these ideas can be baked into mass produced hardware.
It feels like from the outside that there was a decent sized faction at Intel in the 80s to give us a hardware object capability system, but they ended up losing the political battle, and by the time of AMD designing long mode, the last remnants were swept away.
I wish the 386's 32 bit protected mode had been structured as GDT entries that had a bit to optionally point to page tables rather than just having base addresses into a global page table. It would have encouraged these techniques in commodity systems 30 years ago.
Hell, we might not even have had spectre and at least would have had better tools to address it if we had that plus rings 1 & 2 still useable. The user and kernel space would have had the ability to describe untrusted data to the MMU. It feels like we're just pretending that NetSpectre isn't a thing and somehow spectre is only an issue with untrusted code.
Arm releases experimental CHERI-enabled Morello board - https://news.ycombinator.com/item?id=30007474 - Jan 2022 (81 comments)
We get the biggest security benefits when we rule out entire classes of vulnerability and take them away from developers needing to care about them, e.g. memory safe languages. It's particularly good that CHERI works with C and C++ code at the source level.
No offense to software developers, but the incentives to push code out as quickly as possible simply doesn't align with the need for security, even if the developer understands all the potential issues.
Say what you want about memory vulnerabilities (they're a bad thing!), I secretly like the fact that everything has an implementation bug for a determined enough attacker. It means that if you own a device and have unrestricted physical access to it -- something that only really happens if you own a device -- then you're likely able to bend its software to your will. That's what hacking is about, after all!
I worry that this architecture will end up in HDCPv3 chips, or as an embedded SOC (or chiplet) in the next x86 processors, constantly checking that everything is okay. People say that this idea leading to hating behind trusted computing is paranoid, but as every rooted Android user knows, it's not.
However, I'd rather be able to install an OS I want without needing to hack the software in the first place. We need a "right to modify" alongside other issues like "right to repair".
As for CHERIs, I have been following the research from afar and it is great to see how far they managed to come.
But I guess it can not because while the underlying allocation may have space for 100 objects, the high-level container might only have initialized the first 10 objects for example.
By the way Solaris SPARC ADI has been doing it for a decade now (bounds checking).