LiveActive security incident?Get immediate response
CVE Record

CVE-2021-47195: spi: fix use-after-free of the add_lock mutex

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().

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysisunknown

Security readout for executives and security teams

Plain-English summary

This is a Linux kernel memory-safety flaw in SPI controller cleanup. A lock could be released after the controller object was already freed, creating a use-after-free condition. The public record does not provide CVSS, confirmed impact, or attack prerequisites.

Executive priority

Treat as a targeted kernel maintenance issue unless your environment depends heavily on SPI hardware. Prioritize patch verification for embedded, IoT, industrial, and appliance-like Linux systems. There is no sourced evidence of active exploitation in the provided bundle.

Technical view

The bug is in the Linux SPI subsystem. A prior change added a per-controller add_lock mutex, but spi_unregister_controller() could call put_device(), trigger spi_controller_release(), and then unlock ctlr->add_lock after the controller memory was freed. The fix moves put_device() after mutex_unlock().

Likely exposure

Exposure appears limited to Linux kernels carrying the affected SPI code, especially systems using SPI controllers or SPI controller registration paths. The source metadata lists Linux 5.15, 5.15.5, and 5.16-related entries, but distro backports require vendor-specific verification.

Exploitation context

The provided sources do not report active exploitation, public exploit use, KEV listing, remote reachability, or required privileges. The evidence supports a kernel use-after-free during SPI controller unregister logic, but not a defined attacker path.

Researcher notes

Evidence is narrow but specific: the vulnerability is a lifetime-ordering error around add_lock and put_device() in SPI controller teardown. Do not assume exploitability characteristics beyond a kernel use-after-free without additional vendor or upstream analysis.

Mitigation direction

  • Check your Linux vendor advisory for CVE-2021-47195 coverage.
  • Upgrade to a kernel containing the referenced stable fix commits.
  • Prioritize embedded, appliance, and hardware-integrated systems using SPI.
  • Confirm whether vendor kernels backported the SPI controller fix.

Validation and detection

  • Inventory running kernel versions and vendor patch levels.
  • Check kernel source or changelog for the referenced stable commits.
  • Identify systems with SPI controller hardware or enabled SPI modules.
  • Review crash reports for SPI unregister or controller-release faults.
Prepared
Confidence
medium
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2021-47195 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
3Timeline events
2ADP providers
5Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
CVECVE Program Container
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinuxaa3f3d7bef59583f2d3234173105a27ff61ef8fe, c8dce228db6f81dbc897a018dfc5c418e917cf64, 6098475d4cb48d821bdf453c61118c56e26294f0, 6098475d4cb48d821bdf453c61118c56e26294f0, 722ef19a161ce3fffb3d1b01ce2301c306639bddunaffected
LinuxLinux5.15, 0, 5.15.5, 5.16affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.