spi: fix use-after-free on controller registration failure
Published Apr 3, 2026
7.8
HIGHCVSS 3.1
EPSS 0.17%
Description
Make sure to deregister from driver core also in the unlikely event that per-cpu statistics allocation fails during controller registration to avoid use-after-free (of driver resources) and unclocked register accesses.
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 6.0StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<6.0
- Version 6.1.167StatusunaffectedConstraints<=6.1.*
- Version 6.12.78StatusunaffectedConstraints<=6.12.*
- Version 6.18.20StatusunaffectedConstraints<=6.18.*
- Version 6.19.10StatusunaffectedConstraints<=6.19.*
- Version 6.6.130StatusunaffectedConstraints<=6.6.*
- Version 7.0StatusunaffectedConstraints<=*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Linux | Linux | unaffected |
| |||||||||||||||||||||||||||
| Linux | Linux | affected |
|
- ≥ 6.0 · < 6.1.167
- ≥ 6.2 · < 6.6.130
- ≥ 6.7 · < 6.12.78
- ≥ 6.13 · < 6.18.20
- ≥ 6.19 · < 6.19.10
- 7.0
- 7.0
- 7.0
- 7.0
No data.
Red Hat Enterprise Linux 10
kernel
Fix deferred
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Not affected
Red Hat Enterprise Linux 8
kernel-rt
Not affected
Red Hat Enterprise Linux 9
kernel
Fix deferred
Red Hat Enterprise Linux 9
kernel-rt
Fix deferred
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Fix deferred | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This vulnerability occurs only during an unlikely error path when per-CPU statistics allocation fails during SPI controller registration. Under normal system operation with adequate memory, this path is not exercised. The practical exploitability is very limited as it requires triggering a specific allocation failure during driver initialization.
References (14)
- https://access.redhat.com/security/cve/CVE-2026-31389 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2454859 Issue Tracking
- https://cert-portal.siemens.com/productcert/html/ssa-019113.html
- https://cert-portal.siemens.com/productcert/html/ssa-082556.html
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-18761 Advisory
- https://git.kernel.org/stable/c/0e23f50086da7d0b183dfeac26021acfcdee086b Patch
- https://git.kernel.org/stable/c/23b51bad2eb8787aa74324cfccefb258515ae5ba Patch
- https://git.kernel.org/stable/c/6bbd385b30c7fb6c7ee0669e9ada91490938c051 Patch
- https://git.kernel.org/stable/c/80f3e8cd2b4ad355b2ad2024cf423f6d183404f7 Patch
- https://git.kernel.org/stable/c/8634e05b08ead636e926022f4a98416e13440df9 Patch
- https://git.kernel.org/stable/c/afe27c1f43aa57530011f419be6ddf71306565d2 Patch
- https://lore.kernel.org/linux-cve-announce/2026040324-CVE-2026-31389-036b@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2026-31389
- https://www.cve.org/CVERecord?id=CVE-2026-31389
Change history (0)
No recorded changes yet.