Introduction
Embedded systems running on ARM Cortex-M processors present unique challenges for vulnerability analysis. Unlike desktop systems, they often lack memory protection units (MPU) or run with minimal memory isolation.
Stack Buffer Overflow on Cortex-M
Without ASLR or stack canaries (common in bare-metal firmware), a simple stack buffer overflow becomes a reliable exploitation primitive. We demonstrate this on a Cortex-M4 target running FreeRTOS.
Heap Corruption Patterns
The most common heap implementations in embedded systems — newlib’s dlmalloc and FreeRTOS heap_4 — have known weakness patterns when metadata is corrupted.
Tooling
We developed a custom GDB plugin that visualizes heap state in real-time, making it significantly easier to track corruption across allocations.
Conclusion
Embedded systems remain fertile ground for memory corruption research. The combination of limited protections and increasing network connectivity creates significant risk.