CVE-2021-47195

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
10/04/2024
Last modified:
17/11/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> spi: fix use-after-free of the add_lock mutex<br /> <br /> Commit 6098475d4cb4 ("spi: Fix deadlock when adding SPI controllers on<br /> SPI buses") introduced a per-controller mutex. But mutex_unlock() of<br /> said lock is called after the controller is already freed:<br /> <br /> spi_unregister_controller(ctlr)<br /> -&gt; put_device(&amp;ctlr-&gt;dev)<br /> -&gt; spi_controller_release(dev)<br /> -&gt; mutex_unlock(&amp;ctrl-&gt;add_lock)<br /> <br /> Move the put_device() after the mutex_unlock().

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.15.0 (excluding) 5.15.5 (excluding)