Skip to main content
QUICK REVIEW

[论文解读] CompartOS: CHERI Compartmentalization for Embedded Systems

Hesham Almatary, Michael V. Dodson|arXiv (Cornell University)|Jun 6, 2022
Security and Verification in Computing被引用 6
一句话总结

CompartOS 引入了一种轻量级、基于链接的软件隔离模型,用于高端嵌入式系统,利用 CHERI 能力硬件实现细粒度、可扩展且确定性的保护。其保护域切换速度比基于 MPU 的 IPC 快 95%,TCP 吞吐量开销降低至 15%,而基于 MPU 的系统为 52%。同时,它捕获了 13 个 FreeRTOS-TCP 漏洞中的 10 个,而基于 MPU 的模型未能发现。

ABSTRACT

Existing high-end embedded systems face frequent security attacks. Software compartmentalization is one technique to limit the attacks' effects to the compromised compartment and not the entire system. Unfortunately, the existing state-of-the-art embedded hardware-software solutions do not work well to enforce software compartmentalization for high-end embedded systems. MPUs are not fine-grained and suffer from significant scalability limitations as they can only protect a small and fixed number of memory regions. On the other hand, MMUs suffer from non-determinism and coarse-grained protection. This paper introduces CompartOS as a lightweight linkage-based compartmentalization model for high-end, complex, mainstream embedded systems. CompartOS builds on CHERI, a capability-based hardware architecture, to meet scalability, availability, compatibility, and fine-grained security goals. Microbenchmarks show that CompartOS' protection-domain crossing is 95% faster than MPU-based IPC. We applied the CompartOS model, with low effort, to complex existing systems, including TCP servers and a safety-critical automotive demo. CompartOS not only catches 10 out of 13 FreeRTOS-TCP published vulnerabilities that MPU-based protection (e.g., uVisor) cannot catch but can also recover from them. Further, our TCP throughput evaluations show that our CompartOS prototype is 52% faster than relevant MPU-based compartmentalization models (e.g., ACES), with a 15% overhead compared to an unprotected system. This comes at an FPGA's LUTs overhead of 10.4% to support CHERI for an unprotected baseline RISC-V processor, compared to 7.6% to support MPU, while CHERI only incurs 1.3% of the registers area overhead compared to 2% for MPU.

研究动机与目标

  • 解决大型、复杂、实时嵌入式系统中缺乏可扩展、细粒度且确定性的软硬件安全机制的问题。
  • 克服主流实时操作系统中广泛使用的基于 MPU 解决方案的局限性,如粗粒度保护和可扩展性差。
  • 通过避免源代码修改或语言迁移,实现与现有代码库的兼容性,同时保持实时确定性。
  • 为汽车和航空电子平台等关键安全系统提供一种实用、低开销的保护方案。
  • 证明基于 CHERI 的隔离机制能够支持从漏洞中部分恢复,从而提高系统可用性。

提出的方法

  • 利用 CHERI 能力硬件强制实施细粒度、类型安全的内存访问和保护边界。
  • 采用基于链接的模型对现有软件组件进行隔离,无需重构或更改编程语言。
  • 利用 CHERI 的边界检查和基于能力的访问控制,检测并遏制缓冲区溢出和内存破坏攻击。
  • 引入自定义故障处理程序,隔离并恢复受损的组件(如 TCP/IP 栈),而无需停止整个系统。
  • 利用 CHERI 的全局指针(CGP)和能力验证机制,实时检测并阻止未经授权的内存访问。
  • 通过微基准测试和真实系统(包括 FreeRTOS-TCP 和汽车演示系统)评估性能与安全性。

实验结果

研究问题

  • RQ1基于 CHERI 的隔离能否为大型、复杂嵌入式系统提供细粒度、可扩展且确定性的保护,而这些系统正是基于 MPU 的解决方案所无法满足的?
  • RQ2CompartOS 在实现自动漏洞检测与恢复的同时,能在多大程度上保持源代码兼容性和实时确定性?
  • RQ3在利用场景下,CompartOS 与基于 MPU 的模型相比,在性能、安全覆盖范围和系统可用性方面表现如何?
  • RQ4CompartOS 是否能够在不进行全系统重启的情况下,实现对关键漏洞(如 TCP/IP 栈中的漏洞)的部分恢复?
  • RQ5与 MPU 相比,集成 CHERI 用于隔离的硬件成本(以 LUT 和寄存器面积计)是多少?

主要发现

  • 与基于 MPU 的 IPC 相比,CompartOS 将保护域切换延迟降低了 95%,实现亚 22 微秒的故障处理时间。
  • 系统检测并遏制了 13 个 FreeRTOS-TCP 漏洞中的 10 个,而基于 MPU 的解决方案(如 uVisor)未能发现。
  • CompartOS 的 TCP 吞吐量比基于 MPU 的模型(如 ACES)快 52%,且仅产生 15% 的开销,而未受保护的系统为 100%。
  • 在 FPGA 上,CompartOS 的 LUT 开销为 10.4%,而 MPU 为 7.6%;寄存器面积开销为 1.3%,而 MPU 为 2%。
  • 受损的 TCP/IP 栈可在 1 秒内重启,对实时组件影响极小;而非隔离系统至少需要 2 秒,且会停止所有操作。
  • CompartOS 的故障处理程序成功在不修改源代码的情况下隔离并恢复了内存破坏攻击,同时保持了系统可用性和实时性保证。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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