CVE-2021-47421·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume In current code, when a PCI error state pci_channel_io_normal is detectd, it will report PCI_ERS_RESULT_CAN_RECOVER status to PCI driver, and PCI driver will continue the execution of PCI resume callback report_resume by pci_walk_bridge, and the callback will go into amdgpu_pci_resume finally, where write lock is releasd unconditionally without acquiring such lock first. In this case, a deadlock will happen when other threads start to acquire the read lock. To fix this, add a member in amdgpu_device strucutre to cache pci_channel_state, and only continue the execution in amdgpu_pci_resume when it's pci_channel_io_frozen.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 5.14.12
- Published
- 2024-05-21
Affected versions
From: 5.11
Until: 5.14.12
Fixed in: 5.14.12
How to fix this CVE
Update your Linux kernel to version 5.14.12 or later to resolve a PCI error handling deadlock vulnerability in the AMD GPU driver. This fix prevents write lock release without proper acquisition in the amdgpu_pci_resume callback, which can cause system hangs when PCI error recovery is triggered. Apply the patch immediately if you are running kernel versions 5.11 through 5.14.11.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r
- Verify if affected version range: if output shows 5.11.x through 5.14.11, your system is vulnerable
- Check kernel logs for PCI error recovery events: sudo journalctl -k | grep -i 'pci.*error\|amdgpu.*resume'
- Confirm the fix by upgrading and verifying the new kernel version: uname -r (should show 5.14.12 or later)
FAQ
What is CVE-2021-47421?
This vulnerability is a deadlock condition in the AMD GPU driver's PCI error recovery handler. When certain PCI error states occur, the driver incorrectly releases a write lock without acquiring it first, causing system hangs when other threads attempt to acquire the read lock.
Is CVE-2021-47421 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and has no publicly available exploits. It requires local access and specific PCI hardware error conditions to trigger.
What versions of Kernel are affected by CVE-2021-47421?
Linux kernel versions 5.11.0 through 5.14.11 are vulnerable. Kernel 5.14.12 and later include the fix.
How do I check if my server is vulnerable to CVE-2021-47421?
Run 'uname -r' and compare your kernel version against the vulnerable range (5.11.x to 5.14.11). If your version falls within this range, your system is vulnerable.
Does Defensia detect CVE-2021-47421?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47421 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/248b061689a40f4fed05252ee2c89f87cf26d7d8
- https://git.kernel.org/stable/c/72e9a1bf9b722628c28092e0c2cd8717edd201dc
- https://git.kernel.org/stable/c/785cc093b6b5a93cc350421a55f3f1eda6585156
- https://git.kernel.org/stable/c/248b061689a40f4fed05252ee2c89f87cf26d7d8
- https://git.kernel.org/stable/c/72e9a1bf9b722628c28092e0c2cd8717edd201dc
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47421. Free for 1 server.
Get started free