{"cve":"CVE-2021-47195","nvd":{"published":"2024-04-10T19:15:47.853","modified":"2026-06-17T04:16:53.067","status":"Modified","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: fix use-after-free of the add_lock mutex\n\nCommit 6098475d4cb4 (\"spi: Fix deadlock when adding SPI controllers on\nSPI buses\") introduced a per-controller mutex. But mutex_unlock() of\nsaid lock is called after the controller is already freed:\n\n  spi_unregister_controller(ctlr)\n  -> put_device(&ctlr->dev)\n    -> spi_controller_release(dev)\n  -> mutex_unlock(&ctrl->add_lock)\n\nMove the put_device() after the mutex_unlock().","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5},"cwes":["CWE-416"],"references":["https://git.kernel.org/stable/c/11eab327a2a8bd36c38afbff920ae1bd45588dd4","https://git.kernel.org/stable/c/37330f37f6666c7739a44b2b6b95b047ccdbed2d","https://git.kernel.org/stable/c/54c2c96eafcfd242e52e932ab54ace4784efe1dd","https://git.kernel.org/stable/c/6c53b45c71b4920b5e62f0ea8079a1da382b9434","https://git.kernel.org/stable/c/37330f37f6666c7739a44b2b6b95b047ccdbed2d"],"products":["linux:linux_kernel"],"source":"nvd","synced_at":"2026-10-19T21:48:32.179249784+00:00"},"epss":{"cve":"CVE-2021-47195","score":0.00219,"percentile":0.12404,"date":"2026-10-31"},"kev":null,"osv":[],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}