Skip to main content

CVE-2021-47147: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47147cvecve-2021-47147
Published: Mon Mar 25 2024 (03/25/2024, 09:07:43 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ptp: ocp: Fix a resource leak in an error handling path If an error occurs after a successful 'pci_ioremap_bar()' call, it must be undone by a corresponding 'pci_iounmap()' call, as already done in the remove function.

AI-Powered Analysis

AILast updated: 06/26/2025, 19:21:35 UTC

Technical Analysis

CVE-2021-47147 is a vulnerability identified in the Linux kernel related to the Precision Time Protocol (PTP) driver, specifically within the ocp (Open Core Protocol) component. The issue arises from a resource leak in the error handling path of the driver. When the function pci_ioremap_bar() is called successfully to map a PCI device's memory region, if a subsequent error occurs, the allocated resource must be released by calling pci_iounmap(). However, this cleanup call was missing in the error path, leading to a resource leak. This flaw does not directly compromise confidentiality or integrity but impacts availability by potentially exhausting kernel resources over time, which could lead to system instability or crashes. The vulnerability has a CVSS v3.1 base score of 6.2, indicating a medium severity level. The attack vector is local (AV:L), requiring the attacker to have local access to the system, with low attack complexity (AC:L), no privileges required (PR:N), and no user interaction (UI:N). The scope is unchanged (S:U), and the impact is solely on availability (A:H), with no impact on confidentiality or integrity. No known exploits are reported in the wild, and the issue has been addressed by ensuring pci_iounmap() is called appropriately in the error handling path to prevent resource leaks. This vulnerability affects Linux kernel versions containing the specified commit hashes and is relevant to systems running the affected kernel versions with PTP ocp drivers enabled.

Potential Impact

For European organizations, the primary impact of CVE-2021-47147 is on system availability and stability rather than data confidentiality or integrity. Systems running affected Linux kernels with PTP ocp drivers could experience resource exhaustion leading to kernel crashes or degraded performance if the vulnerability is triggered repeatedly. This could disrupt critical infrastructure or services relying on precise time synchronization, such as telecommunications, financial trading platforms, or industrial control systems. Although exploitation requires local access, insider threats or compromised user accounts could leverage this vulnerability to cause denial-of-service conditions. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to potential future attacks. Organizations with Linux-based servers, embedded devices, or network equipment using affected kernels should prioritize patching to maintain operational continuity.

Mitigation Recommendations

To mitigate CVE-2021-47147, European organizations should: 1) Apply the latest Linux kernel patches that address the resource leak in the PTP ocp driver error handling path. 2) Audit systems to identify those running affected kernel versions and verify if PTP ocp drivers are in use. 3) Limit local access to critical systems by enforcing strict access controls and monitoring for unauthorized user activity to reduce the risk of local exploitation. 4) Implement kernel-level resource monitoring to detect abnormal resource consumption that could indicate exploitation attempts. 5) For embedded or specialized devices, coordinate with vendors to obtain firmware or kernel updates incorporating the fix. 6) Incorporate this vulnerability into vulnerability management and patching workflows to ensure timely remediation. These steps go beyond generic advice by focusing on driver-specific patching, access control, and monitoring tailored to the nature of this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-03-04T18:12:48.845Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9834c4522896dcbe9e9b

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

Last enriched: 6/26/2025, 7:21:35 PM

Last updated: 8/15/2025, 4:47:48 PM

Views: 14

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