CVE-2021-47195: spi: fix use-after-free of the add_lock mutex
Vulnerability summary
CVE-2021-47195 is a medium (CVSS 5.5) Use After Free vulnerability in linux. EPSS estimates a 0.22% chance of exploitation in the next 30 days, higher than 12.4% of scored vulnerabilities.
Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 5 · Related 5Timeline
- 10-04-2024PublishedVulnerability first disclosed.
- 23-05-2026Last modifiedVulnerability information updated.
Description
In the Linux kernel, the following vulnerability has been resolved: spi: fix use-after-free of the add_lock mutex Commit 6098475d4cb4 ("spi: Fix deadlock when adding SPI controllers on SPI buses") introduced a per-controller mutex. But mutex_unlock() of said lock is called after the controller is already freed: spi_unregister_controller(ctlr) -> put_device(&ctlr->dev) -> spi_controller_release(dev) -> mutex_unlock(&ctrl->add_lock) Move the put_device() after the mutex_unlock().
CVSS metrics
3 scores · 3 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.22%
Chance of exploitation in the next 30 days
Percentile
12%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.22% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ubuntu69 products
- linux-allwinner-5.19All versions (No fix recorded)
- linux-aws-5.0All versions (No fix recorded)
- linux-aws-5.11All versions (No fix recorded)
- linux-aws-5.13All versions (No fix recorded)
- linux-aws-5.19All versions (No fix recorded)
Linux2 products
- linux≥ aa3f3d7bef59583f2d3234173105a27ff61ef8fe, < 54c2c96eafcfd242e52e932ab54ace4784efe1dd | ≥ c8dce228db6f81dbc897a018dfc5c418e917cf64, < 11eab327a2a8bd36c38afbff920ae1bd45588dd4 | ≥ 6098475d4cb48d821bdf453c61118c56e26294f0, < 37330f37f6666c7739a44b2b6b95b047ccdbed2d | ≥ 6098475d4cb48d821bdf453c61118c56e26294f0, < 6c53b45c71b4920b5e62f0ea8079a1da382b9434 | 722ef19a161ce3fffb3d1b01ce2301c306639bdd | ≥ 5.14.15, < 5.15 | 5.15
- linux_kernel> 5.15.0, < 5.15.5
Debian1 product
- linux< 5.15.5-1
3 vendors · 72 products