CVE-2021-47327 iommu/arm-smmu: Fix arm_smmu_device refcount leak when arm_smmu_rpm_get fails

High 7.1 Published Updated

A reference count leak in the Linux kernel ARM SMMU driver can lead to resource exhaustion and denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2021-47327?

CVE-2021-47327 is a high-severity vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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.

Weakness: CWE-911

Which versions are affected by CVE-2021-47327?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47327?

Apply the vendor's patch.

Is CVE-2021-47327 being exploited?

There is no known exploitation of CVE-2021-47327 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47327, GHSA-8w7w-2rv7-qqw7, UBUNTU-CVE-2021-47327.

Is CVE-2021-47327 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free