Skip to main content

CVE-2024-56593: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-56593cvecve-2024-56593
Published: Fri Dec 27 2024 (12/27/2024, 14:51:00 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw() This patch fixes a NULL pointer dereference bug in brcmfmac that occurs when a high 'sd_sgentry_align' value applies (e.g. 512) and a lot of queued SKBs are sent from the pkt queue. The problem is the number of entries in the pre-allocated sgtable, it is nents = max(rxglom_size, txglom_size) + max(rxglom_size, txglom_size) >> 4 + 1. Given the default [rt]xglom_size=32 it's actually 35 which is too small. Worst case, the pkt queue can end up with 64 SKBs. This occurs when a new SKB is added for each original SKB if tailroom isn't enough to hold tail_pad. At least one sg entry is needed for each SKB. So, eventually the "skb_queue_walk loop" in brcmf_sdiod_sglist_rw may run out of sg entries. This makes sg_next return NULL and this causes the oops. The patch sets nents to max(rxglom_size, txglom_size) * 2 to be able handle the worst-case. Btw. this requires only 64-35=29 * 16 (or 20 if CONFIG_NEED_SG_DMA_LENGTH) = 464 additional bytes of memory.

AI-Powered Analysis

AILast updated: 06/28/2025, 12:12:19 UTC

Technical Analysis

CVE-2024-56593 is a vulnerability identified in the Linux kernel's Broadcom FullMAC wireless driver (brcmfmac), specifically within the brcmf_sdiod_sglist_rw() function. The issue arises due to a NULL pointer dereference caused by an insufficiently sized scatter-gather (sg) table when handling a high 'sd_sgentry_align' value (e.g., 512) combined with a large number of queued socket buffers (SKBs) in the packet queue. The root cause is that the pre-allocated sgtable entries (nents) are calculated as max(rxglom_size, txglom_size) + max(rxglom_size, txglom_size) >> 4 + 1, which defaults to 35 entries given the default glom sizes of 32. However, under worst-case conditions, the packet queue can contain up to 64 SKBs, each requiring at least one sg entry. This mismatch causes the skb_queue_walk loop to exhaust sg entries, leading sg_next to return NULL and triggering a kernel oops (crash). The patch addressing this vulnerability increases nents to max(rxglom_size, txglom_size) * 2, effectively doubling the sgtable size to accommodate the worst-case scenario. This fix requires a modest increase in memory allocation (~464 additional bytes). This vulnerability affects Linux kernel versions identified by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and is relevant to systems using the brcmfmac driver with Broadcom FullMAC wireless chips. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to devices and systems running Linux kernels with the affected brcmfmac driver, which is common in embedded systems, IoT devices, and some laptops or network equipment using Broadcom FullMAC Wi-Fi chipsets. A NULL pointer dereference in kernel space typically results in a denial of service (DoS) via kernel panic or system crash, potentially disrupting network connectivity and device availability. While this vulnerability does not directly enable privilege escalation or remote code execution, the resulting instability could be exploited by attackers to cause service interruptions, impacting critical infrastructure, enterprise networks, or industrial control systems relying on affected hardware. Given the widespread use of Linux in European IT environments and embedded devices, organizations could experience operational disruptions if unpatched devices are targeted. However, the lack of known exploits and the requirement for specific conditions (high packet queue load and particular hardware) somewhat limit immediate risk. Still, the vulnerability should be addressed promptly to maintain system stability and security.

Mitigation Recommendations

European organizations should prioritize updating Linux kernels to versions containing the patch that increases the sgtable size in the brcmfmac driver. Specifically, applying the commit identified by hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 or later kernel releases that include this fix is essential. For embedded and IoT devices where kernel updates are challenging, vendors should be contacted for firmware updates or mitigations. Network administrators should monitor devices using Broadcom FullMAC Wi-Fi chipsets for unusual crashes or kernel oops events that may indicate exploitation attempts or triggering of this bug. Additionally, limiting high packet queue loads through traffic shaping or rate limiting on wireless interfaces may reduce the likelihood of triggering the vulnerability. Implementing robust monitoring and alerting for kernel stability issues can help detect exploitation attempts early. Finally, organizations should maintain an inventory of devices running affected kernels and drivers to ensure comprehensive patch management.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9823c4522896dcbdf33e

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

Last enriched: 6/28/2025, 12:12:19 PM

Last updated: 8/18/2025, 3:06:38 AM

Views: 15

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