Linux
Linux Security Techniques
Synthetic Memory Protections: An update on ROP mitigations
Features Presented by GRSecurity
HARDENED_USERCOPY: validatescopy_from_userandcopy_to_useroperations to prevent invalid copies that overflow heap objects or stack buffers.SLAB_FREELIST_HARDENED: obfuscates slab freelist pointers, making allocator corruption harder to exploit.SLAB_FREELIST_RANDOM: randomizes freelist order for new slab pages, reducing heap-layout predictability.
AUTOSLAB
How AUTOSLAB Changes the Memory Unsafety Game
AUTOSLAB is an isolation-based approach in which each generic allocation site, such as a k*alloc* call, uses its own dedicated memory cache.
Key properties:
- Only objects of the same type can become adjacent.
- Isolating objects in different caches prevents a freed vulnerable object from being reclaimed by an unrelated spray object.
Limitations:
- It requires manual effort to annotate wrappers and inline them.
- Cross-cache attacks may still bypass the protection.
Performance: a kernel with AUTOSLAB enabled was reported to run about 0.08% slower than one without it.
Same-Type Object Reuse
Canary in the Kernel Mine: Exploiting and Defending Against Same-Type Object Reuse
A representative target is a dangling file object.
Linux file objects use a dedicated slab cache.