Conversation

Interesting thread on trade-offs for ARM64 memory mappings with security mitigations. I personally also like PAC (CC ) because of the potential to protect much more than the stack and return pointers. usenix.org/conference/use is an excellent step towards that ().
Quote Tweet
Linux on 64-bit ARM is most commonly used with 4k pages and 3-level page tables. This results in a 39-bit address space rather than the full 64-bit address space. It's possible to use 4-level page tables and then you get a 48-bit address space like you typically have on x86_64.
Show this thread
2
5
Detecting memory corruption of data directly with memory tagging goes a long way and overall I'd rather have more memory tagging bits and more address space for shadow regions, quarantines, etc. Deterministic memory tagging can't be bypassed by information leaks or brute force.
1
So, for example, you can reserve tags for marking free data, shadow stacks or other internal metadata, 16 byte granularity hardware canaries rather than 4k pages and other memory. Can either use hardware canaries or guarantee adjacent allocations have different tags, and so on.
1
39-bit address is already very inadequate for GrapheneOS due to using strict partitions for different size classes in hardened_malloc along with quarantining the address space for large allocations. This is already going to be impractical to keep doing without more address space.
1
So, even aside from growing memory usage of applications, there are many other uses for more address space such as dividing up the allocations for data with function pointers and data without them. Splitting things up this way isn't only a probabilistic mitigation either.
1
I find it frustrating to have a security feature that's heavily in conflict with other security features. Using pointer authentication properly on GrapheneOS will probably mean needing to give up on current security properties. Larger pages aren't an option without app support.
1
Show replies