Use After Free in Linux

CVE-2021-47195

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

Vulnerability class: Use-After-Free

Published · last modified .

CVSS v3 metric

CVSS v3 base score 5.5 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.

EPSS exploit prediction

EPSS: 0.002 (11.1th percentile), scored .

Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 11th percentile — 11.1% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2021-47195: held from 0.002 to 0.002.

EPSS over last 30 days · oldest: 0.002 · newest: 0.002 · change: 0.000

Affected products

  • Linux — versions 5.15, c8dce228db6f81dbc897a018dfc5c418e917cf64, 6098475d4cb48d821bdf453c61118c56e26294f0
  • Linux Kernel

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2021-47195?
CVE-2021-47195 is a medium-severity vulnerability in Linux, classified under Use After Free. CVSS score: 5.5/10. Published 2024-04-10.
How severe is CVE-2021-47195?
Medium severity. CVSS v3 base score is 5.5 out of 10.