Skip to main content

CVE-2021-47005: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47005cvecve-2021-47005
Published: Wed Feb 28 2024 (02/28/2024, 08:13:25 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: PCI: endpoint: Fix NULL pointer dereference for ->get_features() get_features ops of pci_epc_ops may return NULL, causing NULL pointer dereference in pci_epf_test_alloc_space function. Let us add a check for pci_epc_feature pointer in pci_epf_test_bind before we access it to avoid any such NULL pointer dereference and return -ENOTSUPP in case pci_epc_feature is not found. When the patch is not applied and EPC features is not implemented in the platform driver, we see the following dump due to kernel NULL pointer dereference. Call trace: pci_epf_test_bind+0xf4/0x388 pci_epf_bind+0x3c/0x80 pci_epc_epf_link+0xa8/0xcc configfs_symlink+0x1a4/0x48c vfs_symlink+0x104/0x184 do_symlinkat+0x80/0xd4 __arm64_sys_symlinkat+0x1c/0x24 el0_svc_common.constprop.3+0xb8/0x170 el0_svc_handler+0x70/0x88 el0_svc+0x8/0x640 Code: d2800581 b9403ab9 f9404ebb 8b394f60 (f9400400) ---[ end trace a438e3c5a24f9df0 ]---

AI-Powered Analysis

AILast updated: 06/30/2025, 19:10:57 UTC

Technical Analysis

CVE-2021-47005 is a vulnerability identified in the Linux kernel related to the PCI endpoint (PCIe Endpoint Controller, EPC) subsystem. Specifically, the issue arises from a NULL pointer dereference in the pci_epf_test_alloc_space function caused by the get_features operation of pci_epc_ops returning NULL. The vulnerability occurs when the platform driver does not implement EPC features, and the kernel code fails to check for a NULL pci_epc_feature pointer before dereferencing it in pci_epf_test_bind. This leads to a kernel NULL pointer dereference, which results in a kernel panic or system crash, as evidenced by the call trace provided. The root cause is the lack of a NULL check for pci_epc_feature, which the patch addresses by adding a check and returning -ENOTSUPP if the feature is not found. This vulnerability affects Linux kernel versions prior to the patch and can cause denial of service (DoS) by crashing the kernel when the vulnerable code path is exercised. The vulnerability does not appear to have known exploits in the wild, and no CVSS score has been assigned yet. The issue is technical and specific to the PCI endpoint feature implementation in the Linux kernel, which is used in systems that support PCIe endpoint devices and their configuration via the kernel's PCI EPC framework.

Potential Impact

For European organizations, the primary impact of CVE-2021-47005 is the potential for denial of service due to kernel crashes triggered by NULL pointer dereference in the PCI EPC subsystem. Organizations running Linux systems with PCIe endpoint devices or drivers that interact with the PCI EPC framework are at risk. This could affect servers, embedded systems, or specialized hardware platforms that rely on PCIe endpoint features. The impact includes system downtime, potential disruption of critical services, and operational interruptions. While this vulnerability does not directly lead to privilege escalation or data breaches, the resulting kernel panic can cause service outages and may require system reboots, impacting availability. In environments with high availability or real-time requirements, such as industrial control systems, telecommunications infrastructure, or financial services, this could have significant operational consequences. Since the vulnerability requires the platform driver to lack EPC feature implementation and the vulnerable code path to be exercised, the risk is somewhat limited to specific hardware and driver configurations. However, given the widespread use of Linux in European IT infrastructure, especially in servers and embedded devices, the vulnerability warrants attention to prevent unexpected system crashes.

Mitigation Recommendations

To mitigate CVE-2021-47005, European organizations should: 1) Apply the official Linux kernel patch that adds the necessary NULL pointer checks in the pci_epf_test_bind function to prevent dereferencing NULL pci_epc_feature pointers. 2) Update Linux kernel versions to the latest stable releases that include this fix, ensuring all systems running PCI EPC-related drivers are patched. 3) Audit and verify the platform drivers used in their environments to confirm proper implementation of EPC features or ensure they are not invoking the vulnerable code paths. 4) Implement monitoring and alerting for kernel panics or crashes related to PCI EPC operations to detect potential exploitation attempts or accidental triggers. 5) For critical systems, consider isolating or disabling PCI endpoint features if not required, reducing the attack surface. 6) Engage with hardware vendors to confirm compatibility and support for patched kernel versions and EPC feature implementations. These steps go beyond generic advice by focusing on the specific subsystem and driver configurations involved in this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-27T18:42:55.952Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9834c4522896dcbe9a22

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

Last enriched: 6/30/2025, 7:10:57 PM

Last updated: 8/12/2025, 6:01:19 AM

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