# ERIM: Secure, Efficient In-process Isolation with Memory Protection Keys (MPK)

**Authors:** Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler, Peter Druschel, Deepak Garg  
**arXiv:** [1801.06822](https://arxiv.org/abs/1801.06822)  
**Date:** 2018-01-21  
**Summary page:** https://www.summarizepaper.com/en/paper/1801.06822v5/

## Key points

- Importance of isolating sensitive state and data to enhance security and robustness of applications
- Examples of safeguarding cryptographic keys and protecting language runtimes from risky native libraries
- Conventional page-based hardware isolation vs. frequent domain switching scenarios
- Introduction of ERIM as a novel technique leveraging hardware-enforced isolation with minimal overhead on x86 CPUs
- Combination of protection keys (MPKs) and binary inspection to prevent circumvention attempts
- Overhead of ERIM is less than 1% for 100,000 switches per second
- Seamless application to new and existing applications without requiring compiler modifications
- Compatibility with standard Linux kernel and low runtime overhead under high domain switching rates

## Summary

In their paper titled "ERIM: Secure, Efficient In-process Isolation with Memory Protection Keys (MPK)," authors Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler, Peter Druschel, and Deepak Garg discuss the importance of isolating sensitive state and data to enhance the security and robustness of various applications. They highlight examples such as safeguarding cryptographic keys against vulnerabilities like OpenSSL's Heartbleed bug and protecting language runtimes from potentially risky native libraries. The authors emphasize that while conventional page-based hardware isolation suffices for applications where runtime references across isolation boundaries are infrequent, certain scenarios necessitate frequent domain switching. For instance, in network-facing services requiring the isolation of cryptographic session keys, the overhead of kernel- or hypervisor-mediated domain switching becomes prohibitive. To address this challenge, the authors introduce ERIM as a novel technique that leverages hardware-enforced isolation with minimal overhead on x86 CPUs even at high switching rates. By combining protection keys (MPKs) – a recent addition to x86 architecture enabling protection domain switches in userspace – with binary inspection to prevent circumvention attempts, ERIM offers an efficient solution. The measured overhead of ERIM is less than 1% for 100,000 switches per second. Furthermore, the authors demonstrate that ERIM can be seamlessly applied to both new and existing applications without requiring compiler modifications. It is compatible with a standard Linux kernel and exhibits low runtime overhead even under high domain switching rates. This innovative approach presents a promising avenue for enhancing application security through effective in-process isolation mechanisms.
