Skip to main content

CVE-2024-56539: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-56539cvecve-2024-56539
Published: Fri Dec 27 2024 (12/27/2024, 14:11:21 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan() Replace one-element array with a flexible-array member in `struct mwifiex_ie_types_wildcard_ssid_params` to fix the following warning on a MT8173 Chromebook (mt8173-elm-hana): [ 356.775250] ------------[ cut here ]------------ [ 356.784543] memcpy: detected field-spanning write (size 6) of single field "wildcard_ssid_tlv->ssid" at drivers/net/wireless/marvell/mwifiex/scan.c:904 (size 1) [ 356.813403] WARNING: CPU: 3 PID: 742 at drivers/net/wireless/marvell/mwifiex/scan.c:904 mwifiex_scan_networks+0x4fc/0xf28 [mwifiex] The "(size 6)" above is exactly the length of the SSID of the network this device was connected to. The source of the warning looks like: ssid_len = user_scan_in->ssid_list[i].ssid_len; [...] memcpy(wildcard_ssid_tlv->ssid, user_scan_in->ssid_list[i].ssid, ssid_len); There is a #define WILDCARD_SSID_TLV_MAX_SIZE that uses sizeof() on this struct, but it already didn't account for the size of the one-element array, so it doesn't need to be changed.

AI-Powered Analysis

AILast updated: 06/28/2025, 11:39:29 UTC

Technical Analysis

CVE-2024-56539 addresses a vulnerability in the Linux kernel's wireless driver mwifiex, specifically in the function mwifiex_config_scan() used for scanning Wi-Fi networks. The issue stems from an improper use of memcpy() that causes a field-spanning write warning. The vulnerability arises because the code attempts to copy an SSID string into a fixed-size one-element array within the struct mwifiex_ie_types_wildcard_ssid_params. This array was not sized correctly to accommodate the full SSID length, leading to a potential buffer overflow or memory corruption when the SSID length exceeds one byte. The problem was identified on a device using the MT8173 chipset (a Chromebook), where the kernel log showed a memcpy warning indicating a write spanning multiple fields. The fix involved replacing the one-element array with a flexible array member, which dynamically accommodates the actual SSID length, thereby preventing the overflow. The vulnerability is present in specific Linux kernel versions identified by commit hashes, and no CVSS score or known exploits in the wild have been reported as of the publication date (December 27, 2024). This flaw is a low-level memory handling bug in a wireless driver, which could potentially be exploited to cause kernel memory corruption, leading to system instability or privilege escalation if an attacker can control the SSID data being processed by the driver.

Potential Impact

For European organizations, the impact of this vulnerability depends on their use of Linux systems with the affected mwifiex wireless driver, particularly on devices using the Marvell mwifiex driver with the MT8173 chipset or similar hardware. Exploitation could allow attackers to cause denial of service through kernel crashes or potentially escalate privileges by corrupting kernel memory. This could compromise the confidentiality, integrity, and availability of affected systems. Organizations relying on Linux-based embedded devices, Chromebooks, or IoT devices with this wireless chipset may be at higher risk. Given the vulnerability requires crafted SSID data, exploitation would typically require proximity or control over Wi-Fi networks the device attempts to scan, limiting remote exploitation scope. However, in environments with many wireless networks or where attackers can broadcast malicious SSIDs, the risk increases. The lack of known exploits reduces immediate risk but does not eliminate the threat, especially for critical infrastructure or sensitive environments in Europe where Linux devices are prevalent.

Mitigation Recommendations

1. Apply the official Linux kernel patches that replace the fixed-size array with a flexible array member in the mwifiex driver to prevent buffer overflows. 2. Update all Linux systems, especially those running on hardware with Marvell mwifiex wireless drivers, to the latest kernel versions containing this fix. 3. For embedded or IoT devices that cannot be easily updated, consider network segmentation and restricting Wi-Fi scanning to trusted networks only. 4. Monitor kernel logs for memcpy warnings or unusual wireless scanning errors that could indicate attempted exploitation. 5. Implement network controls to limit exposure to rogue Wi-Fi access points broadcasting malicious SSIDs, such as using wireless intrusion detection systems. 6. Coordinate with hardware vendors to ensure firmware and driver updates are distributed promptly. 7. For critical environments, consider disabling automatic Wi-Fi scanning or restricting it to known SSIDs until patches are applied.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-27T14:03:05.987Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdf195

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

Last enriched: 6/28/2025, 11:39:29 AM

Last updated: 8/5/2025, 7:01:31 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