CVE-2021-47327
JSON

7.1high

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

Severity
7.1high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.26% (higher than 18% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom d4a44f0750bb9bf7c44c22444a482756b2344a79 before 3761ae0d0e549f2acdaf11f49df4ed06d256b20f, from d4a44f0750bb9bf7c44c22444a482756b2344a79 before c4007596fbdabc29f858dc2e1990858a146b60b2, from d4a44f0750bb9bf7c44c22444a482756b2344a79 before fbf4daa6f4105e01fbd3868006f65c163365c1e3, from d4a44f0750bb9bf7c44c22444a482756b2344a79 before fe92c058199067ae90cf2a901ddf3c271893557a, from d4a44f0750bb9bf7c44c22444a482756b2344a79 before 1adf30f198c26539a62d761e45af72cde570413d, 5.0
Not affected: before 5.0, from 5.4.134 up to 5.4.*, from 5.10.52 up to 5.10.*, from 5.12.19 up to 5.12.*, from 5.13.4 up to 5.13.*, from 5.14 up to *
CVE List
linux linux_kernelfrom 1da177e4c3f4 before 3761ae0d0e54, from 1da177e4c3f4 before c4007596fbda, from 1da177e4c3f4 before fbf4daa6f410, from 1da177e4c3f4 before fe92c0581990, from 1da177e4c3f4 before 1adf30f198c2, before 5.4.134, from 5.5 before 5.10.52, from 5.11 before 5.12.19 and 1 more
Not affected: from 5.4.134 up to 5.5, from 5.10.52 up to 5.11, from 5.12.19 up to 5.13, from 5.13.4 up to 5.14, 5.14
CVE List, NVD

Classification

CWE-911

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: iommu/arm-smmu: corrige la fuga de refcount de arm_smmu_device cuando falla arm_smmu_rpm_get arm_smmu_rpm_get() invoca pm_runtime_get_sync(), lo que aumenta el refcount de "smmu" aunque el valor de retorno sea menor que 0. El problema del conteo de referencias ocurre en algunas rutas de manejo de errores de arm_smmu_rpm_get() en sus funciones de llamada. Cuando arm_smmu_rpm_get() falla, las funciones de la persona que llama se olvidan de disminuir el recuento de "smmu" aumentado en arm_smmu_rpm_get(), lo que provoca una fuga de recuento. Solucione este problema llamando a pm_runtime_resume_and_get() en lugar de pm_runtime_get_sync() en arm_smmu_rpm_get(), lo que puede mantener el recuento equilibrado en caso de fallo.

References

Sources

SourceRecordLicence
CVE ListCVE-2021-47327 changed 2026-05-11CVE Terms of Use
NVDCVE-2021-47327 changed 2026-06-17Public domain