Skip to main content
QUICK REVIEW

[Paper Review] IskiOS: Intra-kernel Isolation and Security using Memory Protection Keys

Spyridoula Gravani, Mohammad Hedayati|arXiv (Cornell University)|Mar 11, 2019
Security and Verification in ComputingComputer Science70 references2 citations
TL;DR

This paper introduces IskiOS, a Linux variant that leverages Intel's Protection Keys for Userspace (PKU) in kernel mode via a novel mechanism called Protection Keys for Kernelspace (PKK), enabling efficient intra-kernel isolation. It achieves this by repurposing PKU to secure kernel memory, demonstrating execute-only memory (XOM) and race-free shadow stacks with only 11% average overhead on microbenchmarks and under 5% on full application workloads.

ABSTRACT

Operating system (OS) kernels such as Windows, Linux, and MacOS are vulnerable to control-flow hijacking. Defenses exist, but many require efficient intra-address space isolation. For example, execute-only memory requires read protection of code segments, and shadow stacks require write protection from buffer overwrites. Intel's Protection Keys for Userspace (PKU) could, in principle, provide the intra-kernel isolation needed to implement such features, but, when used as designed, it applies only to user-mode application code. This paper presents an unconventional approach to memory protection, allowing PKU to be used within the OS kernel on existing Intel hardware, replacing the traditional user/kernel isolation mechanism and, simultaneously, enabling efficient intra-kernel isolation. We call the resulting mechanism Protection Keys for Kernelspace (PKK). To demonstrate its utility and efficiency, we present a system we call IskiOS: a Linux variant featuring execute-only memory (XOM) and the first-ever race-free shadow stacks for x86-64. Experiments with the LMBench kernel microbenchmarks display an average overhead of about 11% for PKK and no additional overhead for XOM. IskiOS's shadow stacks bring the total to 22%. For full applications, experiments with the system benchmarks of the Phoronix test suite display negligible overhead for PKK and XOM, and less than 5% for shadow stacks.

Motivation & Objective

  • To address the vulnerability of OS kernels to control-flow hijacking attacks.
  • To enable efficient intra-kernel isolation for security mechanisms like execute-only memory and shadow stacks.
  • To adapt Intel's user-mode Protection Keys (PKU) for use within the kernel on existing x86-64 hardware.
  • To replace traditional user/kernel isolation with a unified, more secure memory protection model.
  • To demonstrate practical performance with minimal runtime overhead for security-hardened kernel features.

Proposed method

  • Repurpose Intel's Protection Keys for Userspace (PKU) for kernel-mode memory protection, creating a new mechanism called Protection Keys for Kernelspace (PKK).
  • Modify the kernel's memory management to assign protection keys to kernel text and data segments, enforcing read, write, or execute permissions.
  • Implement execute-only memory (XOM) by applying read protection to code segments using PKK, preventing code execution from writable memory.
  • Build race-free shadow stacks by using write protection on stack memory, ensuring integrity against buffer overflow attacks.
  • Integrate PKK into the Linux kernel with minimal changes to existing code, maintaining compatibility with existing hardware and system calls.
  • Evaluate performance using LMBench microbenchmarks and Phoronix test suite workloads to measure overhead across security features.

Experimental results

Research questions

  • RQ1Can Intel's Protection Keys for Userspace (PKU) be effectively repurposed for intra-kernel memory protection?
  • RQ2What is the performance overhead of enabling execute-only memory (XOM) and race-free shadow stacks using PKK in the kernel?
  • RQ3Can PKK replace traditional user/kernel isolation while maintaining or improving security?
  • RQ4How does the overhead of PKK and its security features compare across microbenchmarks and real-world application workloads?
  • RQ5Is it feasible to implement race-free shadow stacks on x86-64 using existing hardware protection mechanisms?

Key findings

  • The PKK mechanism achieves an average overhead of 11% on LMBench kernel microbenchmarks for the combined use of PKK and execute-only memory (XOM).
  • Execute-only memory (XOM) incurs no additional overhead beyond PKK, demonstrating efficient enforcement via protection keys.
  • Shadow stacks add less than 5% overhead on full application benchmarks using the Phoronix test suite, indicating strong practicality.
  • The system demonstrates the first-ever race-free shadow stacks on x86-64, achieved through precise write protection using PKK.
  • PKK enables secure intra-kernel isolation without requiring new hardware, making it deployable on existing Intel x86-64 systems.
  • Performance results show negligible overhead for PKK and XOM on real-world workloads, validating the approach for production use.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.