Skip to main content

CVE-2021-47305: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47305cvecve-2021-47305
Published: Tue May 21 2024 (05/21/2024, 14:35:25 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: dma-buf/sync_file: Don't leak fences on merge failure Each add_fence() call does a dma_fence_get() on the relevant fence. In the error path, we weren't calling dma_fence_put() so all those fences got leaked. Also, in the krealloc_array failure case, we weren't freeing the fences array. Instead, ensure that i and fences are always zero-initialized and dma_fence_put() all the fences and kfree(fences) on every error path.

AI-Powered Analysis

AILast updated: 06/26/2025, 11:07:22 UTC

Technical Analysis

CVE-2021-47305 is a vulnerability identified in the Linux kernel, specifically within the dma-buf synchronization file (sync_file) subsystem. The issue arises from improper handling of dma_fence objects during error conditions in the add_fence() function. Normally, each call to add_fence() increments the reference count of a dma_fence via dma_fence_get(). However, in the error path, the corresponding decrement operation dma_fence_put() was not called, leading to a resource leak of dma_fence objects. Additionally, in the case of krealloc_array failure, the fences array was not freed, further contributing to resource leakage. The fix ensures that the variables tracking fences are zero-initialized and that dma_fence_put() is called on all fences, with the fences array being freed on every error path. This vulnerability primarily results in resource leakage rather than direct code execution or privilege escalation. However, resource leaks in kernel synchronization primitives can degrade system stability and potentially lead to denial of service (DoS) conditions if exploited over time or under heavy load. The vulnerability affects multiple versions of the Linux kernel as indicated by the commit hashes, and no known exploits are currently reported in the wild. The absence of a CVSS score suggests this is a recently disclosed issue with limited immediate exploitation evidence.

Potential Impact

For European organizations, the impact of CVE-2021-47305 is primarily related to system reliability and availability. Linux is widely used across European enterprises, government agencies, and critical infrastructure, often powering servers, cloud environments, and embedded systems. A resource leak in kernel synchronization objects could, under sustained or targeted conditions, cause system instability or crashes, leading to service interruptions. This is particularly relevant for high-availability environments and critical infrastructure sectors such as telecommunications, finance, healthcare, and manufacturing, where Linux servers are prevalent. While this vulnerability does not directly enable unauthorized access or data breaches, the potential for denial of service through resource exhaustion could disrupt operations and incur financial and reputational damage. The lack of known exploits reduces immediate risk, but organizations should remain vigilant given the kernel's central role in system security and stability.

Mitigation Recommendations

To mitigate CVE-2021-47305, European organizations should prioritize applying the official Linux kernel patches that address the dma-buf sync_file resource leak. Kernel updates containing the fix should be deployed promptly, especially on production systems and critical infrastructure. Organizations using custom or long-term support (LTS) kernel versions should verify backported patches or consider upgrading to a patched kernel release. Monitoring system logs for unusual kernel errors or resource exhaustion symptoms related to dma_fence objects can help detect potential exploitation attempts or system degradation. Additionally, implementing resource usage monitoring and alerting on kernel memory and synchronization primitives can provide early warning signs. For environments where immediate patching is challenging, consider isolating vulnerable systems or limiting exposure to untrusted workloads that might trigger the error paths. Regularly reviewing vendor advisories and subscribing to Linux kernel security mailing lists will ensure timely awareness of updates and related vulnerabilities.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T13:27:52.133Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea3a1

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

Last enriched: 6/26/2025, 11:07:22 AM

Last updated: 7/25/2025, 10:09:49 PM

Views: 11

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