CVE-2021-47327·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: iommu/arm-smmu: Fix arm_smmu_device refcount leak when arm_smmu_rpm_get fails arm_smmu_rpm_get() invokes pm_runtime_get_sync(), which increases the refcount of the "smmu" even though the return value is less than 0. The reference counting issue happens in some error handling paths of arm_smmu_rpm_get() in its caller functions. When arm_smmu_rpm_get() fails, the caller functions forget to decrease the refcount of "smmu" increased by arm_smmu_rpm_get(), causing a refcount leak. Fix this issue by calling pm_runtime_resume_and_get() instead of pm_runtime_get_sync() in arm_smmu_rpm_get(), which can keep the refcount balanced in case of failure.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.13.4
- Published
- 2024-05-21
Affected versions
From: 5.13
Until: 5.13.4
Fixed in: 5.13.4
How to fix this CVE
Update your Linux kernel to version 5.13.4 or later to resolve a resource leak in the ARM SMMU driver's power management handling. The vulnerability occurs when the runtime power management layer fails to properly balance reference counts during error conditions, leading to kernel resource exhaustion over time. Apply the latest kernel patches through your distribution's package manager to ensure the refcount balancing fix is in place.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r | awk -F. '{print $1"."$2"."$3}'
- Verify if ARM SMMU driver is loaded: lsmod | grep -i smmu (relevant on ARM64 systems with IOMMU enabled)
- Check dmesg for power management errors: dmesg | grep -i 'smmu\|pm_runtime\|refcount'
- Confirm the fix: grep -r 'pm_runtime_resume_and_get' /lib/modules/$(uname -r)/kernel/drivers/iommu/ 2>/dev/null || echo 'Not patched'
FAQ
What is CVE-2021-47327?
This vulnerability involves a reference counting leak in the ARM SMMU IOMMU driver where failed power management operations fail to properly decrement the device reference count, eventually causing kernel resource exhaustion and system instability.
Is CVE-2021-47327 being actively exploited?
No, this vulnerability is not included in CISA's actively exploited vulnerabilities catalog and no public exploits are known. It is a resource management bug typically triggered through driver error paths.
What versions of Kernel are affected by CVE-2021-47327?
Linux kernel versions 5.13 through 5.13.3 are affected. Version 5.13.4 and later contain the fix.
How do I check if my server is vulnerable to CVE-2021-47327?
Run: uname -r and compare your kernel version against 5.13.4. If your version is between 5.13 and 5.13.3 and the system uses ARM64 architecture with SMMU IOMMU enabled, it is vulnerable.
Does Defensia detect CVE-2021-47327?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47327 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1adf30f198c26539a62d761e45af72cde570413d
- https://git.kernel.org/stable/c/3761ae0d0e549f2acdaf11f49df4ed06d256b20f
- https://git.kernel.org/stable/c/c4007596fbdabc29f858dc2e1990858a146b60b2
- https://git.kernel.org/stable/c/fbf4daa6f4105e01fbd3868006f65c163365c1e3
- https://git.kernel.org/stable/c/fe92c058199067ae90cf2a901ddf3c271893557a
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47327. Free for 1 server.
Get started free