CVE-2021-47420·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: fix a potential ttm->sg memory leak Memory is allocated for ttm->sg by kmalloc in kfd_mem_dmamap_userptr, but isn't freed by kfree in kfd_mem_dmaunmap_userptr. Free it!
- Severity
- medium
- Software
- Kernel
- Fixed in
- 5.14.12
- Published
- 2024-05-21
Affected versions
From: 5.14
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 memory leak in the AMD KFD DMA mapping subsystem. This vulnerability allows a local user to exhaust system memory resources through improper cleanup of allocated scatter-gather table memory. Systems running kernel versions 5.14 through 5.14.11 should prioritize this update to prevent denial-of-service conditions.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with `uname -r` and compare against 5.14.12 or later
- Step 2: Verify AMD KFD is in use by checking `lsmod | grep amdkfd` and `dmesg | grep amdkfd`
- Step 3: Monitor memory usage trends with `free -h` and `watch -n 5 'free -h'` during typical workloads to detect gradual memory depletion
- Step 4: After patching, reboot with `sudo reboot` and confirm the new kernel version with `uname -r` matches 5.14.12 or higher
FAQ
What is CVE-2021-47420?
CVE-2021-47420 is a memory leak vulnerability in the Linux kernel's AMD KFD (Kernel Fusion Driver) DMA mapping code where allocated scatter-gather table memory is not properly freed during unmapping operations. This can lead to memory exhaustion and system denial-of-service.
Is CVE-2021-47420 being actively exploited?
No, CVE-2021-47420 is not listed in the CISA Known Exploited Vulnerabilities catalog and has no publicly available exploits. However, local attackers with user privileges could trigger the memory leak.
What versions of Kernel are affected by CVE-2021-47420?
Kernel versions 5.14 through 5.14.11 are affected. The vulnerability was resolved in kernel version 5.14.12 and later.
How do I check if my server is vulnerable to CVE-2021-47420?
Run `uname -r` to check your kernel version. If the output shows 5.14.x where x is less than 12, your system is vulnerable. Additionally, verify AMD KFD is present with `lsmod | grep amdkfd`.
Does Defensia detect CVE-2021-47420?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2021-47420 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47420. Free for 1 server.
Get started free