CVE-2026-64221: spi: ti-qspi: fix use-after-free after DMA setup failure

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072416-CVE-2026-64221-299d@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

spi: ti-qspi: fix use-after-free after DMA setup failure

The driver falls back to PIO mode if DMA setup fails during probe.

Make sure to clear the DMA channel pointer also if buffer allocation
fails to avoid passing a pointer to the released channel to the DMA
engine (or trying to free the channel a second time on late probe errors
or driver unbind).

This issue was flagged by Sashiko when reviewing a devres allocation
conversion patch.

The Linux kernel CVE team has assigned CVE-2026-64221 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 4.12 with commit c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 and fixed in 5.10.258 with commit 9c6f306a8140962c7284197db54b96fdb5f468d6
	Issue introduced in 4.12 with commit c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 and fixed in 5.15.209 with commit 3bbbe7ae3fdada0df4157c1ffe989f92dfa8dcd6
	Issue introduced in 4.12 with commit c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 and fixed in 6.1.175 with commit d6f422b122922d1abee907d673bcc990e5f3672d
	Issue introduced in 4.12 with commit c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 and fixed in 6.6.142 with commit f2dc841d7dc9063fe9b47ced869b1271e55052ae
	Issue introduced in 4.12 with commit c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 and fixed in 6.12.92 with commit 1cd927002120678bd5d23c760246639caa53040e
	Issue introduced in 4.12 with commit c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 and fixed in 6.18.34 with commit d7a076fb596c7b408ed6df74793a597990a6d860
	Issue introduced in 4.12 with commit c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 and fixed in 7.0.11 with commit 178b9b570c0f75fa7e691490520328b20d19138e
	Issue introduced in 4.12 with commit c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 and fixed in 7.1 with commit ea6ec3343e05f7937a53eb6d7617b3abdb4abc19

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-64221
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/spi/spi-ti-qspi.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/9c6f306a8140962c7284197db54b96fdb5f468d6
	https://git.kernel.org/stable/c/3bbbe7ae3fdada0df4157c1ffe989f92dfa8dcd6
	https://git.kernel.org/stable/c/d6f422b122922d1abee907d673bcc990e5f3672d
	https://git.kernel.org/stable/c/f2dc841d7dc9063fe9b47ced869b1271e55052ae
	https://git.kernel.org/stable/c/1cd927002120678bd5d23c760246639caa53040e
	https://git.kernel.org/stable/c/d7a076fb596c7b408ed6df74793a597990a6d860
	https://git.kernel.org/stable/c/178b9b570c0f75fa7e691490520328b20d19138e
	https://git.kernel.org/stable/c/ea6ec3343e05f7937a53eb6d7617b3abdb4abc19
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.