Racing PX4 - Memory Safety and Timing Vulnerabilities
Where
Aerospace Village
DEF CON 34
Duration
17 min
Walks through memory corruption and race-condition flaws in PX4's MAVLink and uORB subsystems that can halt drone missions.
Summary
This talk examines PX4, an open-source flight stack used in drones ranging from hobby builds to military UAVs. The speaker covers three parts of it: the uORB publish-subscribe middleware, the MAVLink ground-station protocol, and the MAVLink logging subsystem. Using a restaurant-order analogy, the talk shows how a single bug in one topic can spread to other modules and disrupt the whole system.
Two stack-based overflows, both published in March 2026, are walked through in detail. One comes from an unbounded scanf in the MAVLink log handler, triggered by a crafted directory path sent over MAVLink FTP followed by a log list request. The other is a variable-length stack array in a uORB subscriber that sizes allocations from an unchecked payload length. Each case includes an AddressSanitizer report and suggested fixes such as bounded parsing and fixed-size buffers.
The main original finding is a race condition in the logger. The stop function deletes a global instance, while the acknowledgment handler only checks that the pointer exists, so stale acknowledgments from an earlier session are accepted in a new one. Repeated start and stop commands sent over UDP cause packet-loss reporting to become unreliable, saturate the queue, and drop commands for key modules. Proposed mitigations include session identifiers, rate limiting on logger toggles, and an active-session check before acknowledgments are processed.
Materials
Related talks
Car Hacking Village·22 min
Yehyeong Lee
Shows how a rogue DHCP server on a car's OBD Ethernet port can hand an attacker a valid address and enable floods that disrupt vehicle systems.
Aerospace Village·28 min
Andrew Tierney · Adam Bromiley
Explains how AFDX, the Ethernet-based avionics network used on modern airliners, differs from office networks, and what probing a test-bench airframe revealed.
Aerospace Village·16 min
Kent Munroe
Examines how cheap electronic conspicuity boxes that show nearby light aircraft can be abused over Wi-Fi, from weak defaults to firmware memory flaws.


