Skip to contentSkip to conversation

CVE-2026-23475: spi: fix statistics allocation

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 3

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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

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

spi: fix statistics allocation

The controller per-cpu statistics is not allocated until after the controller has been registered with driver core, which leaves a window where accessing the sysfs attributes can trigger a NULL-pointer dereference.

Fix this by moving the statistics allocation to controller allocation while tying its lifetime to that of the controller (rather than using implicit devres).

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

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

	Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.1.167 with commit 80c5bd0dca1cc5526ae0f4b273ccd163ed4caa4e
	Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.6.130 with commit f13100b1f5f111989f0750540a795fdef47492af
	Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.12.78 with commit df30056c78e8bead02d4be020199cabdbec0fef1
	Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.18.20 with commit 378b295f67102eef78cf2c28105f60ae1dab5cc1
	Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.19.10 with commit 118ce777d39f03cac99231196f820e4f998613a8
	Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 7.0-rc5 with commit dee0774bbb2abb172e9069ce5ffef579b12b3ae9

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-23475

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.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/80c5bd0dca1cc5526ae0f4b273ccd163ed4caa4e
	https://git.kernel.org/stable/c/f13100b1f5f111989f0750540a795fdef47492af
	https://git.kernel.org/stable/c/df30056c78e8bead02d4be020199cabdbec0fef1
	https://git.kernel.org/stable/c/378b295f67102eef78cf2c28105f60ae1dab5cc1
	https://git.kernel.org/stable/c/118ce777d39f03cac99231196f820e4f998613a8
	https://git.kernel.org/stable/c/dee0774bbb2abb172e9069ce5ffef579b12b3ae9