CVE-2026-31487
spi: use generic driver_override infrastructure
Description
In 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".
INFO
Published Date :
April 22, 2026, 2:16 p.m.
Last Modified :
Nov. 11, 2026, 11:10 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | [email protected] |
Solution
- Update the Linux kernel to the latest version.
- Apply the provided patch for the SPI driver.
- Ensure the driver_override infrastructure is used correctly.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-31487.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-31487 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-31487
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-31487 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-31487 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Nov. 11, 2026
Action Type Old Value New Value Added Translation Title: Linux Kernel, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: spi: usar la infraestructura genérica de driver_override Cuando un controlador es sondeado a través de __driver_attach(), la función de devolución de llamada match() del bus es llamada sin el bloqueo del dispositivo activo, accediendo así al campo driver_override sin un bloqueo, lo que puede causar un UAF. Esto se soluciona usando la infraestructura driver_override del driver-core, gestionando internamente el bloqueo adecuado. Tenga en cuenta que llamar a match() desde __driver_attach() sin el bloqueo del dispositivo activo es intencional. [1] También tenga en cuenta que no habilitamos la característica driver_override de la estructura bus_type, ya que SPI - a diferencia de la mayoría de otros buses - pasa ’’ a sysfs_emit() cuando el puntero driver_override es NULL. Así, imprimiendo ’\n’ en lugar de ’(null)\n’. -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Nov. 05, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-31487', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-11-05T21:34:57.394570Z'} -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 21, 2026
Action Type Old Value New Value Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/31xxx/CVE-2026-31487.json">CVE-2026-31487</a> Added Reference https://git.kernel.org/stable/c/6e8eb467bed6aa1a563dba8f366c9fd76ba0004e Added Reference https://git.kernel.org/stable/c/c73a58661a760373d08a6883af4f0bb5cc991a67 Added Reference https://git.kernel.org/stable/c/cc34d77dd48708d810c12bfd6f5bf03304f6c824 Added Reference https://git.kernel.org/stable/c/e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0 Added Reference https://git.kernel.org/stable/c/eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0 Removed Reference https://git.kernel.org/stable/c/c73a58661a760373d08a6883af4f0bb5cc991a67 Removed Reference https://git.kernel.org/stable/c/cc34d77dd48708d810c12bfd6f5bf03304f6c824 Removed Reference https://git.kernel.org/stable/c/e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0 Removed Reference https://git.kernel.org/stable/c/eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0 Removed Reference Type https://git.kernel.org/stable/c/c73a58661a760373d08a6883af4f0bb5cc991a67 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/cc34d77dd48708d810c12bfd6f5bf03304f6c824 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0 Types: Patch -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '5039563e7c25eccd7fec1de6706011009d1c5665', 'lessThan': 'eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0', 'versionType': 'git'}, {'status': 'affected', 'version': '5039563e7c25eccd7fec1de6706011009d1c5665', 'lessThan': 'c73a58661a760373d08a6883af4f0bb5cc991a67', 'versionType': 'git'}, {'status': 'affected', 'version': '5039563e7c25eccd7fec1de6706011009d1c5665', 'lessThan': 'e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0', 'versionType': 'git'}, {'status': 'affected', 'version': '5039563e7c25eccd7fec1de6706011009d1c5665', 'lessThan': 'cc34d77dd48708d810c12bfd6f5bf03304f6c824', 'versionType': 'git'}], 'programFiles': ['drivers/spi/spi.c', 'include/linux/spi/spi.h'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '4.20'}, {'status': 'unaffected', 'version': '0', 'lessThan': '4.20', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.12.80', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.18.21', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '6.19.11', 'versionType': 'semver', 'lessThanOrEqual': '6.19.*'}, {'status': 'unaffected', 'version': '7.0', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['drivers/spi/spi.c', 'include/linux/spi/spi.h'], 'defaultStatus': 'affected'}] -
Initial Analysis by [email protected]
Apr. 28, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Added CWE CWE-667 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:4.20:-:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.13 up to (excluding) 6.18.21 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 6.19.11 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20.1 up to (excluding) 6.12.80 Added Reference Type kernel.org: https://git.kernel.org/stable/c/c73a58661a760373d08a6883af4f0bb5cc991a67 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/cc34d77dd48708d810c12bfd6f5bf03304f6c824 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0 Types: Patch -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Apr. 22, 2026
Action Type Old Value New Value Added Description In 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". Added Reference https://git.kernel.org/stable/c/c73a58661a760373d08a6883af4f0bb5cc991a67 Added Reference https://git.kernel.org/stable/c/cc34d77dd48708d810c12bfd6f5bf03304f6c824 Added Reference https://git.kernel.org/stable/c/e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0 Added Reference https://git.kernel.org/stable/c/eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0