SoK: Where's the "up"?! A Comprehensive (bottom-up) Study on the Security of Arm Cortex-M Systems

Xi Tan, Zheyuan Ma, Sandro Pinto, Le Guan, Ning Zhang, Jun Xu, Zhiqiang Lin, Hongxin Hu, Ziming ZhaoWOOT @ USENIX Security Symposium 2024 · OpenReview

TL;DR

This paper presents a comprehensive "State of the Knowledge" (SoK) study on the security of Arm Cortex-M systems, the dominant architecture in embedded and IoT devices. It reveals a significant gap between the extensive research on securing microprocessors and the limited adoption of these security measures in real-world Cortex-M firmware, highlighting critical vulnerabilities and proposing actionable recommendations.

What Problem Does This Paper Address?

Arm Cortex-M processors are ubiquitous in embedded systems and the Internet of Things (IoT), powering billions of devices. Despite their widespread use, there's a concerning lack of systematized knowledge regarding their hardware security features, the limitations and vulnerabilities inherent in their hardware and software stacks, and the research efforts aimed at securing them. This knowledge gap hinders both researchers and developers from effectively addressing the growing security threats in this critical ecosystem. The authors aim to bridge this gap by providing a comprehensive, bottom-up analysis of Cortex-M security.

Methods

The authors employed a multi-faceted approach:

  • Hardware Analysis: They analyzed the security features, limitations, and issues of the Cortex-M microarchitecture and instruction set architecture (ISA), comparing them to more powerful microprocessors.
  • Software Stack Study: A deep dive into the software stack designed for Cortex-M was conducted, identifying limitations and vulnerabilities.
  • Empirical Firmware Analysis: They performed a large-scale empirical analysis of 1,797 real-world Cortex-M firmware samples to understand the adoption of security mechanisms.
  • Bug Report Analysis: Over 310 Cortex-M related software bug reports were analyzed to categorize and understand the nature and severity of disclosed vulnerabilities.
  • Literature Survey: Over 50 research papers on securing Cortex-M systems were systematically reviewed and evaluated based on their proposed defenses, hardware reliance, and performance overhead.

Datasets

  • Real-world Firmware Dataset: The authors collected and analyzed a dataset of 1,797 unique Cortex-M firmware samples from seven hardware vendors. This dataset includes both publicly available firmware and newly collected samples.
  • Cortex-M Related Bug Reports: Over 310 software bug reports spanning nearly six years (2017-2023) were collected and analyzed. These reports covered systems from nine hardware vendors and seven real-time operating systems (RTOS).
  • Scientific Publications: Over 30 papers from top conferences and an additional 20 highly relevant articles were surveyed.

Key Insights and Ideas

  • "Where's the Up?!" - A Security Deficit: The most striking insight is the significant disparity between the security features available on modern microprocessors and those implemented in real-world Cortex-M systems. Despite decades of research on security mechanisms like privilege separation and stack canaries, these are rarely adopted in embedded firmware.
  • Hardware Limitations are Fundamental: Cortex-M processors inherently lack advanced features like memory virtualization and robust memory protection units (MPUs) compared to their microprocessor counterparts. Even features like TrustZone are streamlined, introducing new vulnerabilities.
  • Software Stack Vulnerabilities are Rampant: The analysis of bug reports reveals a prevalence of validation, functional, and extrinsic bugs, with communication stacks and device drivers being particularly vulnerable.
  • Research vs. Reality Gap: While the research community has proposed numerous solutions for securing Cortex-M systems, these advancements are seldom implemented in production firmware. This suggests a disconnect between academic innovation and industry adoption.
  • Bare-metal Dominance: The vast majority of analyzed firmware (over 99.44%) uses a bare-metal or unikernel architecture, which inherently limits the complexity of security implementations.

Key Results

  • Limited Security Feature Adoption: The empirical analysis of firmware showed very low adoption rates for security features like privilege separation (only 0.56% of samples), memory access control (MPU usage was minimal), and stack canaries (only one sample).
  • Prevalence of Vulnerabilities: The study categorized over 350 disclosed Cortex-M related CVEs, with a significant portion classified as "medium" to "critical" severity, particularly for RTOSs.
  • Categorization of Bugs: Validation bugs were most common in communication components (57.78%), while functional bugs were prevalent in protocol implementations (11.38%). Extrinsic bugs, such as software side-channels, were also identified.
  • Research Landscape Mapped: The paper provides a comprehensive taxonomy and comparative evaluation of over 50 security research projects, categorizing them by the issues they address and the limitations they overcome.

Limitations and Future Work

  • Firmware Dataset Biases: The authors acknowledge that their firmware dataset might over-represent certain vendors and that the lack of symbolic information in most raw binaries can introduce biases in analysis.
  • Undiscovered Vulnerabilities: The analysis focuses on publicly disclosed vulnerabilities, meaning undiscovered issues could reveal further fundamental problems.
  • Effectiveness of MCU-Specific Mitigations: Software and compiler-based mitigations designed for microprocessors may be less effective on MCUs and require redesign.
  • Future Work Recommendations: The authors strongly recommend:
  • Exploring the pros and cons of new hardware features for security.
  • Investigating diverse IoT attack models and scenarios.
  • Facilitating the practical adoption of academic research results.
  • Enhancing the synergy between developers and the security research community.
  • Encouraging the transition to memory-safe languages where feasible.

Summary updated

BibTeX
@inproceedings{tan2024sok,
  author = {Xi Tan and Zheyuan Ma and Sandro Pinto and Le Guan and Ning Zhang and Jun Xu and Zhiqiang Lin and Hongxin Hu and Ziming Zhao},
  title = {{SoK: Where's the "up"?! A Comprehensive (bottom-up) Study on the Security of Arm Cortex-M Systems}},
  booktitle = {WOOT @ USENIX Security Symposium},
  year = {2024},
  url = {https://openreview.net/forum?id=EoywGuFh35},
}
Figure