{"title":"Case Study: Securing Embedded Linux Using CHERI","authors":"Hesham Almatary","doi":"arxiv-2310.00933","DOIUrl":null,"url":null,"abstract":"The current embedded Linux variant lacks security as it does not have or use\nMMU support. It does not also use MPUs as they do not fit with its software\nmodel because of the design drawbacks of MPUs (i.e., coarse-grained protection\nwith fixed number of protected regions). We secure the existing embedded Linux\nversion of the RISC-V port using CHERI. CHERI is hardware-software\ncapability-based system that leverages the ISA, toolchain, programming\nlanaguages, operating systems, and applications in order to provide complete\npointer and memory safety. We believe that CHERI could provide significant\nsecurity guarantees for high-end dynamic embedded systems at lower costs,\ncompared to MMUs and MPUs, by: 1) building the entire software stack in\npure-capability CHERI C mode which provides complete spatial memory safety at\nthe kernel and user-level, 2) isolating user programs as separate ELFs, each\nwith its own CHERI-based capability table; this provides spatial memory safety\nsimilar to what the MMU offers (i.e., user programs cannot access each other's\nmemory), 3) isolating user programs from the kernel as the kernel has its own\ncapability table from the users and vice versa, and 4) compartmentalising\nkernel modules using CompartOS' linkage-based compartmentalisation. This offers\na new security front that is not possible using the current MMU-based Linux,\nwhere vulnerable/malicious kernel modules (e.g., device drivers) executing in\nthe kernel space would not compromise or take down the entire system. These are\nthe four main contributions of this paper, presenting novel CHERI-based\nmechanisms to secure embedded Linux.","PeriodicalId":501333,"journal":{"name":"arXiv - CS - Operating Systems","volume":"25 2","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-10-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Operating Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2310.00933","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
The current embedded Linux variant lacks security as it does not have or use
MMU support. It does not also use MPUs as they do not fit with its software
model because of the design drawbacks of MPUs (i.e., coarse-grained protection
with fixed number of protected regions). We secure the existing embedded Linux
version of the RISC-V port using CHERI. CHERI is hardware-software
capability-based system that leverages the ISA, toolchain, programming
lanaguages, 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 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 (i.e., 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 (e.g., 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 embedded Linux.