CVE-2021-47469: spi: Fix deadlock when adding SPI controllers on SPI buses
In the Linux kernel, the following vulnerability has been resolved: spi: Fix deadlock when adding SPI controllers on SPI buses Currently we have a global spiaddlock which we take when adding new devices so that we can check that we're not trying to reuse a chip select that's already controlled. This means that if the SPI device is itself a SPI controller and triggers the instantiation of further SPI devices we trigger a deadlock as we try to register and instantiate those devices while in the process of doing so for the parent controller and hence already holding the global spiaddlock. Since we only care about concurrency within a single SPI bus move the lock to be per controller, avoiding the deadlock. This can be easily triggered in the case of spi-mux.
Other sources
Rejected reason: This CVE ID has been rejected or withdrawn by its CVE Numbering Authority.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Change SPI device-add locking from the global spi_add_lock to a lock scoped per SPI controller, so nested SPI device instantiation on spi-mux does not deadlock.
Event History
Frequently Asked Questions
What is the severity of CVE-2021-47469?
CVE-2021-47469 is a vulnerability in the Linux kernel that could potentially lead to a deadlock when adding SPI controllers.
How do I fix CVE-2021-47469?
To fix CVE-2021-47469, you should upgrade to a patched version of the Linux kernel that resolves this deadlock issue.
Which versions of the Linux kernel are affected by CVE-2021-47469?
CVE-2021-47469 affects Linux kernel versions prior to 5.10.230, 5.14.15, and certain 5.15 release candidates.
Is CVE-2021-47469 a critical vulnerability?
The criticality of CVE-2021-47469 may depend on the specific system's use case and configuration, but it is important to address it to prevent potential deadlocks.
Where can I find more information on CVE-2021-47469?
Detailed information about CVE-2021-47469 can be found in official Linux kernel patches and security advisories.