Skip to content

Zenoh uORB Subscriber Allows Arbitrary Stack Allocation (PX4/PX4-Autopilot)

High
mrpollo published GHSA-69g4-hcqf-j45p Mar 13, 2026

Package

PX4/PX4-Autopilot (Other)

Affected versions

<= 1.17.0-rc1

Patched versions

1.17.0-rc2

Description

Summary

The Zenoh uORB subscriber allocates a stack VLA directly from the incoming payload length without bounds. A remote Zenoh publisher can send an oversized fragmented message to force an unbounded stack allocation and copy, causing a stack overflow and crash of the Zenoh bridge task.

Details

In src/modules/zenoh/subscribers/uorb_subscriber.hpp (data_handler), when the payload is non-contiguous, the code does:

  size_t len = z_bytes_len(payload);
  unsigned char reassembled_payload[len];
  z_bytes_reader_read(&reader, reassembled_payload, len);
  dds_istream_t is = {.m_buffer = &reassembled_payload[4], .m_size = static_cast<int>(len), ...};
  dds_stream_read(&is, data, ...);

There is no maximum length check. With Z_FEATURE_UNSTABLE_API enabled (on by default in src/modules/zenoh/CMakeLists.txt) large Zenoh messages are fragmented (FRAG_MAX_SIZE=512), taking the non-contiguous path and hitting the VLA. Any payload larger than the thread stack will overflow and corrupt adjacent frames.

PoC

zenoh-vla-stack-overflow-poc.tar.gz

A minimal ASAN PoC is in zenoh-vla-stack-overflow-poc/:

  cmake -S zenoh-vla-stack-overflow-poc -B zenoh-vla-stack-overflow-poc/build
  cmake --build zenoh-vla-stack-overflow-poc/build
  ./zenoh-vla-stack-overflow-poc/build/zenoh_vla_stack_overflow_poc

The harness includes the real uorb_subscriber.hpp and forces the non-contiguous path with a 16 MB payload. ASAN reports stack-overflow at uorb_subscriber.hpp:97 (the VLA allocation).

Impact

Stack-based buffer overflow triggered over the Zenoh network. Any reachable Zenoh publisher (adjacent network) can crash the PX4 Zenoh bridge task; with weak stack protections this could lead to control-flow compromise (remote code execution).

Acknowledgments

Severity

High

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
Local
Attack complexity
Low
Privileges required
Low
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:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2026-32708

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