CVE-2026-31487
MediumIn the Linux kernel, the following vulnerability has been resolved: spi: use generic driver_override infrastructure When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override 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 __driver_attach() without the device lock held is intentional. [1] Also note that we do not enable the driver_override feature of struct bus_type, as SPI - in contrast to most other buses - passes "" to sysfs_emit() when the driver_override pointer is NULL. Thus, printing "\n" instead of "(null)\n".
CVSS 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-667CVE-2026-31487 is a Improper Locking vulnerability
What is Improper Locking?
The product does not properly acquire or release a lock, which can lead to unexpected behaviour. Learn more on MITRE CWE
Affected versions
Linux kernel versions
4.20
and later are affected. Fixed in
6.12.80,
6.18.21,
6.19.11,
7.0
and their respective stable series.
References
The following references provide additional information about CVE-2026-31487 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/c73a58661a760373d08a6883af4f0bb5cc991a67
-
PatchKernel patch commithttps://git.kernel.org/stable/c/cc34d77dd48708d810c12bfd6f5bf03304f6c824
-
PatchKernel patch commithttps://git.kernel.org/stable/c/e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0
Frequently asked questions
-
What is CVE-2026-31487?
CVE-2026-31487 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as an Improper Locking flaw (CWE-667) . It affects Linux kernel versions from 4.20 onward and has been patched in 6.12.80, 6.18.21, 6.19.11 and others. CVE-2026-31487 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2026-31487?
CVE-2026-31487 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2026-31487?
Yes — CVE-2026-31487 has been patched. Fixed versions include 6.12.80, 6.18.21, 6.19.11 and others. If you are running Linux kernel 4.20 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2026-31487 actively exploited?
No — CVE-2026-31487 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Improper Locking (CWE-667)?
The product does not properly acquire or release a lock, which can lead to unexpected behaviour. View CWE-667 on MITRE CWE →