PX4-Autopilot tattu_can Driver — CAN Bus Stack Buffer Overflow DoS (CVE-2026-32707)
by Mohammed Idrees Banyamer (mbanyamer / @banyamer_security) · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-32707 (GHSA-wxwm-xmx9-hr32, CWE-121)
- Category
- hardware
- Affected product
- PX4-Autopilot flight controller firmware, tattu_can driver
- Affected versions
- <= 1.17.0-rc1 (fixed in 1.17.0-rc2, commit 3f04b7a)
- Disclosed
- 2026-07-05
- Patch status
- patched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-05 |
| Author / Researcher | Mohammed Idrees Banyamer (mbanyamer / @banyamer_security) |
| CVE / Advisory | CVE-2026-32707 (GHSA-wxwm-xmx9-hr32, CWE-121) |
| Category | hardware |
| Severity | High |
| CVSS Score | 7.5 (High, CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) |
| Status | PoC |
| Tags | px4, autopilot, can-bus, socketcan, stack-buffer-overflow, drone, uav, denial-of-service |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | PX4-Autopilot flight controller firmware, tattu_can driver |
| Versions Affected | <= 1.17.0-rc1 (fixed in 1.17.0-rc2, commit 3f04b7a) |
| Language / Platform | Python 3 (python-can) targeting a Linux SocketCAN interface (physical can0 or virtual vcan0) |
| Authentication Required | No (any node able to inject frames on the shared CAN bus) |
| Network Access Required | No (physical/CAN bus access required, not IP network) |
Summary
The tattu_can driver in PX4-Autopilot reassembles multi-frame Tattu12SBatteryMessage telemetry from the battery’s CAN bus into a fixed 48-byte stack buffer, but performs the per-frame memcpy() without checking the cumulative write offset against the buffer size. An attacker able to inject frames onto the same CAN bus — such as a rogue node, a compromised peripheral, or physical bus access — can send a start-of-transfer frame followed by a sequence of oversized continuation frames to drive the offset past the buffer boundary, corrupting the stack and crashing the PX4 process. The included PoC is a python-can script that emits the exact frame sequence (marked start frame + overflow frames) needed to trigger the crash on a real or virtual CAN interface.
Vulnerability Details
Root Cause
tattu_can’s frame-reassembly loop copies payload_size = DLC - 1 bytes per CAN frame into a stack-resident tattu_message buffer without bounds-checking the running offset against sizeof(tattu_message) (48 bytes), allowing an attacker-controlled sequence of frames to overflow the buffer.
Attack Vector
- Send a start-of-transfer CAN frame (DLC=8, last byte
0x80) that causes the driver to begin assembling a newTattu12SBatteryMessageand copy the first 5 bytes into the stack buffer. - Send seven subsequent overflow frames (DLC=8), each contributing 7 bytes via
memcpyat the current offset, driving the cumulative offset past the 48-byte buffer size. - Send a final trigger frame whose
memcpywrites past the buffer boundary, corrupting adjacent stack memory. - Observe the PX4 process crash (segfault/hard fault) — a denial of service on the flight controller.
Impact
An attacker with CAN bus access to a PX4-based vehicle can reliably crash the autopilot process, causing loss of flight-critical control (denial of service) on a real drone/UAV.
Environment / Lab Setup
Target: PX4-Autopilot <= 1.17.0-rc1 with tattu_can driver enabled, running on Linux with SocketCAN (physical can0 or virtual vcan0)
Attacker: Python 3 + python-can, root/CAP_NET_RAW to send raw CAN frames
Proof of Concept
PoC Script
See
exploit.pyin this folder.
| |
The script sends the crafted start-of-transfer frame followed by the sequence of overflow frames on the given CAN interface, driving the tattu_can reassembly buffer past its bounds and crashing the target PX4 process.
Detection & Indicators of Compromise
Signs of compromise:
- PX4 autopilot process crashing or restarting unexpectedly mid-flight or on the bench.
- CAN bus traffic showing repeated frames matching the start/overflow pattern from an unexpected sender.
- Loss of telemetry/control correlated with
tattu_candriver activity in flight logs.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Update to PX4-Autopilot >= 1.17.0-rc2, which adds an offset/size bounds check before each memcpy (commit 3f04b7a) |
| Interim mitigation | Disable the tattu_can driver if not required (tattu_can stop or remove from build), and restrict physical/logical access to the vehicle’s CAN bus |
References
Notes
Mirrored from https://github.com/mbanyamer/CVE-2026-32707-PX4-Autopilot-tattu_can-Stack-Buffer-Overflow-DoS- on 2026-07-05. The repo URL/name provided in the source batch was truncated/garbled (“mbanyamer/CVE-2026-32707-PX4-…”) and was resolved via GitHub search to the actual repository name above.
| |