Skip to main content

CVE-2021-47364: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47364cvecve-2021-47364
Published: Tue May 21 2024 (05/21/2024, 15:03:31 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: comedi: Fix memory leak in compat_insnlist() `compat_insnlist()` handles the 32-bit version of the `COMEDI_INSNLIST` ioctl (whenwhen `CONFIG_COMPAT` is enabled). It allocates memory to temporarily hold an array of `struct comedi_insn` converted from the 32-bit version in user space. This memory is only being freed if there is a fault while filling the array, otherwise it is leaked. Add a call to `kfree()` to fix the leak.

AI-Powered Analysis

AILast updated: 06/30/2025, 11:58:12 UTC

Technical Analysis

CVE-2021-47364 is a vulnerability identified in the Linux kernel specifically within the Comedi (Control and Measurement Device Interface) subsystem. The issue arises in the function compat_insnlist(), which is responsible for handling the 32-bit compatibility version of the COMEDI_INSNLIST ioctl when the kernel is configured with CONFIG_COMPAT enabled. This function allocates memory to temporarily hold an array of struct comedi_insn converted from the 32-bit user-space version. However, the vulnerability is a memory leak caused by the allocated memory not being freed properly in the normal execution path—only freed if a fault occurs during the filling of the array. The fix involves adding a call to kfree() to ensure the allocated memory is released correctly, preventing the leak. This vulnerability does not appear to allow direct code execution or privilege escalation but can lead to resource exhaustion over time if the ioctl is invoked repeatedly, potentially degrading system performance or causing denial of service. The affected versions are specific Linux kernel commits identified by the hash b8d47d8813055ce38c0d2ad913d5462017e52692. There are no known exploits in the wild, and no CVSS score has been assigned yet. The vulnerability is primarily relevant to systems using the Comedi subsystem with 32-bit compatibility enabled, which is common in certain industrial, scientific, or measurement device environments running Linux kernels with this configuration.

Potential Impact

For European organizations, the impact of CVE-2021-47364 is generally limited but context-dependent. Organizations operating industrial control systems, scientific research infrastructure, or specialized measurement devices running Linux with the Comedi subsystem and 32-bit compatibility enabled are at risk. The memory leak could lead to gradual resource exhaustion, causing system instability or denial of service, which in critical environments could disrupt operations or data acquisition processes. While it does not directly compromise confidentiality or integrity, availability could be affected if the leak is exploited through repeated ioctl calls. This could impact manufacturing plants, research labs, or utilities relying on Linux-based measurement systems. However, general enterprise IT systems without Comedi usage or CONFIG_COMPAT enabled are unlikely to be affected. The absence of known exploits and the requirement for specific ioctl invocation reduce the immediate threat level, but the vulnerability should be addressed to maintain system reliability and prevent potential denial of service scenarios.

Mitigation Recommendations

To mitigate CVE-2021-47364, European organizations should: 1) Apply the latest Linux kernel patches that include the fix for this memory leak, ensuring the kfree() call is present in compat_insnlist(). 2) Audit systems running the Comedi subsystem with CONFIG_COMPAT enabled to identify affected hosts. 3) Limit access to ioctl interfaces related to COMEDI_INSNLIST to trusted users and processes only, reducing the risk of repeated malicious or accidental invocation. 4) Monitor system resource usage and logs for signs of memory leaks or unusual ioctl activity that could indicate exploitation attempts. 5) For critical environments, consider isolating or sandboxing measurement device interfaces to contain potential impacts. 6) Engage with vendors of industrial or scientific Linux distributions to confirm patch availability and deployment timelines. These steps go beyond generic advice by focusing on the specific subsystem and configuration involved, emphasizing access control and monitoring tailored to the vulnerability's characteristics.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T14:58:30.809Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9833c4522896dcbe8f2c

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

Last enriched: 6/30/2025, 11:58:12 AM

Last updated: 8/16/2025, 9:38:32 AM

Views: 12

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