spi: use generic driver_override infrastructure
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".
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.80, 6.18.21, 6.19.11, 6.6.160
- CVEs
- CVE-2026-31487
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 22:38 UTC · Revision 1
Source evidence
spi: use generic driver_override infrastructure
core-osv · Original sourcePublished 22 Apr 2026, 13:54 UTC
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".
osv:CVE-2026-31487
Kernel
Fixed versions: 6.6.160, 6.12.80, 6.18.21, 6.19.11
Complete source record
{
"id": "37e2170236bdca5a9e3a07bb6ed829905dc2eefe08a5c7f10e46339c00cfb6bd",
"url": "https://osv.dev/vulnerability/CVE-2026-31487",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "spi: use generic driver_override infrastructure",
"summary": "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\".",
"evidence": "osv:CVE-2026-31487",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.6.160",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.80",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.21",
"evidence": "/affected/1/ranges"
},
{
"value": "6.19.11",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-31487",
"aliases": [
"CVE-2026-31487"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5039563e7c25eccd7fec1de6706011009d1c5665"
},
{
"fixed": "6e8eb467bed6aa1a563dba8f366c9fd76ba0004e"
},
{
"fixed": "eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0"
},
{
"fixed": "c73a58661a760373d08a6883af4f0bb5cc991a67"
},
{
"fixed": "e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0"
},
{
"fixed": "cc34d77dd48708d810c12bfd6f5bf03304f6c824"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31487.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.20.0"
},
{
"fixed": "6.6.160"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.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"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31487.json"
}
}
],
"modified": "2026-10-28T02:30:31.943379962Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/6e8eb467bed6aa1a563dba8f366c9fd76ba0004e",
"https://git.kernel.org/stable/c/c73a58661a760373d08a6883af4f0bb5cc991a67",
"https://git.kernel.org/stable/c/cc34d77dd48708d810c12bfd6f5bf03304f6c824",
"https://git.kernel.org/stable/c/e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0",
"https://git.kernel.org/stable/c/eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31487.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-31487",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31487.json"
}
},
"related_cves": [
{
"value": "CVE-2026-31487",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 499167,
"published_at": "2026-04-22T13:54:12.29+00:00"
}