Skip to main content
QUICK REVIEW

[Paper Review] Good Motive but Bad Design: Why ARM MPU Has Become an Outcast in Embedded Systems

Wei Zhou, Le Guan|arXiv (Cornell University)|Aug 9, 2019
Security and Verification in ComputingComputer Science4 references7 citations
TL;DR

This paper investigates why ARM's Memory Protection Unit (MPU), despite its security potential, is largely unused in real-world embedded systems. It identifies fundamental design flaws in the ARMv7-M MPU—such as limited regions, inflexible alignment, and performance overhead from privilege transitions—that undermine security benefits while increasing complexity. The study demonstrates that MPU-enabled FreeRTOS offers negligible security gains due to these architectural shortcomings, and proposes practical improvements like sub-region masking and software hardening techniques to enhance usability and effectiveness.

ABSTRACT

As more and more embedded devices are connected to the Internet, leading to the emergence of Internet-of-Things (IoT), previously less tested (and insecure) devices are exposed to miscreants. To prevent them from being compromised, the memory protection unit (MPU), which is readily available on many devices, has the potential to become a free lunch for the defenders. To our surprise, the MPU is seldom used by real-world products. The reasons are multi-fold. While there are non-technical reasons such as compatibility issues, more importantly, we found that MPU brings virtually no security enhancement at the expense of decreased performance and responsiveness. In this work, we investigate the MPU adoption in major real-time operating systems (RTOSs), in particular, the FreeRTOS, and try to pinpoint the fundamental reasons to explain why MPU is not favored. We hope our findings can inspire new remedial solutions to change the situation. We also review the latest MPU design and provide technical suggestions to build more secure embedded systems.

Motivation & Objective

  • To investigate why the ARM MPU, a low-cost hardware security feature, is rarely adopted in real-world embedded systems despite its availability for over two decades.
  • To analyze the fundamental design limitations of the ARMv7-M MPU that prevent effective security hardening in real-time operating systems (RTOSs).
  • To evaluate the actual security benefits and performance costs of MPU usage in FreeRTOS, a widely deployed RTOS in IoT devices.
  • To propose practical, backward-compatible improvements to enhance MPU usability and effectiveness in legacy embedded systems.
  • To guide future hardware and software design toward more secure, lightweight, and efficient memory protection mechanisms in resource-constrained environments.

Proposed method

  • Conducted a comprehensive analysis of MPU support across major RTOSs, including FreeRTOS, Mbed, Nucleus, and others, to assess real-world adoption patterns.
  • Evaluated the ARMv7-M MPU programming model, focusing on region configuration, alignment constraints, sub-region disable functionality, and privilege-level transitions.
  • Measured performance overhead introduced by MPU through task switching and interrupt handling, identifying privilege escalation as a major bottleneck.
  • Proposed and evaluated the use of sub-region disable fields (SRD) to optimize memory region reuse and reduce fragmentation.
  • Reviewed software-based mitigation strategies such as static analysis (e.g., MINION) to cluster memory sections and minimize MPU region count.
  • Explored hardware retrofit solutions like TrustLite and ARMv8-M enhancements to address architectural limitations in a forward-looking manner.

Experimental results

Research questions

  • RQ1Why is the ARM MPU, despite its availability and low cost, largely ignored in production embedded systems and RTOSs?
  • RQ2To what extent does the ARMv7-M MPU actually improve security in real-world RTOS environments like FreeRTOS?
  • RQ3What are the key architectural and implementation flaws in the ARMv7-M MPU that undermine its effectiveness and adoption?
  • RQ4How can existing MPU designs be improved through software techniques to reduce region count and eliminate performance penalties?
  • RQ5What long-term hardware and software solutions can effectively address the fundamental inflexibility and insecurity of current MPU designs?

Key findings

  • The MPU in ARMv7-M MCUs provides negligible security benefit in practice due to its restrictive region configuration and high performance overhead.
  • FreeRTOS, despite offering an MPU-enabled port, is almost universally deployed in non-MPU variants, with AWS only integrating its IoT libraries into the non-MPU version.
  • Each task switch and hardware interrupt in MPU-enabled systems requires privilege escalation, introducing significant performance degradation and responsiveness loss.
  • The requirement for power-of-two, aligned memory regions leads to inefficient memory usage, especially when allocating arbitrary-sized regions.
  • Creative use of the sub-region disable field (SRD) can reduce memory waste by up to 50% when sharing a single 8KB region across multiple tasks with non-overlapping access needs.
  • ARMv8-M improves region count and flexibility but does not resolve core issues like privilege transition overhead and lack of fine-grained access control.

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.