Skip to main content

CVE-2021-47372: Vulnerability in Linux Linux

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

Description

In the Linux kernel, the following vulnerability has been resolved: net: macb: fix use after free on rmmod plat_dev->dev->platform_data is released by platform_device_unregister(), use of pclk and hclk is a use-after-free. Since device unregister won't need a clk device we adjust the function call sequence to fix this issue. [ 31.261225] BUG: KASAN: use-after-free in macb_remove+0x77/0xc6 [macb_pci] [ 31.275563] Freed by task 306: [ 30.276782] platform_device_release+0x25/0x80

AI-Powered Analysis

AILast updated: 07/04/2025, 06:28:10 UTC

Technical Analysis

CVE-2021-47372 is a use-after-free vulnerability identified in the Linux kernel's macb network driver, specifically related to the removal (rmmod) process of the driver. The vulnerability arises because the platform device's platform_data is released by the platform_device_unregister() function, but subsequent code still attempts to use pointers to clock devices (pclk and hclk) that have already been freed. This improper sequence of function calls leads to a use-after-free condition, which is a type of memory corruption where the system accesses memory after it has been freed. The kernel's Kernel Address Sanitizer (KASAN) detected this issue during the macb_remove function execution, indicating a potential for system instability or crashes. Exploiting this vulnerability could allow an attacker with the ability to unload kernel modules to trigger undefined behavior, potentially leading to denial of service (system crash) or, in some cases, privilege escalation if the memory corruption is leveraged further. The vulnerability affects specific Linux kernel versions identified by the commit hash 83a77e9ec4150ee4acc635638f7dedd9da523a26. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. The fix involves adjusting the function call sequence to ensure that clock devices are not accessed after being freed during device unregistration.

Potential Impact

For European organizations, the impact of CVE-2021-47372 depends largely on their use of Linux systems running affected kernel versions with the macb network driver enabled. The macb driver is commonly used in embedded systems and network devices, including some industrial control systems, routers, and specialized hardware. Organizations relying on such devices could face risks of system crashes or instability if an attacker unloads kernel modules maliciously or exploits the use-after-free condition. While remote exploitation is unlikely without local access or elevated privileges, insider threats or compromised local users could leverage this vulnerability to disrupt operations. This could impact critical infrastructure, manufacturing environments, or telecommunications providers in Europe that use embedded Linux devices. Additionally, the vulnerability could be leveraged as part of a multi-stage attack to escalate privileges or bypass security controls, increasing the risk to confidentiality and integrity of sensitive data. The absence of known exploits reduces immediate risk but does not eliminate the need for timely patching, especially in sectors with high security requirements such as finance, healthcare, and government.

Mitigation Recommendations

European organizations should take the following specific steps to mitigate CVE-2021-47372: 1) Identify all Linux systems running kernel versions containing the affected macb driver commit (83a77e9ec4150ee4acc635638f7dedd9da523a26) and verify if the macb driver is in use. 2) Apply the latest Linux kernel patches or updates that include the fix for this vulnerability, ensuring that the function call sequence in macb_remove is corrected. 3) For embedded devices or network hardware using the macb driver, coordinate with vendors to obtain firmware updates or kernel patches. 4) Restrict the ability to unload kernel modules to trusted administrators only, using kernel lockdown features or module signature enforcement to prevent unauthorized rmmod operations. 5) Monitor system logs for unusual module unload attempts or KASAN alerts indicating memory corruption. 6) Implement strict access controls and auditing on systems with local user access to reduce the risk of exploitation. 7) Consider deploying runtime memory protection mechanisms such as Kernel Address Sanitizer (KASAN) in testing environments to detect similar issues proactively. These targeted measures go beyond generic patching by focusing on access control and monitoring specific to the vulnerability's exploitation vector.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682cd0fa1484d88663aebf3d

Added to database: 5/20/2025, 6:59:06 PM

Last enriched: 7/4/2025, 6:28:10 AM

Last updated: 7/29/2025, 2:12:13 PM

Views: 10

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