Skip to content

BST Device Name Length Can Overflow Driver Buffer

Moderate
mrpollo published GHSA-79mp-34pp-2f3f Mar 13, 2026

Package

PX4/PX4-Autopilot (Other)

Affected versions

<= 1.17.0-rc1

Patched versions

1.17.0-rc2

Description

Summary

The BST telemetry probe writes a string terminator using a device-provided length without bounds. A malicious BST device can report an oversized dev_name_len, causing a stack overflow in the driver and crashing the task (or enabling code execution).

Details

In src/drivers/telemetry/bst/bst.cpp (BST::probe), after receiving a device info reply the code does:

  dev_info_reply.payload.dev_name[dev_info_reply.payload.dev_name_len] = '\0';

  The dev_name buffer is 32 bytes, but dev_name_len is attacker-controlled from the I2C reply and is never bounded (lines ~190-215). A
  length ≥32 writes past the stack buffer, corrupting adjacent data.

PoC

px4-bst-dev-name-overflow-poc.tar.gz

Use the provided ASAN harness px4-bst-dev-name-overflow-poc/:

  cmake -S px4-bst-dev-name-overflow-poc -B px4-bst-dev-name-overflow-poc/build
  cmake --build px4-bst-dev-name-overflow-poc/build
  ./px4-bst-dev-name-overflow-poc/build/px4_bst_dev_name_overflow_poc

The mock I2C device returns a BST info reply with dev_name_len=0xFF; ASAN reports a stack-buffer-overflow at bst.cpp:209 in BST::probe.

Impact

Stack-based buffer overflow triggered by any BST device or I2C bus attacker responding to the probe. Causes denial of service and could enable code execution in the BST driver context if protections are weak.

Acknowledgments

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Physical
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2026-32705

Weaknesses

Stack-based Buffer Overflow

A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). Learn more on MITRE.

Credits