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

Status: published. Published: 2026-04-22. Updated: 2026-11-05.

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".

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Linux / Linux: ≥ 5039563e7c25eccd7fec1de6706011009d1c5665; < 6e8eb467bed6aa1a563dba8f366c9fd76ba0004e (affected, git); ≥ 5039563e7c25eccd7fec1de6706011009d1c5665; < eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0 (affected, git); ≥ 5039563e7c25eccd7fec1de6706011009d1c5665; < c73a58661a760373d08a6883af4f0bb5cc991a67 (affected, git); ≥ 5039563e7c25eccd7fec1de6706011009d1c5665; < e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0 (affected, git); ≥ 5039563e7c25eccd7fec1de6706011009d1c5665; < cc34d77dd48708d810c12bfd6f5bf03304f6c824 (affected, git). Source: CNA: Linux
- Linux / Linux: 4.20 (affected); ≥ 0; < 4.20 (unaffected, semver); ≥ 6.6.160; ≤ 6.6.* (unaffected, semver); ≥ 6.12.80; ≤ 6.12.* (unaffected, semver); ≥ 6.18.21; ≤ 6.18.* (unaffected, semver); ≥ 6.19.11; ≤ 6.19.* (unaffected, semver); ≥ 7.0; ≤ * (unaffected, original_commit_for_fix). Source: CNA: Linux

## Severity and prioritization

- CISA KEV: No listing in collected sources

- EPSS: 0.12% as of 2026-11-05; percentile 1.81%

- SSVC: exploitation none; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: Not reported

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://git.kernel.org/stable/c/6e8eb467bed6aa1a563dba8f366c9fd76ba0004e (CNA: Linux)

- https://git.kernel.org/stable/c/eedf220442d13b6d97294e5b0ac8a2c38ee1a1a0 (CNA: Linux)

- https://git.kernel.org/stable/c/c73a58661a760373d08a6883af4f0bb5cc991a67 (CNA: Linux)

- https://git.kernel.org/stable/c/e0ae367a2de06c49aa1de6ec9b1ab6860bbb2cf0 (CNA: Linux)

- https://git.kernel.org/stable/c/cc34d77dd48708d810c12bfd6f5bf03304f6c824 (CNA: Linux)

## Provenance

- CNA: Linux: https://www.cve.org/CVERecord?id=CVE-2026-31487; retrieved 2026-11-05; source updated 2026-11-05

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-31487; retrieved 2026-11-05; source updated Not reported

Revision: ec8cb7cab76a2b56d1abcd88ee1ac103d8344e29b2d893cb36d1de8aad5d1b88

Canonical: https://y2.dev/cve/CVE-2026-31487

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.