Microft: Exploring and Mitigating Cross-State Control-Flow Hijacking Attacks on ARM Cortex-M TrustZone

  • Zheyuan Ma
  • , Xi Tan
  • , Lukasz Ziarek
  • , Ning Zhang
  • , Shambhu Upadhyaya
  • , Hongxin Hu
  • , Ziming Zhao

Research output: Contribution to journalArticlepeer-review

Abstract

ARM Cortex-M is one of the most popular microcontroller architectures designed for deeply embedded and Internet of Things (IoT) applications. To facilitate efficient execution, it has some unique hardware optimizations. Specifically, Cortex-M TrustZone has a fast state switch mechanism that allows direct control-flow transfer from the secure state program to the non-secure state userspace program. In this paper, we present Microft – exploring and mitigating cross-state control-flow hijacking attacks on ARM Cortex-M TrustZone. In particular, we first demonstrate how Cortex-M TrustZone’s fast state switch mechanism can be exploited for arbitrary code execution with escalated privilege in the non-secure state by introducing a new exploitation technique, namely return-to-non-secure (ret2ns). We present the detailed methodology of ret2ns attacks in two representative cases and experimentally confirm the feasibility of four variants of attacks on two hardware platforms. To defend against ret2ns attacks, we design three address sanitizing mechanisms while imposing a negligible performance overhead of less than 0.1%. The first mechanism is a generic MPU-assisted address sanitizer, while the second and third mechanisms are more efficient software-fault isolation based approaches that assume the userspace and kernel space programs are placed in different and known memory regions.

Original languageEnglish
Pages (from-to)12096-12111
Number of pages16
JournalIEEE Transactions on Information Forensics and Security
Volume20
DOIs
StatePublished - Oct 24 2025

Keywords

  • ARM cortex-M
  • embedded systems security
  • exploitation techniques
  • TrustZone

Fingerprint

Dive into the research topics of 'Microft: Exploring and Mitigating Cross-State Control-Flow Hijacking Attacks on ARM Cortex-M TrustZone'. Together they form a unique fingerprint.

Cite this