Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-78116 Overview
CVE-2026-78116 is a double free vulnerability [CWE-415] in the Zephyr RTOS Broadcom AFBR-S50 time-of-flight sensor driver. The data_ready_work_handler() function in drivers/sensor/broadcom/afbr_s50/afbr_s50.c completes the same Real-Time I/O (RTIO) submission twice when Argus_EvaluateData() returns a non-STATUS_OK status. The error branch calls handle_error_on_result() with rtio_iodev_sqe_err() but fails to return, allowing execution to fall through to rtio_iodev_sqe_ok() on the same struct rtio_iodev_sqe. The condition is triggered by sensor-side events such as harsh ambient light or sharp distance transitions in the sensor field of view.
Critical Impact
Double completion corrupts the RTIO submission pool, causing writes through released buffers and memory corruption on Zephyr builds instantiating brcm,afbr-s50.
Affected Products
- Zephyr RTOS builds that enable the Broadcom AFBR-S50 time-of-flight sensor driver
- Devices instantiating the brcm,afbr-s50 device tree binding
- Prior builds that still include the payload.Status check (vulnerable to ordinary distance transitions)
Discovery Timeline
- 2026-10-21 - CVE-2026-78116 published to NVD
- 2026-10-22 - Last updated in NVD database
Technical Details for CVE-2026-78116
Vulnerability Analysis
The flaw resides in the Zephyr sensor driver for the Broadcom AFBR-S50 time-of-flight sensor. When Argus_EvaluateData() returns a status other than STATUS_OK, data_ready_work_handler() invokes handle_error_on_result(), which finalises the request with rtio_iodev_sqe_err(). Unlike peer error branches in the same function, this path does not return. Execution then falls through to the function tail, which calls rtio_iodev_sqe_ok() against the same struct rtio_iodev_sqe.
Both completion helpers reach rtio_executor_done() in subsys/rtio/rtio_executor.c. This routine returns the submission to the pool via rtio_sqe_pool_free() and, for streaming multishot submissions, releases the RX buffer with rtio_release_buffer(). The second completion therefore operates on a freed rtio_iodev_sqe.
Root Cause
The root cause is a missing return statement after the error handler. The second completion pushes the same mpsc node onto the submission queue while it is already on the pool free list, splicing the two lists together. The freed request is then re-submitted, causing the next sensor measurement to be written through an already-released buffer. For one-shot submissions, the bug emits a spurious success completion carrying stale userdata and frees the same pool entry twice.
Attack Vector
The error branch is driven by sensor conditions rather than by host software. Vendor API statuses such as ERROR_ARGUS_BIAS_VOLTAGE_REINIT and ERROR_ARGUS_LASER_MONITOR_INACTIVE are documented as transient results of harsh ambient light. An unauthenticated party in front of the optical sensor can provoke the invalid-data condition without physical contact or software access. SPI transfer errors reach the same branch. The attacker does not control the corrupted contents, so the practical outcome is memory corruption and loss of availability rather than directed code execution.
if (status != STATUS_OK) {
LOG_ERR("Data not valid: %d, %d", status, edata->payload.Status);
handle_error_on_result(data, -EIO);
+ return;
}
CHECKIF(Argus_IsDataEvaluationPending(data->platform.argus.handle)) {
LOG_WRN("Overrun. More pending data than what we've served.");
Source: Zephyr commit 817e92c5184c0d64b8cc6537f4e42ce1e5b635f9
Detection Methods for CVE-2026-78116
Indicators of Compromise
- Repeated Data not valid error log entries from the AFBR-S50 driver followed by unexplained application resets or hangs.
- Duplicate completion callbacks delivered to RTIO consumers of the sensor stream.
- Sensor measurement data appearing in buffers that the application has already released back to the pool.
Detection Strategies
- Audit firmware images for the presence of the vulnerable data_ready_work_handler() codepath lacking the return after handle_error_on_result().
- Enable Zephyr memory debugging options (CONFIG_RTIO_SUBMIT_SEM, pool diagnostics) to surface mpsc queue splicing anomalies during testing.
- Fuzz the sensor by introducing ambient-light transients and sharp depth gradients under instrumented builds to reproduce the double-completion.
Monitoring Recommendations
- Monitor device telemetry for AFBR-S50 error status codes ERROR_ARGUS_BIAS_VOLTAGE_REINIT and ERROR_ARGUS_LASER_MONITOR_INACTIVE at elevated rates.
- Track SPI bus error counters on channels wired to the AFBR-S50; a rise correlates with triggering the vulnerable branch.
- Alert on application-level duplicate completion events or buffer-use-after-release assertions in sensor pipelines.
How to Mitigate CVE-2026-78116
Immediate Actions Required
- Rebuild and reflash affected Zephyr firmware with the upstream patch applied to drivers/sensor/broadcom/afbr_s50/afbr_s50.c.
- Inventory fielded devices with device tree bindings referencing brcm,afbr-s50 and prioritise them for update.
- Restrict physical and optical access to the sensor on deployed units until firmware can be updated.
Patch Information
The fix adds a return statement after handle_error_on_result(data, -EIO) so that the error path no longer falls through to rtio_iodev_sqe_ok(). Details are published in GitHub Security Advisory GHSA-559f-34rc-pgw2 and the upstream commit 817e92c5184c0d64b8cc6537f4e42ce1e5b635f9. Vendors integrating Zephyr should pull the fix into their downstream branches and re-release device firmware.
Workarounds
- Disable the AFBR-S50 driver in Kconfig for builds that do not require time-of-flight measurement.
- Shield the sensor optically to reduce the probability that ambient-light transients drive the sensor into the error branch.
- Where feasible, operate the sensor in one-shot mode and discard duplicate completions at the application layer as a partial compensating control.
# Kconfig fragment to disable the vulnerable driver
CONFIG_SENSOR=y
# CONFIG_AFBR_S50 is not set
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

