CVE-2026-31487

Source
https://cve.org/CVERecord?id=CVE-2026-31487
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31487.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-31487
Downstream
Published
2026-04-22T13:54:12.290Z
Modified
2026-05-28T03:55:11.541683159Z
Summary
spi: use generic driver_override infrastructure
Details

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

spi: use generic driver_override infrastructure

When a driver is probed through __driverattach(), the bus' match() callback is called without the device lock held, thus accessing the driveroverride field without a lock, which can cause a UAF.

Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.

Note that calling match() from _driverattach() without the device lock held is intentional. [1]

Also note that we do not enable the driveroverride feature of struct bustype, as SPI - in contrast to most other buses - passes "" to sysfsemit() when the driveroverride pointer is NULL. Thus, printing "\n" instead of "(null)\n".

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31487.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5039563e7c25eccd7fec1de6706011009d1c5665
Fixed
eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0
Fixed
c73a58661a760373d08a6883af4f0bb5cc991a67
Fixed
e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0
Fixed
cc34d77dd48708d810c12bfd6f5bf03304f6c824

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31487.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
6.12.80
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.21
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
6.19.11

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31487.json"