CVE-2026-31487: spi: use generic driver_override infrastructure

Published Apr 22, 2026
·
Updated

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

spi: use generic driveroverride 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 driveroverride 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".

Affected Software

12 affected components
Linux Linux kernel
Linux Linux kernel>=4.20.1<6.12.80
Linux Linux kernel>=6.13<6.18.21
Linux Linux kernel>=6.19<6.19.11
Linux Linux kernel=4.20
Linux Linux kernel=7.0-rc1
Linux Linux kernel=7.0-rc2
Linux Linux kernel=7.0-rc3
Linux Linux kernel=7.0-rc4
Linux Linux kernel=7.0-rc5
Linux Linux kernel=7.0-rc6
Linux Linux kernel=7.0-rc7

Event History

Apr 22, 2026
CVE Published
via MITRE·01:54 PM
Data Sourced
via MITRE·01:54 PM
Description
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-31487?

CVE-2026-31487 is classified as a moderate severity vulnerability.

2

How do I fix CVE-2026-31487?

To fix CVE-2026-31487, update your Linux kernel to the latest version provided by your distribution.

3

What systems are affected by CVE-2026-31487?

CVE-2026-31487 affects the Linux kernel across various distributions.

4

What type of vulnerability is CVE-2026-31487?

CVE-2026-31487 is a race condition vulnerability in the Linux kernel's SPI driver.

5

Is CVE-2026-31487 exploitable?

Yes, CVE-2026-31487 can be exploited by attackers with local access to the system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203