Re:Low-Level Software Security for Compiler Developers
by convolvatron on Monday February 20, 2023 @09:03PM
(#34875563)
hardware pointer type would be pretty cool too
[ Parent
| on HN ]
Re:Low-Level Software Security for Compiler Developers
by wyldfire on Monday February 20, 2023 @11:17PM
(#34876509)
Once the data escapes the CPU via a load or store, it's hard to enforce something like a "type" in hardware. ALU instructions operating on what appears to be integers could easily have been operating unknowingly on virtual addresses. Even if you used the "integer add" instruction, there's no way for it to know that it didn't just index into a buffer using a virtual address as a base.
However there are cooperative ISA features -- between compiler and CPU -- these can be used to constrain untrusted attackers. See ARM PAC, e.g.
Re:Low-Level Software Security for Compiler Developers
by convolvatron on Tuesday February 21, 2023 @01:42PM
(#34884982)
the point is to put a guard when performing indirection, that checks a type bit in the register. setting this bit is a privileged operation. unprivileged address arithmetic can be performed if addresses also contain a bound.
but the whole point is that you just cant hand any integer to the hardware and ask it to fetch.
Re:Low-Level Software Security for Compiler Developers
by fuklief on Tuesday February 21, 2023 @03:58AM
(#34878583)
See CHERI and Arm Morello https://www.arm.com/blogs/blueprint/morello