CVE-2026-139685

staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers

Published Nov 30, 2026 CVSS 3.1 · 4.7 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers

The SPI operations in this driver are not DMA safe:
1. spi_read() uses a stack-allocated buffer.
2. spi_write() in ad7816_spi_read() uses a struct member that shares a
cacheline with other variables.
3. spi_write() in ad7816_spi_write() passes a stack parameter by
reference.

Fix these violations by replacing all spi_read() and spi_write() calls
with spi_write_then_read(). This safely handles DMA by internally
allocating a bounce buffer for the transfers, avoiding cacheline
sharing issues without needing dedicated aligned buffers.
This implicitly corrects the size argument in read to sizeof(buf).

Analysis

AI-generated

Technical impact

The Linux kernel staging driver for the ad7816 ADC performs SPI transfer operations that are not DMA safe. It uses a stack-allocated buffer for spi_read, shares a struct member on the same cache line for spi_write, and passes a stack parameter by reference. These violations allow DMA operations to read or write outside the intended buffer, potentially corrupting kernel memory. The applied fix replaces all calls with spi_write_then_read, which internally allocates a bounce buffer and correctly handles size arguments, thereby eliminating the DMA safety issues.

Affected Systems

All Linux kernel releases that include the staging iio/adc/ad7816 driver before the patch are affected. This includes any distribution that ships a kernel with this driver and has not applied the commit. The affected product is the Linux kernel.

Risk and Exploitability

The CVSS score is 4.7, indicating moderate severity. The EPSS score is less than 1%, reflecting a very low probability of widespread exploitation. The vulnerability is not listed in CISA KEV, suggesting no known public exploitation. Based on the description, it is inferred that practical exploitation requires local access to the SPI bus and the presence of the ad7816 device, so the risk is limited to environments with such access and would result in potential memory corruption rather than direct privilege escalation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel update that includes the ad7816 driver patch
  • If an update is not immediately possible, disable the ad7816 driver or block access to the associated SPI device to prevent unsafe DMA operations
  • Monitor system logs for abnormal SPI activity or memory corruption errors

Generated by OpenCVE AI on December 1, 2026 at 17:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-122
Type Values Removed Values Added
Weaknesses CWE-787
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-122
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers The SPI operations in this driver are not DMA safe: 1. spi_read() uses a stack-allocated buffer. 2. spi_write() in ad7816_spi_read() uses a struct member that shares a cacheline with other variables. 3. spi_write() in ad7816_spi_write() passes a stack parameter by reference. Fix these violations by replacing all spi_read() and spi_write() calls with spi_write_then_read(). This safely handles DMA by internally allocating a bounce buffer for the transfers, avoiding cacheline sharing issues without needing dedicated aligned buffers. This implicitly corrects the size argument in read to sizeof(buf).
Title staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:37 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:37 PM