Skip to main content

CVE-2021-47388: Vulnerability in Linux Linux

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

Description

In the Linux kernel, the following vulnerability has been resolved: mac80211: fix use-after-free in CCMP/GCMP RX When PN checking is done in mac80211, for fragmentation we need to copy the PN to the RX struct so we can later use it to do a comparison, since commit bf30ca922a0c ("mac80211: check defrag PN against current frame"). Unfortunately, in that commit I used the 'hdr' variable without it being necessarily valid, so use-after-free could occur if it was necessary to reallocate (parts of) the frame. Fix this by reloading the variable after the code that results in the reallocations, if any. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=214401.

AI-Powered Analysis

AILast updated: 06/28/2025, 05:10:24 UTC

Technical Analysis

CVE-2021-47388 is a use-after-free vulnerability found in the Linux kernel's mac80211 subsystem, which is responsible for handling Wi-Fi (802.11) protocol operations. Specifically, the flaw occurs during the processing of CCMP/GCMP encrypted frames in the receive (RX) path. The vulnerability arises from improper handling of the Packet Number (PN) checking mechanism during frame defragmentation. In the affected code, after a commit (bf30ca922a0c) introduced PN comparison against the current frame, the 'hdr' variable—representing the frame header—was used without ensuring its validity post potential frame reallocations. This led to a use-after-free condition when the frame needed to be reallocated during defragmentation, causing the 'hdr' pointer to reference freed memory. Exploiting this flaw could allow an attacker to cause memory corruption, potentially leading to kernel crashes (denial of service) or, in more severe cases, arbitrary code execution with kernel privileges. The vulnerability affects multiple Linux kernel versions identified by specific commits, indicating it has been present for some time before being patched. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. The fix involves reloading the 'hdr' variable after any code that may cause frame reallocations, ensuring the pointer remains valid before use.

Potential Impact

For European organizations, this vulnerability poses a significant risk primarily to systems running vulnerable Linux kernel versions with Wi-Fi capabilities relying on the mac80211 stack. This includes servers, desktops, embedded devices, and IoT devices using Linux-based Wi-Fi drivers. Exploitation could lead to denial of service through kernel crashes, disrupting critical services and operations. More critically, if exploited for arbitrary code execution, attackers could gain kernel-level privileges, compromising system confidentiality, integrity, and availability. This could facilitate lateral movement within networks, data exfiltration, or persistent backdoors. Given the widespread use of Linux in enterprise environments, telecommunications infrastructure, and critical systems across Europe, the vulnerability could impact sectors such as finance, healthcare, government, and industrial control systems. The lack of known exploits currently reduces immediate risk, but the presence of a use-after-free in kernel Wi-Fi processing is a high-value target for attackers, especially in targeted attacks or espionage campaigns.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions where this vulnerability is patched. Since the issue is in the mac80211 subsystem, kernel updates from trusted vendors or distributions that include the fix should be applied promptly. For embedded and IoT devices, coordinate with device manufacturers to obtain firmware updates or consider network segmentation to isolate vulnerable devices. Additionally, implement strict network access controls to limit exposure of Wi-Fi-enabled devices to untrusted networks. Monitoring kernel logs for unusual crashes or anomalies in Wi-Fi traffic can help detect exploitation attempts. Employing host-based intrusion detection systems (HIDS) with kernel integrity monitoring can also aid in early detection. For environments where immediate patching is not feasible, disabling Wi-Fi or restricting wireless interfaces temporarily can reduce attack surface. Finally, maintain an inventory of Linux-based devices and their kernel versions to ensure comprehensive coverage of patching efforts.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9822c4522896dcbde0db

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

Last enriched: 6/28/2025, 5:10:24 AM

Last updated: 8/12/2025, 11:37:53 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