Abstract
Real-time microcontroller systems (MCS) are critical to modern infrastructure, yet they often lack robust memory isolation due to strict timing requirements. This paper introduces MINION, a security architecture that leverages hardware Memory Protection Units (MPUs) and static analysis to provide per-process memory isolation. By running both the RTOS and applications in unprivileged mode and using a customized "View Switcher," MINION reduces the memory attack surface by over 75% with a negligible 2% average performance overhead, ensuring all real-time deadlines are met.
The Challenge: Monolithic Memory in Real-Time Systems
Real-time microcontrollers power a vast array of devices, from autonomous drones to medical equipment. Unlike general-purpose computers, these systems typically lack a Memory Management Unit (MMU) for virtual memory. Instead, they rely on a monolithic memory layout where the operating system, drivers, and applications share a single privileged address space.
This lack of isolation creates a significant security risk: a single vulnerability in a non-critical library can grant an attacker full control over safety-critical actuators. While some Real-Time Operating Systems (RTOS) offer optional isolation, the overhead of privilege switching during system calls often causes the system to miss critical real-time deadlines, making such protections impractical for production use.
The MINION Architecture
MINION addresses these challenges through a three-stage process designed to minimize runtime overhead while maximizing isolation:
- Firmware Analysis: Using LLVM-based static analysis, MINION identifies the specific memory regions (code, data, and peripherals) required for each process.
- Memory View Tailoring: Since hardware MPUs have limited slots (typically 8 or 16), MINION uses a k-means clustering algorithm to group fragmented memory requirements into a set of rules that fit within hardware constraints.
- Customized View Switching: MINION introduces a privileged "View Switcher" that reconfigures the MPU only during context switches. By running the RTOS and applications in unprivileged mode, the system avoids the costly privilege-mode transitions usually required for I/O and system calls.
Evaluation and Key Results
The researchers evaluated MINION using a 3DR IRIS+ quad-copter UAV running the Pixhawk flight controller. The system was tested against eight realistic attack scenarios based on four newly discovered memory corruption bugs in the ArduPilot/NuttX stack.
Security Impact
MINION successfully detected and blocked 100% of the tested attack cases, including buffer overflows and non-control data attacks. On hardware with an 8-region MPU limit (like the Cortex-M4), MINION reduced the accessible memory space for any single process by an average of 76%.
Performance and Real-Time Constraints
Across 31 real-time tasks, the average latency overhead was only 2%. Crucially, the system maintained its real-time integrity, with all tasks continuing to meet their strict deadlines despite the added security layers.
Conclusion and Future Work
MINION demonstrates that robust memory isolation is achievable in real-time systems without sacrificing performance. While the system currently relies on conservative static analysis—which may leave small windows of memory accessible—and requires source code access, it represents a significant step forward. As microcontroller hardware continues to evolve with more MPU slots, the granularity and effectiveness of MINION’s protection are expected to improve further.
Summary updated