TZ-DATASHIELD: Automated Data Protection for Embedded Systems via Data-Flow-Based Compartmentalization
Zelun Kong
Network and Distributed System Security (NDSS) Symposium 2025 · Day 2 · Trusted Hardware and Execution
Overview
Microcontroller Units (MCUs) form the backbone of countless critical embedded systems, from healthcare devices and industrial automation to autonomous vehicles. Despite their pervasive use in sensitive applications, the software running on these MCUs frequently lacks robust security mechanisms, leaving them highly vulnerable to sophisticated attacks. These vulnerabilities can lead to the compromise of sensitive data—whether it's private sensor readings or critical actuator commands—threatening both the confidentiality and integrity of the system. The TZ-DATASHIELD framework, presented by Zelun Kong at the NDSS Symposium, offers an innovative, automated solution to this pressing problem.
Key moments
- 0:00 Introduction: MCU vulnerabilities and TZ-DATASHIELD overview
- 2:00 TrustZone and TZ-DATASHIELD's three-step protection process
- 4:00 Three fundamental challenges for data protection identified
- 5:00 Sensitive Data Flow (SDF) based compartmentalization explained
- 6:20 Software fault isolation and shared data protection solutions
- 9:40 Security evaluation results: address space and ROP gadget reduction
- 10:30 Performance and memory overhead evaluation results
TZ-DATASHIELD: Automated Data Protection for Embedded Systems via Data-Flow-Based Compartmentalization
Speakers: Zelun Kong
Conference: NDSS Symposium
YouTube: https://www.youtube.com/watch?v=VFRGc29i188
Overview
Microcontroller Units (MCUs) form the backbone of countless critical embedded systems, from healthcare devices and industrial automation to autonomous vehicles. Despite their pervasive use in sensitive applications, the software running on these MCUs frequently lacks robust security mechanisms, leaving them highly vulnerable to sophisticated attacks. These vulnerabilities can lead to the compromise of sensitive data—whether it's private sensor readings or critical actuator commands—threatening both the confidentiality and integrity of the system. The TZ-DATASHIELD framework, presented by Zelun Kong at the NDSS Symposium, offers an innovative, automated solution to this pressing problem.
TZ-DATASHIELD leverages ARM TrustZone technology to establish a trusted execution environment, but goes a step further by introducing a novel data-flow-based compartmentalization approach. This method precisely isolates sensitive data and the code interacting with it, even against powerful adversaries capable of compromising privileged software. By automating the identification and protection of sensitive resources, TZ-DATASHIELD aims to provide a practical and effective defense strategy for embedded systems, balancing significant security gains with manageable performance and memory overheads.
This talk addresses fundamental challenges in embedded security, particularly the granularity of isolation, intra-compartment protection, and the secure handling of shared data. Through its sophisticated static analysis and runtime enforcement, TZ-DATASHIELD offers a compelling vision for enhancing the resilience of MCUs, ensuring that critical data remains protected even in the face of advanced threats.
Background
▶ Watch: Introduction: MCU vulnerabilities and TZ-DATASHIELD overview (0:00)
The landscape of embedded systems is characterized by their close interaction with physical environments, processing data from sensors and issuing commands to actuators. This direct interface with the physical world makes the integrity and confidentiality of their data paramount. However, MCUs, by design, often prioritize real-time performance and resource efficiency over comprehensive security. While many modern ARM-based MCUs incorporate a Memory Protection Unit (MPU), a hardware extension designed to isolate memory regions and protect data, these mechanisms fall short against determined, "strong" adversaries.
The primary limitation of MPUs stems from their configuration requirements: they must be configured by privileged software. If an attacker successfully exploits a vulnerability within this privileged software, they can manipulate the MPU's configuration, effectively neutralizing its protection and gaining unfettered access to sensitive data. This critical flaw necessitates a more robust isolation primitive, which is where ARM TrustZone comes into play.
TrustZone is a hardware-enforced security extension that partitions the system into two distinct execution environments: a Secure World and a Normal World. The Secure World hosts trusted, sensitive data and operations, offering a Trusted Execution Environment (TEE). The Normal World, conversely, runs untrusted applications. TrustZone's fundamental promise is that even if the Normal World is completely compromised, the sensitive data and operations within the Secure World remain isolated and protected. However, simply enabling TrustZone is not enough; the challenge lies in effectively partitioning the firmware to fully leverage its capabilities for data protection.
Existing compartmentalization approaches, such as function-level, thread-level, or component-level isolation, typically suffer from granularity issues when applied to data protection. Function-level isolation can be too fine-grained, leading to frequent and costly context switches between compartments. Conversely, thread-level or component-level isolation can be too coarse-grained, meaning a vulnerability within a large compartment could still expose sensitive data. These methods were generally not designed with the explicit goal of protecting specific sensitive data objects and their associated data flows. This gap highlighted the need for a data-centric approach to compartmentalization, one that could automatically identify and isolate only the necessary code and data for sensitive operations, thereby minimizing the attack surface without incurring excessive overhead.
Key Findings
▶ Watch: Three fundamental challenges for data protection identified (4:00)
The core contribution of TZ-DATASHIELD lies in its novel Sensitive Data Flow (SDF) based compartmentalization approach, which addresses the limitations of prior isolation techniques by focusing directly on the data itself. The framework demonstrates significant advancements in embedded system security, particularly in reducing the attack surface within compartments.
Through extensive evaluation, TZ-DATASHIELD achieved an impressive 80% reduction in accessible address space from within compartments, relative to a baseline of the original firmware without any isolation. This result is particularly noteworthy as it represents a 30% greater reduction compared to existing coarse-grained compartmentalization methods. A reduced accessible address space directly translates to a smaller memory footprint that an attacker can target, significantly hindering memory-based exploits.
Furthermore, the framework proved highly effective at mitigating Return-Oriented Programming (ROP) attacks. TZ-DATASHIELD demonstrated a near 90% reduction in the number of ROP gadgets, which are critical building blocks for such attacks. This gain is an 80% improvement on average compared to coarse-grained approaches. By drastically limiting the available ROP gadgets, TZ-DATASHIELD makes the construction of exploit chains substantially more difficult, if not impossible, for an adversary.
Crucially, these substantial security gains were achieved with reasonable performance and memory overheads. The framework incurred approximately 15% performance overhead, with the majority of this attributed to the inserted security checks. Memory overhead was also manageable, at around 30%, which is considered acceptable for modern MCUs and their applications. This balance between robust security and practical resource utilization is a key finding, demonstrating that high-level data protection is achievable in resource-constrained embedded environments without rendering the system unusable. The automated nature of the framework—from annotation to static analysis and instrumentation—further streamlines the secure development process for embedded systems.
Technical Deep Dive
▶ Watch: Sensitive Data Flow (SDF) based compartmentalization explained (5:00)
TZ-DATASHIELD operates through a meticulously designed three-step process: annotation, static analysis, and instrumentation, all orchestrated by a runtime security monitor. The objective is to automatically identify, isolate, and protect sensitive data objects and their associated operations within the TrustZone Secure World.
- Annotation: The process begins with developers manually annotating sensitive data objects. These are typically global variables or peripherals (like actuators) that handle critical information. This initial annotation serves as the seed for the subsequent automated analysis.
- Static Analysis (SDF-based Compartmentalization): This is the core of TZ-DATASHIELD's innovation. The system takes the annotated global variables and peripherals as input and performs a sophisticated data-flow analysis to determine precisely which code and data objects are related to these sensitive resources. This analysis leverages two key techniques:
- Backward Slicing: For ensuring data integrity, the system performs backward slicing. Starting from an annotated sensitive data object, it traces all instructions and other data objects that influence the value or state of that sensitive data. This identifies the "sources" and computational paths that contribute to its current state.
- Forward Slicing: For ensuring data confidentiality, the system performs forward slicing. Starting from an annotated sensitive data object, it tracks all instructions and other data objects that are influenced by the sensitive data. This identifies where sensitive data flows to and how it is used, preventing unauthorized leakage.
- Recursive Application: These slicing steps are performed recursively for each manually or automatically annotated data object. Importantly, any global accessible data objects that are involved in more than one sensitive data flow are automatically identified and treated as shared data, requiring special protection.
- The outcome of this static analysis is a precise definition of compartments, encompassing only the essential code and data required for handling specific sensitive data flows, rather than entire functions or threads.
- Instrumentation: Once the compartments are defined, security checks are strategically inserted into the firmware before sensitive operations. These checks are designed to enforce the isolation policies determined by the static analysis.
- Runtime Security Monitor: During runtime, a security monitor (residing in the Secure World) is responsible for enforcing the isolation and protection policies. It manages the compartment switches and ensures that the inserted security checks are properly executed, thereby maintaining the integrity and confidentiality of sensitive resources.
TZ-DATASHIELD specifically tackles three fundamental challenges in applying TrustZone for data protection:
- Challenge 1: Compartmentalization Granularity: As discussed, existing function/thread/component-level approaches are not optimized for data protection. TZ-DATASHIELD's SDF-based method directly addresses this by creating fine-grained compartments tailored to specific data flows, avoiding the pitfalls of overly broad or excessively narrow isolation. This ensures that only absolutely necessary code and data reside within a sensitive compartment, minimizing the attack surface.
- Challenge 2: Intra-Compartment Isolation: Even with compartments, an adversary who compromises code within a compartment might still attempt to access memory addresses outside that compartment or perform unauthorized control transfers. To mitigate this, TZ-DATASHIELD employs Software Fault Isolation (SFI). During compile time, security checks are inserted before indirect control transfers (e.g., function pointers, jump tables) and indirect memory accesses. These checks are then enforced by the security monitor at runtime, ensuring that even code within a trusted compartment adheres to its boundaries and does not stray into unauthorized memory regions or execute arbitrary code. This adds a crucial layer of defense, preventing compromised code from expanding its influence.
- Challenge 3: Protection for Shared Data and Peripherals: In real-world embedded systems, compartments often need to share data. For instance, one compartment might read sensor data, while another writes commands to an actuator based on that data. If this shared data is not properly protected, an exploit in one compartment could propagate its influence to another, breaking the isolation. TZ-DATASHIELD addresses this by applying Control Flow Integrity (CFI) and Data Flow Integrity (DFI). Similarly, security checks for CFI and DFI are inserted during compile time and enforced by the security monitor at runtime.
- CFI ensures that the execution flow of a program adheres to a predefined legitimate graph, preventing attackers from hijacking control flow.
- DFI ensures that data originates from legitimate sources and is written to legitimate destinations. Specifically, when a compartment attempts to read shared data, the DFI mechanism verifies that the data originated from a legitimate control flow and was written by an allowed source. This prevents malicious data injection or manipulation across compartment boundaries, maintaining the integrity of shared resources.
By integrating these sophisticated static analysis and runtime enforcement mechanisms, TZ-DATASHIELD builds a comprehensive defense strategy around ARM TrustZone, providing robust protection against strong adversaries in embedded systems.
Demo / Proof of Concept
▶ Watch: Security evaluation results: address space and ROP gadget reduction (9:40)
The efficacy of TZ-DATASHIELD was validated through a practical implementation and extensive evaluation. The researchers developed a prototype of TZ-DATASHIELD on a generic development board, which served as the hardware platform for their experiments. This prototype was then used to evaluate a diverse set of 12 different bare-metal and Real-Time Operating System (RTOS) applications. These applications were chosen to represent typical embedded workloads and involved various peripherals, reflecting the complexity and variety of real-world MCU deployments.
The evaluation specifically compared TZ-DATASHIELD's SDF-based compartmentalization approach against existing, more coarse-grained methods, including function-level, thread-level, and component-level isolation. The comparison focused on both security metrics and performance/memory overheads.
Security Evaluation:
The results, normalized against a baseline of the original firmware without any isolation, demonstrated TZ-DATASHIELD's superior security posture:
- Address Accessible Space Reduction: TZ-DATASHIELD achieved an 80% reduction in the memory address space accessible from within compartments. This significantly shrinks the attack surface available to a compromised compartment. Crucially, this was a 30% greater reduction compared to the average reduction achieved by coarse-grained compartmentalization methods.
- ROP Gadget Reduction: The framework delivered a near 90% reduction in the number of Return-Oriented Programming (ROP) gadgets. This drastically limits an attacker's ability to construct exploit chains, making ROP attacks substantially more difficult. This represented an 80% greater reduction on average than that provided by coarse-grained approaches.
Performance and Memory Overhead Evaluation:
Acknowledging the resource constraints of MCUs, the evaluation also focused on the practical overhead incurred by TZ-DATASHIELD:
- Performance Overhead: The framework incurred a reasonable performance overhead of approximately 15%. The speaker noted that most of this overhead originated from the security checks inserted during the instrumentation phase.
- Memory Overhead: The memory footprint increased by about 30%. While a measurable increase, the researchers concluded that this overhead is manageable for modern MCUs and contemporary MCU applications, suggesting it does not render the protected system impractical.
These evaluation results collectively serve as the proof of concept, demonstrating that TZ-DATASHIELD effectively achieves a strong balance between enhanced security and practical system performance in embedded environments. The availability of the code and artifacts online further supports the reproducibility and potential adoption of this research.
Defensive Implications
▶ Watch: Performance and memory overhead evaluation results (10:30)
The TZ-DATASHIELD framework offers profound implications for defenders operating in the embedded systems landscape, providing a robust pathway to enhance the security of critical MCU-based devices. The primary defensive advantage lies in its automated, data-flow-based approach to compartmentalization. This means that security is not solely reliant on developers manually identifying every sensitive code path, which is prone to error and oversight. Instead, by simply annotating sensitive data objects, the system can automatically derive and enforce precise isolation boundaries.
Defenders should recognize that traditional MPU-based protections are insufficient against sophisticated adversaries who can compromise privileged software. TZ-DATASHIELD, by leveraging ARM TrustZone and augmenting it with fine-grained data-flow analysis, provides a defense-in-depth strategy. Even if the Normal World or parts of the Secure World's non-critical components are compromised, the core sensitive data and the operations directly manipulating it remain isolated within their tightly controlled compartments. This significantly raises the bar for attackers, requiring them to bypass multiple layers of hardware and software-enforced security.
Organizations developing or deploying MCU-based systems, especially in critical sectors like healthcare, industrial control, and automotive, should consider incorporating such data-centric security frameworks into their Secure Development Lifecycle (SDL). This includes:
- Adopting TrustZone-enabled Hardware: The foundation of TZ-DATASHIELD relies on ARM TrustZone. Future designs should prioritize MCUs with this capability.
- Integrating Static Analysis Tools: Tools inspired by TZ-DATASHIELD's SDF analysis can be integrated into the build process to automatically identify sensitive data flows and potential isolation boundaries.
- Enforcing Fine-Grained Policies: Moving beyond coarse-grained isolation, defenders should aim for solutions that provide precise control over data access and execution paths, minimizing the attack surface.
- Runtime Monitoring: The security monitor component highlights the importance of runtime integrity checks for indirect control transfers and memory accesses, as well as robust CFI/DFI mechanisms for shared data.
By significantly reducing the accessible address space (80%) and ROP gadgets (90%), TZ-DATASHIELD curtails an attacker's ability to escalate privileges, inject malicious code, or exfiltrate sensitive information. The reasonable performance (15%) and memory (30%) overheads mean that these robust security benefits can be realistically deployed in production environments without crippling system functionality. Ultimately, TZ-DATASHIELD provides a blueprint for building more resilient embedded systems that can withstand strong adversaries, ensuring the confidentiality and integrity of critical data even in compromised environments.
Key Takeaways
- MCU Vulnerabilities: Microcontroller Units are highly vulnerable to attacks due to a lack of robust security mechanisms, making sensitive data (e.g., sensor data, actuator commands) susceptible to compromise.
- MPU Limitations: Existing Memory Protection Units (MPUs) in MCUs are insufficient against strong adversaries, as their configurations can be compromised by privileged software exploits.
- TrustZone Foundation: ARM TrustZone provides a hardware-enforced Trusted Execution Environment (TEE), but requires effective compartmentalization to fully protect sensitive data.
- Data-Flow-Based Compartmentalization (SDF): TZ-DATASHIELD introduces a novel Sensitive Data Flow (SDF) approach, using backward and forward slicing to precisely identify and isolate code and data related to sensitive resources, offering superior granularity compared to traditional methods.
- Robust Security Gains: The framework achieves an 80% reduction in accessible address space and a near 90% reduction in ROP gadgets, significantly shrinking the attack surface and hindering exploit development.
- Practical Overhead: These security improvements come with manageable performance (approx. 15%) and memory (approx. 30%) overheads, making TZ-DATASHIELD a practical solution for modern MCU applications.
- Comprehensive Protection: TZ-DATASHIELD addresses intra-compartment isolation via Software Fault Isolation (SFI) and secures shared data using Control Flow Integrity (CFI) and Data Flow Integrity (DFI), ensuring end-to-end data protection.
About the Speaker(s)
Zelun Kong presented the work on TZ-DATASHIELD at the NDSS Symposium. Based on the provided transcript and metadata, further details about Zelun Kong's specific title or academic/corporate affiliation were not explicitly stated during the talk.
Reviews
Dr. Zero (Offensive Security Researcher) — SOLID
Solid academic systems-security paper dressed as a conference talk. The SDF-based compartmentalization using backward/forward slicing on TrustZone-M is a genuine technical contribution with real evaluation numbers, but this is NDSS paper material — competent and reproducible, not paradigm-shifting. The 80% address-space reduction and 90% ROP gadget reduction sound impressive until you ask hard questions about the threat model and annotation burden.
Heather Calloway (CISO) — WEAK
Technically credible embedded security research with meaningful attack surface reduction numbers, but it stops at the lab bench. There is no path from the findings to the people who actually decide what goes into medical devices, industrial controllers, or automotive platforms.
→ Top-rated talks at Network and Distributed System Security (NDSS) Symposium 2025
All talks from Network and Distributed System Security (NDSS) Symposium 2025