Skip to main content

CVE-2021-47327: Vulnerability in Linux Linux

High
VulnerabilityCVE-2021-47327cvecve-2021-47327
Published: Tue May 21 2024 (05/21/2024, 14:35:39 UTC)
Source: CVE
Vendor/Project: Linux
Product: 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.

AI-Powered Analysis

AILast updated: 07/03/2025, 06:11:05 UTC

Technical Analysis

CVE-2021-47327 is a vulnerability identified in the Linux kernel specifically related to the ARM System Memory Management Unit (SMMU) driver, which manages input-output memory management units (IOMMU) on ARM platforms. The issue arises from a reference count leak in the arm_smmu_device component when the function arm_smmu_rpm_get() fails. This function calls pm_runtime_get_sync(), which increments the reference count of the "smmu" device even if the function returns an error (a negative value). The caller functions of arm_smmu_rpm_get() do not properly decrement this reference count in error scenarios, leading to a leak. Over time, this leak can cause resource exhaustion, potentially resulting in denial of service (DoS) conditions due to the inability to properly manage device power states or memory mappings. The fix involves replacing pm_runtime_get_sync() with pm_runtime_resume_and_get() in arm_smmu_rpm_get(), which correctly balances the reference count even when failures occur. This vulnerability is classified under CWE-911 (Improper Release of Memory Before Removing Last Reference) and has a CVSS v3.1 score of 7.1 (high severity), reflecting its significant impact on confidentiality and availability without requiring user interaction but needing low privileges and local access. No known exploits are reported in the wild as of the publication date (May 21, 2024).

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels on ARM-based hardware that utilize the ARM SMMU driver, such as certain embedded systems, IoT devices, and ARM servers. The reference count leak can lead to resource exhaustion, causing system instability or denial of service, which could disrupt critical services or infrastructure operations. Confidentiality impact is high because improper management of memory and device states could potentially be leveraged in complex attack chains to access sensitive data, although direct exploitation for data breach is less likely. The availability impact is high due to the potential for system crashes or degraded performance. European sectors relying on ARM-based Linux systems in telecommunications, industrial control, or cloud edge computing could be particularly affected. Given the local access requirement and low complexity of exploitation, insider threats or attackers with limited system access could trigger the vulnerability, emphasizing the need for timely patching in environments with multi-tenant or shared access.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernel versions to include the patch that replaces pm_runtime_get_sync() with pm_runtime_resume_and_get() in the arm_smmu_rpm_get() function. Since the vulnerability affects the kernel level, kernel upgrades distributed by Linux distributions (e.g., Debian, Ubuntu, Red Hat, SUSE) should be applied promptly. For embedded or custom ARM Linux systems, vendors should be contacted to obtain updated firmware or kernel patches. Additionally, organizations should audit systems running ARM-based Linux kernels to identify vulnerable versions and restrict local access to trusted users only. Implementing strict access controls and monitoring for unusual resource usage or device power state anomalies can help detect exploitation attempts. Employing runtime integrity checking and kernel security modules (e.g., SELinux, AppArmor) may provide additional defense layers. Finally, organizations should maintain an inventory of ARM-based Linux systems to ensure comprehensive coverage of patching efforts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T14:28:16.975Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea465

Added to database: 5/21/2025, 9:09:09 AM

Last enriched: 7/3/2025, 6:11:05 AM

Last updated: 7/31/2025, 11:54:32 PM

Views: 17

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats