案例研究:使用 CHERI 保护无 MMU 的 Linux
Case Study: Securing MMU-less Linux Using CHERI
AI总结:
本文提出利用 CHERI 能力系统,通过纯能力模式构建软件栈、ELF 级用户程序隔离、内核与用户能力表隔离以及 CompartOS 内核模块隔离四种机制,为无 MMU 的嵌入式 Linux 提供低成本的内存安全与隔离保障。
摘要:
无 MMU 的 Linux 变体缺乏安全性,因为它没有保护或隔离机制。它也不使用 MPU,因为 MPU 的设计缺陷(即粗粒度保护且受保护区域数量固定)使其不适合该软件模型。我们使用 CHERI 来保护现有 RISC-V 移植版本的无 MMU Linux。CHERI 是一种基于硬件-软件能力(capability)的系统,它扩展了 ISA、工具链、编程语言、操作系统和应用程序,以提供完整的指针和内存安全。我们相信,与 MMU 和 MPU 相比,CHERI 能够以更低的成本为高端动态无 MMU 嵌入式系统提供显著的安全保障,具体方式包括:1)在纯能力 CHERI C 模式下构建整个软件栈,从而在内核和用户层提供完整的空间内存安全;2)将用户程序隔离为独立的 ELF,每个 ELF 拥有自己的基于 CHERI 的能力表;这提供了类似于 MMU 所提供的空间内存安全(即用户程序无法访问彼此的内存);3)将用户程序与内核隔离,因为内核拥有独立于用户的能力表,反之亦然;4)使用 CompartOS 基于链接的隔离机制对内核模块进行划分隔离。这提供了一种当前基于 MMU 的 Linux 无法实现的新型安全防线,在这种防线中,在内核空间执行的易受攻击或恶意的内核模块(例如设备驱动程序)不会危害或拖垮整个系统。以上是本文的四个主要贡献,提出了基于 CHERI 的新型机制来保护无 MMU 的嵌入式 Linux。
英文摘要:
MMU-less Linux variant lacks security because it does not have protection or isolation mechanisms. It also does not use MPUs as they do not fit with its software model because of the design drawbacks of MPUs (\ie coarse-grained protection with fixed number of protected regions). We secure the existing MMU-less Linux version of the RISC-V port using CHERI. CHERI is a hardware-software capability-based system that extends the ISA, toolchain, programming languages, operating systems, and applications in order to provide complete pointer and memory safety. We believe that CHERI could provide significant security guarantees for high-end dynamic MMU-less embedded systems at lower costs, compared to MMUs and MPUs, by: 1) building the entire software stack in pure-capability CHERI C mode which provides complete spatial memory safety at the kernel and user-level, 2) isolating user programs as separate ELFs, each with its own CHERI-based capability table; this provides spatial memory safety similar to what the MMU offers (\ie user programs cannot access each other's memory), 3) isolating user programs from the kernel as the kernel has its own capability table from the users and vice versa, and 4) compartmentalising kernel modules using CompartOS' linkage-based compartmentalisation. This offers a new security front that is not possible using the current MMU-based Linux, where vulnerable/malicious kernel modules (\eg device drivers) executing in the kernel space would not compromise or take down the entire system. These are the four main contributions of this paper, presenting novel CHERI-based mechanisms to secure MMU-less embedded Linux.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。