Vulnerability · Published May 21, 2024 · Assigned by Linux
CVE-2021-47327iommu/arm-smmu: Fix arm_smmu_device refcount leak when arm_smmu_rpm_get fails
High 7.1
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 5.14.6-1 | DEBIAN-CVE-2021-47327 |
| Debian:13 | linux | 5.14.6-1 | DEBIAN-CVE-2021-47327 |
| Debian:14 | linux | 5.14.6-1 | DEBIAN-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2021-47327 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2021-47327 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | d4a44f0750bb9bf7c44c22444a482756b2344a79 – before 3761ae0d0e549f2acdaf11f49df4ed06d256b20fd4a44f0750bb9bf7c44c22444a482756b2344a79 – before c4007596fbdabc29f858dc2e1990858a146b60b2d4a44f0750bb9bf7c44c22444a482756b2344a79 – before fbf4daa6f4105e01fbd3868006f65c163365c1e3d4a44f0750bb9bf7c44c22444a482756b2344a79 – before fe92c058199067ae90cf2a901ddf3c271893557ad4a44f0750bb9bf7c44c22444a482756b2344a79 – before 1adf30f198c26539a62d761e45af72cde570413d |
| Linux | Linux | 5.0 |
Weakness: CWE-911 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
References
- 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
- https://git.kernel.org/stable/c/1adf30f198c26539a62d761e45af72cde570413d