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

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

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).

ProductVersions
Linux Linux7924425db04a6107e49312edf53c158590d52aae to before bc33db8baeebfa061cc1c998391629f016fc63fa Affected7924425db04a6107e49312edf53c158590d52aae to before ab1a3a906040d21ecc8552e20c21da53ebdf0d9a Affected7924425db04a6107e49312edf53c158590d52aae to before f86fcec514be94cbbb49cfc67b10809b8f739e69 Affected7924425db04a6107e49312edf53c158590d52aae to before 0d7a0fed2e93e45194c3da5e2d5b8edb5ac87f33 Affected7924425db04a6107e49312edf53c158590d52aae to before 8a8145d566d71da3e4fe750df91a239f40e808ec Affected7924425db04a6107e49312edf53c158590d52aae to before 6b1a74ae9038a9ace83e1091f29e77d3a657175c Affected7924425db04a6107e49312edf53c158590d52aae to before 96f269ae4b18dd0819d70fab7ddaabf6e28c7de6 Affected7924425db04a6107e49312edf53c158590d52aae to before 69fa76f0af3414cc189c3b0b807cb59e327ecc00 Affected
Linux Linux2.6.38 Affectedbefore 2.6.38 Not Affected5.10.275 through 5.10.* Not Affected5.15.226 through 5.15.* Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.119 through 6.12.* Not Affected6.18.65 through 6.18.* Not Affected7.3.6 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.