Kernel memory corruption via stale devres classification
Published Feb 29, 2024 · Updated May 23, 2026
Use-after-free in the Linux SPI controller core allows local users to corrupt kernel memory during managed driver removal. During spi_unregister_controller(), devm_spi_release_controller() consults a devres list that cleanup has already torn down, misclassifies devm-allocated controllers as legacy objects, and decrements their reference counts below zero. Triggering the fault requires a controller created by devm_spi_alloc_master() or devm_spi_alloc_slave() and a driver-detach path that releases its managed resources.
Summary
What happened
Use-after-free in the Linux SPI controller core allows local users to corrupt kernel memory during managed driver removal. During spi_unregister_controller(), devm_spi_release_controller() consults a devres list that cleanup has already torn down, misclassifies devm-allocated controllers as legacy objects, and decrements their reference counts below zero. Triggering the fault requires a controller created by devm_spi_alloc_master() or devm_spi_alloc_slave() and a driver-detach path that releases its managed resources.
The record
- CVE
- CVE-2021-46959
- Published
- Feb 29, 2024
- Updated
- May 23, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- CWE-416
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Feb 29, 2024CVE publishedPublication date reported by the CVE source.
- May 23, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0870525cf94bc27907e94ce99afb6d7239ffd2f5 <8bf96425c90f5c1dcf3b7b9df568019a1d4b8a0e
- Affected versionversion=234b432c7b6184b2d6c5ba2c55f0dd5023c0edf0 <28a5529068c51cdf0295ab1e11a99a3a909a03e4
- Affected versionversion=3e04a4976addbedcad326f47b0dd4efc570a1fac <001c8e83646ad3b847b18f6ac55a54367d917d74
- Affected versionversion=4.14.212 <4.14.233
- Affected versionversion=4.19.163 <4.19.191
- Affected versionversion=4.4.248 <4.4.271
- Affected versionversion=4.9.248 <4.9.271
- Affected versionversion=5.10
- Affected versionversion=5.4.80 <5.4.119
- Affected versionversion=5.9.11 <5.10
- Affected versionversion=5e844cc37a5cbaa460e68f9a989d321d63088a89 <794aaf01444d4e765e2b067cba01cc69c1c68ed9
- Affected versionversion=5e844cc37a5cbaa460e68f9a989d321d63088a89 <8735248ebb918d25427965f0db07939ed0473ec6
- Affected versionversion=5e844cc37a5cbaa460e68f9a989d321d63088a89 <c7fabe372a9031acd00498bc718ce27c253abfd1
- Affected versionversion=5e844cc37a5cbaa460e68f9a989d321d63088a89 <cee78aa24578edac8cf00513dca618c0acc17cd7
- Affected versionversion=8c45a1c6c951bbe7f95db78fcab46f7337364468 <8e029707f50a82c53172359c686b2536ab54e58c
- Affected versionversion=a4add022c1552b0d51a0b89a4781919d6ebac4f9 <62bb2c7f2411a0045c24831f11ecacfc35610815
- Affected versionversion=bd1a5b2307279029faaddbecf2f2ac25eaef8dc6
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo