Skip to main content

CVE-2021-47180: Vulnerability in Linux Linux

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

Description

In the Linux kernel, the following vulnerability has been resolved: NFC: nci: fix memory leak in nci_allocate_device nfcmrvl_disconnect fails to free the hci_dev field in struct nci_dev. Fix this by freeing hci_dev in nci_free_device. BUG: memory leak unreferenced object 0xffff888111ea6800 (size 1024): comm "kworker/1:0", pid 19, jiffies 4294942308 (age 13.580s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 60 fd 0c 81 88 ff ff .........`...... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000004bc25d43>] kmalloc include/linux/slab.h:552 [inline] [<000000004bc25d43>] kzalloc include/linux/slab.h:682 [inline] [<000000004bc25d43>] nci_hci_allocate+0x21/0xd0 net/nfc/nci/hci.c:784 [<00000000c59cff92>] nci_allocate_device net/nfc/nci/core.c:1170 [inline] [<00000000c59cff92>] nci_allocate_device+0x10b/0x160 net/nfc/nci/core.c:1132 [<00000000006e0a8e>] nfcmrvl_nci_register_dev+0x10a/0x1c0 drivers/nfc/nfcmrvl/main.c:153 [<000000004da1b57e>] nfcmrvl_probe+0x223/0x290 drivers/nfc/nfcmrvl/usb.c:345 [<00000000d506aed9>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396 [<00000000bc632c92>] really_probe+0x159/0x4a0 drivers/base/dd.c:554 [<00000000f5009125>] driver_probe_device+0x84/0x100 drivers/base/dd.c:740 [<000000000ce658ca>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:846 [<000000007067d05f>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431 [<00000000f8e13372>] __device_attach+0x122/0x250 drivers/base/dd.c:914 [<000000009cf68860>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491 [<00000000359c965a>] device_add+0x5be/0xc30 drivers/base/core.c:3109 [<00000000086e4bd3>] usb_set_configuration+0x9d9/0xb90 drivers/usb/core/message.c:2164 [<00000000ca036872>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238 [<00000000d40d36f6>] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293 [<00000000bc632c92>] really_probe+0x159/0x4a0 drivers/base/dd.c:554

AI-Powered Analysis

AILast updated: 06/26/2025, 18:06:49 UTC

Technical Analysis

CVE-2021-47180 is a vulnerability identified in the Linux kernel's NFC (Near Field Communication) subsystem, specifically within the nci (NFC Controller Interface) driver. The issue arises from a memory leak caused by improper handling of the hci_dev field in the nci_dev structure. The nfcmrvl_disconnect function fails to free the hci_dev pointer, which leads to unreferenced memory allocations that are not released. This leak is fixed by ensuring that the hci_dev is freed in the nci_free_device function. The vulnerability is rooted in kernel code responsible for managing NFC devices, particularly those using the nfcmrvl driver, which supports Marvell NFC controllers. The technical details include a backtrace showing the allocation and failure to free memory in functions such as nci_hci_allocate, nci_allocate_device, and nfcmrvl_nci_register_dev. The leak results in kernel memory being consumed unnecessarily, which can degrade system performance or stability over time. Although no direct exploit has been reported in the wild, the vulnerability could be triggered by interacting with NFC hardware or drivers, potentially through USB interfaces that probe and register NFC devices. The affected versions are identified by a specific commit hash, indicating that the issue is present in certain Linux kernel builds prior to the patch. No CVSS score is assigned yet, and no known exploits have been documented.

Potential Impact

For European organizations, the impact of CVE-2021-47180 is primarily related to system stability and resource exhaustion on Linux systems utilizing NFC hardware with the nfcmrvl driver. While the vulnerability does not directly allow code execution or privilege escalation, the memory leak can lead to degraded performance, potential denial of service (DoS) conditions, or system crashes if the leak accumulates over time. Organizations relying on Linux-based embedded systems, IoT devices, or endpoint devices with NFC capabilities could experience operational disruptions. In sectors such as manufacturing, transportation, healthcare, and finance where NFC is used for secure access, authentication, or contactless payments, this vulnerability could indirectly affect service availability. Additionally, the leak could be exploited as part of a larger attack chain to destabilize systems or evade detection by causing kernel instability. Given the widespread use of Linux in European IT infrastructure, especially in servers, workstations, and embedded devices, the vulnerability warrants attention to maintain system reliability and security posture.

Mitigation Recommendations

To mitigate CVE-2021-47180, European organizations should: 1) Apply the latest Linux kernel updates that include the patch fixing the memory leak in the NFC nci driver. Monitoring vendor advisories and Linux kernel mailing lists for official patches is critical. 2) Disable NFC functionality on devices where it is not required, reducing the attack surface and preventing unnecessary driver loading. 3) For devices requiring NFC, implement strict access controls and monitoring to detect unusual NFC device activity or kernel resource usage spikes. 4) Employ kernel memory leak detection tools and continuous system monitoring to identify abnormal memory consumption patterns that could indicate exploitation attempts. 5) In environments using custom or older Linux kernels, backport the patch or consider upgrading to supported kernel versions to ensure the fix is applied. 6) Coordinate with hardware vendors to confirm NFC driver updates and firmware compatibility. 7) Educate system administrators on the importance of timely kernel updates and the risks associated with NFC-related vulnerabilities.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-03-25T09:12:14.112Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9835c4522896dcbe9fa6

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

Last enriched: 6/26/2025, 6:06:49 PM

Last updated: 7/21/2025, 6:06:10 AM

Views: 6

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