Description
The RTIO streaming completion callback adxl345_process_fifo_samples_cb() in drivers/sensor/adi/adxl345/adxl345_stream.c clamps the amount of FIFO data it will report (read_len = MIN(fifo_bytes, buf_avail)) to the space actually returned by rtio_sqe_rx_buf(), but then queues one 6-byte bus read per hardware FIFO entry at consecutive offsets from read_buf, bounded by the device-reported entry count rather than by the clamp. When the allocated buffer is smaller than a full batch, the driver writes up to 186 bytes past the end of the allocation; a companion defect left data->fifo_total_bytes un-reset at batch start, so an aborted or errored chain could leave a stale write offset that pushes the next batch's writes out of bounds as well.

A short buffer is an expected, first-class outcome of the RTIO allocator: rtio_block_pool_alloc() walks the requested size down one block at a time until a contiguous run is available, and the driver only demands sizeof(struct adxl345_fifo_data) + 6 bytes as its minimum. Any streaming configuration whose mempool block granularity is smaller than a full FIFO batch (204 bytes) — for example the sensor shell's RTIO_DEFINE_WITH_MEMPOOL(sensor_read_rtio, 8, 8, 32, 64, 4) used by sensor stream <dev> on fifo_wm incl, or the 16-byte-block streaming example in the documentation — takes this path whenever the pool is fragmented or the consuming thread falls behind.

The out-of-bounds writes are performed by the I2C/SPI RTIO backend (DMA on many SoCs) into the shared RTIO block pool, corrupting neighbouring live buffers or, for a pool smaller than one batch, memory beyond the pool itself. The written bytes are accelerometer samples and the destination follows the allocation, so there is no controllable corruption primitive: the realistic impact is silent corruption of other RTIO consumers' data or a crash. Reaching it requires a board with an interrupt-wired ADXL345 built with CONFIG_ADXL345_STREAM, plus buffer-pool starvation, which a co-resident local workload can induce but which also occurs spontaneously under load; there is no network, USB or radio path to this code.
Published: 2026-10-23
Score: 3.6 Low
EPSS: n/a
KEV: No
Impact: Silent data corruption of RTIO consumers; potential crash
Action: Apply Patch
AI Analysis

Impact

The ADXL345 driver in Zephyr's RTIO streaming path incorrectly clamps the FIFO read length but still queues bus reads based on the hardware FIFO count. When the allocated buffer is smaller than a full batch, the driver writes up to 186 bytes beyond the end of the allocation. Because the written data are accelerometer samples, there is no controllable corruption of arbitrary bytes; the effect is silent data corruption of neighboring RTIO buffers or a crash. This out‑of‑bounds write is a classic memory‑corruption flaw that can silently compromise the integrity of other RTIO consumers.

Affected Systems

Any Zephyr‑based system that builds the ADXL345 driver with CONFIG_ADXL345_STREAM and uses the RTIO block pool allocator. The defect is triggered when the pool's block granularity is smaller than a full FIFO batch, for example with the sensor shell's RTIO_DEFINE_WITH_MEMPOOL(sensor_read_rtio, 8, 8, 32, 64, 4) or a 16‑byte block streaming example. Thus boards containing an ADXL345 sensor wired via interrupt and configured with the streaming mode are impacted.

Risk and Exploitability

The CVSS score of 3.6 classifies this as low severity. EPSS is unavailable and the vulnerability is not listed in CISA's KEV catalog. The attack vector is local to the device host; an attacker would need physical access or control of a local co‑resident workload that can induce RTIO block pool starvation or trigger the streaming path. Because the corrupted bytes are sensor samples, the exploit cannot write arbitrary data, reducing the likelihood of remote or malicious exploitation. Consequently the overall risk to the system is low, but the defect can quietly corrupt RTIO consumers or cause crashes under load.

Generated by OpenCVE AI on October 23, 2026 at 21:35 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Zephyr to a release that includes the commit 3451bb1e1e9165844060551164adb8a756e7b6b7 or apply that patch manually
  • Configure the RTIO block pool so that each allocation is at least one full FIFO batch (204 bytes) or adjust RTIO_DEFINE block sizes to avoid sub‑batch granularity
  • If ADXL345 streaming is not required, disable CONFIG_ADXL345_STREAM or remove the driver from the build

Generated by OpenCVE AI on October 23, 2026 at 21:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 23 Oct 2026 20:15:00 +0000

Type Values Removed Values Added
Description The RTIO streaming completion callback adxl345_process_fifo_samples_cb() in drivers/sensor/adi/adxl345/adxl345_stream.c clamps the amount of FIFO data it will report (read_len = MIN(fifo_bytes, buf_avail)) to the space actually returned by rtio_sqe_rx_buf(), but then queues one 6-byte bus read per hardware FIFO entry at consecutive offsets from read_buf, bounded by the device-reported entry count rather than by the clamp. When the allocated buffer is smaller than a full batch, the driver writes up to 186 bytes past the end of the allocation; a companion defect left data->fifo_total_bytes un-reset at batch start, so an aborted or errored chain could leave a stale write offset that pushes the next batch's writes out of bounds as well. A short buffer is an expected, first-class outcome of the RTIO allocator: rtio_block_pool_alloc() walks the requested size down one block at a time until a contiguous run is available, and the driver only demands sizeof(struct adxl345_fifo_data) + 6 bytes as its minimum. Any streaming configuration whose mempool block granularity is smaller than a full FIFO batch (204 bytes) — for example the sensor shell's RTIO_DEFINE_WITH_MEMPOOL(sensor_read_rtio, 8, 8, 32, 64, 4) used by sensor stream <dev> on fifo_wm incl, or the 16-byte-block streaming example in the documentation — takes this path whenever the pool is fragmented or the consuming thread falls behind. The out-of-bounds writes are performed by the I2C/SPI RTIO backend (DMA on many SoCs) into the shared RTIO block pool, corrupting neighbouring live buffers or, for a pool smaller than one batch, memory beyond the pool itself. The written bytes are accelerometer samples and the destination follows the allocation, so there is no controllable corruption primitive: the realistic impact is silent corruption of other RTIO consumers' data or a crash. Reaching it requires a board with an interrupt-wired ADXL345 built with CONFIG_ADXL345_STREAM, plus buffer-pool starvation, which a co-resident local workload can induce but which also occurs spontaneously under load; there is no network, USB or radio path to this code.
Title Out-of-bounds write in the ADXL345 sensor driver RTIO streaming FIFO read path
Weaknesses CWE-787
References
Metrics cvssV3_1

{'score': 3.6, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-10-23T19:56:14.995Z

Reserved: 2026-08-25T16:06:30.868Z

Link: CVE-2026-79978

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-23T20:17:27.657

Modified: 2026-10-23T20:17:27.657

Link: CVE-2026-79978

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T21:45:14Z

Weaknesses