Skip to main content
QUICK 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 Computing参考文献 70被引用 2
一句话总结

该论文提出 IskiOS,一种基于 Linux 的变体,通过一种名为保护键内核空间(PKK)的新机制,在内核模式下利用英特尔用户空间保护键(PKU)实现高效的内核内隔离。该机制通过重新利用 PKU 保护内核内存,实现了仅在微基准测试中平均增加 11% 开销、在完整应用工作负载中低于 5% 开销的执行仅限内存(XOM)和无竞争的影子栈。

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.

研究动机与目标

  • 解决操作系统内核对控制流劫持攻击的脆弱性。
  • 为安全机制(如执行仅限内存和影子栈)提供高效的内核内隔离。
  • 将英特尔用户态保护键(PKU)适配用于现有 x86-64 硬件上的内核内部使用。
  • 以统一且更安全的内存保护模型替代传统的用户/内核隔离。
  • 在实际运行中实现极低的运行时开销,验证安全增强型内核功能的可行性。

提出的方法

  • 重新利用英特尔用户空间保护键(PKU)实现内核模式内存保护,提出一种新机制——内核空间保护键(PKK)。
  • 修改内核内存管理机制,为内核代码和数据段分配保护键,强制实施读取、写入或执行权限。
  • 通过在代码段上应用读取保护(使用 PKK)实现执行仅限内存(XOM),防止从可写内存执行代码。
  • 通过在栈内存上使用写入保护构建无竞争影子栈,确保对缓冲区溢出攻击的完整性。
  • 以最小改动将 PKK 集成到 Linux 内核中,保持与现有硬件和系统调用的向后兼容性。
  • 使用 LMBench 微基准测试和 Phoronix 测试套件工作负载评估性能,测量各项安全功能的开销。

实验结果

研究问题

  • RQ1英特尔用户空间保护键(PKU)能否被有效重新用于内核内内存保护?
  • RQ2在内核中使用 PKK 启用执行仅限内存(XOM)和无竞争影子栈的性能开销是多少?
  • RQ3PKK 是否能够在保持或提升安全性的同时替代传统的用户/内核隔离?
  • RQ4PKK 及其安全功能在微基准测试与真实应用工作负载之间的开销表现如何比较?
  • RQ5在现有硬件保护机制下,是否可行实现在 x86-64 架构上的无竞争影子栈?

主要发现

  • PKK 机制在 LMBench 内核微基准测试中,对 PKK 与执行仅限内存(XOM)联合使用实现了平均 11% 的开销。
  • 执行仅限内存(XOM)的开销仅来自 PKK,无额外开销,表明保护键可高效强制执行。
  • 在使用 Phoronix 测试套件的完整应用基准测试中,影子栈开销低于 5%,表明其具有良好的实用性。
  • 该系统首次在 x86-64 架构上实现了无竞争影子栈,通过 PKK 精确的写入保护实现。
  • PKK 实现了无需新硬件的内核内安全隔离,可在现有英特尔 x86-64 系统上直接部署。
  • 性能结果显示,真实工作负载中 PKK 和 XOM 的开销可忽略不计,验证了该方法在生产环境中的可行性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。