{"id":"CVE-2026-139685","summary":"staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nstaging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers\n\nThe SPI operations in this driver are not DMA safe:\n1. spi_read() uses a stack-allocated buffer.\n2. spi_write() in ad7816_spi_read() uses a struct member that shares a\n   cacheline with other variables.\n3. spi_write() in ad7816_spi_write() passes a stack parameter by\n   reference.\n\nFix these violations by replacing all spi_read() and spi_write() calls\nwith spi_write_then_read(). This safely handles DMA by internally\nallocating a bounce buffer for the transfers, avoiding cacheline\nsharing issues without needing dedicated aligned buffers.\nThis implicitly corrects the size argument in read to sizeof(buf).","modified":"2026-11-30T15:02:30.150912026Z","published":"2026-11-30T13:37:02.010Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139685.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0d7a0fed2e93e45194c3da5e2d5b8edb5ac87f33"},{"type":"WEB","url":"https://git.kernel.org/stable/c/69fa76f0af3414cc189c3b0b807cb59e327ecc00"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6b1a74ae9038a9ace83e1091f29e77d3a657175c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8a8145d566d71da3e4fe750df91a239f40e808ec"},{"type":"WEB","url":"https://git.kernel.org/stable/c/96f269ae4b18dd0819d70fab7ddaabf6e28c7de6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ab1a3a906040d21ecc8552e20c21da53ebdf0d9a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/bc33db8baeebfa061cc1c998391629f016fc63fa"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f86fcec514be94cbbb49cfc67b10809b8f739e69"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139685.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139685"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"7924425db04a6107e49312edf53c158590d52aae"},{"fixed":"bc33db8baeebfa061cc1c998391629f016fc63fa"},{"fixed":"ab1a3a906040d21ecc8552e20c21da53ebdf0d9a"},{"fixed":"f86fcec514be94cbbb49cfc67b10809b8f739e69"},{"fixed":"0d7a0fed2e93e45194c3da5e2d5b8edb5ac87f33"},{"fixed":"8a8145d566d71da3e4fe750df91a239f40e808ec"},{"fixed":"6b1a74ae9038a9ace83e1091f29e77d3a657175c"},{"fixed":"96f269ae4b18dd0819d70fab7ddaabf6e28c7de6"},{"fixed":"69fa76f0af3414cc189c3b0b807cb59e327ecc00"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139685.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.6.38"},{"fixed":"5.10.275"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.119"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.65"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139685.json"}}],"schema_version":"1.9.2"}