CVE-2026-31768: iio: adc: ti-adc161s626: use DMA-safe memory for spi_read()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: ti-adc161s626: use DMA-safe memory for spi_read()
Add a DMA-safe buffer and use it for spi_read() instead of a stack memory. All SPI buffers must be DMA-safe.
Since we only need up to 3 bytes, we just use a u8[] instead of __be16 and __be32 and change the conversion functions appropriately.
The Linux kernel CVE team has assigned CVE-2026-31768 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.9 with commit 4d671b71beefbfc145b971a11e0c3cabde94b673 and fixed in 6.1.168 with commit b3bb8faeca1a2ef7be95ee8a512b639f9ffce947 Issue introduced in 4.9 with commit 4d671b71beefbfc145b971a11e0c3cabde94b673 and fixed in 6.6.134 with commit fa64aab25aba47296aa8d12bb4c88ec3fecb2054 Issue introduced in 4.9 with commit 4d671b71beefbfc145b971a11e0c3cabde94b673 and fixed in 6.12.81 with commit 67b3a91bdc48220bfb67155ab528121b9c822782 Issue introduced in 4.9 with commit 4d671b71beefbfc145b971a11e0c3cabde94b673 and fixed in 6.18.22 with commit 014c6d27878d3883f7bb065610768fd021de1a96 Issue introduced in 4.9 with commit 4d671b71beefbfc145b971a11e0c3cabde94b673 and fixed in 6.19.12 with commit d2d031b0786ea66ab0577c9d2d71435068d32199 Issue introduced in 4.9 with commit 4d671b71beefbfc145b971a11e0c3cabde94b673 and fixed in 7.0 with commit 768461517a28d80fe81ea4d5d03a90cd184ea6ad
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-31768
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/iio/adc/ti-adc161s626.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/b3bb8faeca1a2ef7be95ee8a512b639f9ffce947 https://git.kernel.org/stable/c/fa64aab25aba47296aa8d12bb4c88ec3fecb2054 https://git.kernel.org/stable/c/67b3a91bdc48220bfb67155ab528121b9c822782 https://git.kernel.org/stable/c/014c6d27878d3883f7bb065610768fd021de1a96 https://git.kernel.org/stable/c/d2d031b0786ea66ab0577c9d2d71435068d32199 https://git.kernel.org/stable/c/768461517a28d80fe81ea4d5d03a90cd184ea6ad