Skip to main content

CVE-2021-47517: Vulnerability in Linux Linux

High
VulnerabilityCVE-2021-47517cvecve-2021-47517
Published: Fri May 24 2024 (05/24/2024, 15:09:30 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ethtool: do not perform operations on net devices being unregistered There is a short period between a net device starts to be unregistered and when it is actually gone. In that time frame ethtool operations could still be performed, which might end up in unwanted or undefined behaviours[1]. Do not allow ethtool operations after a net device starts its unregistration. This patch targets the netlink part as the ioctl one isn't affected: the reference to the net device is taken and the operation is executed within an rtnl lock section and the net device won't be found after unregister. [1] For example adding Tx queues after unregister ends up in NULL pointer exceptions and UaFs, such as: BUG: KASAN: use-after-free in kobject_get+0x14/0x90 Read of size 1 at addr ffff88801961248c by task ethtool/755 CPU: 0 PID: 755 Comm: ethtool Not tainted 5.15.0-rc6+ #778 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-4.fc34 04/014 Call Trace: dump_stack_lvl+0x57/0x72 print_address_description.constprop.0+0x1f/0x140 kasan_report.cold+0x7f/0x11b kobject_get+0x14/0x90 kobject_add_internal+0x3d1/0x450 kobject_init_and_add+0xba/0xf0 netdev_queue_update_kobjects+0xcf/0x200 netif_set_real_num_tx_queues+0xb4/0x310 veth_set_channels+0x1c3/0x550 ethnl_set_channels+0x524/0x610

AI-Powered Analysis

AILast updated: 06/30/2025, 14:10:10 UTC

Technical Analysis

CVE-2021-47517 is a vulnerability identified in the Linux kernel's handling of network devices via the ethtool utility. The issue arises during the unregistration process of a network device, where there exists a brief window between the initiation of unregistration and the actual removal of the device from the system. During this interval, ethtool operations can still be performed on the device, which should no longer be accessible. This can lead to undefined or unwanted behavior, including use-after-free (UaF) conditions and null pointer dereferences. Specifically, operations such as adding transmit (Tx) queues after the device has started unregistering can trigger kernel memory safety errors, exemplified by KASAN (Kernel Address Sanitizer) reports indicating use-after-free in kernel object management functions. The vulnerability is rooted in the netlink interface of ethtool, as the ioctl interface is unaffected. The fix involves preventing ethtool operations on devices that have begun unregistration by ensuring that references to the network device are only taken and operated on within a locked section (rtnl lock), guaranteeing the device is still present. This patch eliminates the race condition that allowed operations on devices in an inconsistent state, thereby preventing kernel crashes and potential system instability. No known exploits are currently reported in the wild, and the vulnerability affects Linux kernel versions prior to the patch. The vulnerability is significant because it can cause kernel crashes or memory corruption, potentially leading to denial of service (DoS) or other unpredictable system behavior.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions, especially those heavily reliant on network device management and virtualization environments where virtual network devices (e.g., veth pairs) are common. The impact includes potential kernel crashes leading to denial of service, which can disrupt critical network infrastructure, cloud services, and enterprise applications. Organizations operating data centers, telecom infrastructure, or cloud platforms using Linux-based systems could experience service interruptions. Although no active exploitation is reported, the vulnerability could be leveraged by an attacker with local access or through compromised processes that can invoke ethtool commands, potentially escalating to system instability or denial of service. The vulnerability does not directly expose confidentiality or integrity breaches but affects availability and system reliability, which are critical for operational continuity. Given the widespread use of Linux in European IT environments, especially in sectors like finance, telecommunications, and government, the risk of disruption is non-negligible if unpatched systems are present.

Mitigation Recommendations

European organizations should prioritize updating Linux kernels to versions where this vulnerability is patched. Specifically, ensure that all systems running network device management tools like ethtool are upgraded to the latest stable kernel releases that include the fix preventing operations on unregistering devices. Network administrators should audit their environments for usage of ethtool and related utilities, particularly in virtualized or containerized environments where virtual network devices are frequently created and destroyed. Implement strict access controls to limit which users or processes can execute ethtool commands, reducing the risk of triggering the vulnerability. Additionally, monitoring kernel logs for KASAN or other memory corruption warnings can help detect attempts to exploit this issue. For critical infrastructure, consider implementing kernel live patching solutions to apply fixes without downtime. Finally, incorporate this vulnerability into vulnerability management and patching workflows to ensure timely remediation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-24T15:02:54.824Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9833c4522896dcbe9340

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

Last enriched: 6/30/2025, 2:10:10 PM

Last updated: 8/16/2025, 2:15:50 AM

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