Skip to main content

CVE-2021-47671: Vulnerability in Linux Linux

Low
VulnerabilityCVE-2021-47671cvecve-2021-47671
Published: Thu Apr 17 2025 (04/17/2025, 18:01:31 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path In es58x_rx_err_msg(), if can->do_set_mode() fails, the function directly returns without calling netif_rx(skb). This means that the skb previously allocated by alloc_can_err_skb() is not freed. In other terms, this is a memory leak. This patch simply removes the return statement in the error branch and let the function continue. Issue was found with GCC -fanalyzer, please follow the link below for details.

AI-Powered Analysis

AILast updated: 06/30/2025, 15:57:05 UTC

Technical Analysis

CVE-2021-47671 is a vulnerability identified in the Linux kernel specifically within the CAN (Controller Area Network) driver for the ETAS ES58x hardware (function es58x_rx_err_msg). The issue arises in the error handling path of this function. When the function can->do_set_mode() fails, the code previously returned immediately without calling netif_rx(skb), which is responsible for handling the socket buffer (skb) allocated earlier by alloc_can_err_skb(). This omission leads to a memory leak because the allocated skb is never freed. The patch to fix this vulnerability removes the premature return statement, allowing the function to continue and properly free the allocated memory. This vulnerability was detected using GCC's static analyzer (fanalyzer) and is classified under CWE-401 (Improper Release of Memory). The CVSS v3.1 base score is 3.3, indicating a low severity issue, with the vector AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L, meaning the attack requires local access with low complexity, low privileges, no user interaction, and impacts only availability by causing a memory leak. No known exploits are reported in the wild, and the vulnerability does not affect confidentiality or integrity but can degrade system availability by exhausting memory resources over time if triggered repeatedly. The affected Linux kernel versions are identified by specific commit hashes, and the vulnerability is resolved by applying the patch that corrects the error handling flow in the CAN driver code.

Potential Impact

For European organizations, the impact of CVE-2021-47671 is generally low but context-dependent. The vulnerability affects Linux systems using the ETAS ES58x CAN hardware interface, which is specialized equipment primarily used in automotive, industrial control, and embedded systems environments. Organizations involved in automotive manufacturing, industrial automation, or embedded device development and testing in Europe could potentially be affected if they deploy Linux kernels with the vulnerable CAN driver. The memory leak could lead to gradual resource exhaustion, causing degraded system performance or crashes, which in critical industrial or automotive systems could disrupt operations or safety functions. However, since exploitation requires local access and low privileges, remote exploitation is not feasible, limiting the threat surface. The absence of known exploits and the low CVSS score further reduce immediate risk. Nonetheless, in sectors where CAN bus communication is critical (e.g., automotive suppliers in Germany, France, Italy), even low-severity availability issues can have operational consequences if left unpatched. For general IT infrastructure in European organizations, the impact is minimal as this vulnerability is highly specialized and hardware-dependent.

Mitigation Recommendations

To mitigate CVE-2021-47671, European organizations should: 1) Identify Linux systems using the ETAS ES58x CAN hardware and verify kernel versions for the presence of the vulnerable code. 2) Apply the official Linux kernel patch that fixes the error handling in es58x_rx_err_msg(), ensuring the memory leak is resolved. 3) If patching is not immediately possible, monitor system memory usage on affected devices to detect abnormal leaks or crashes. 4) Limit local access to systems with the vulnerable CAN driver to trusted personnel only, as exploitation requires local privileges. 5) Incorporate this vulnerability into regular vulnerability management and patching cycles, especially for embedded and industrial Linux systems. 6) For organizations developing or deploying embedded Linux systems with CAN interfaces, conduct code audits and static analysis to detect similar memory management issues proactively. 7) Maintain up-to-date static analysis tools like GCC fanalyzer in development pipelines to catch such issues early. These steps go beyond generic advice by focusing on hardware-specific identification, access control, and development process improvements.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-04-16T07:16:05.753Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9834c4522896dcbe96e0

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

Last enriched: 6/30/2025, 3:57:05 PM

Last updated: 8/15/2025, 9:22:59 PM

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