CVE-2024-56593
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
27/12/2024
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw()<br />
<br />
This patch fixes a NULL pointer dereference bug in brcmfmac that occurs<br />
when a high &#39;sd_sgentry_align&#39; value applies (e.g. 512) and a lot of queued SKBs<br />
are sent from the pkt queue.<br />
<br />
The problem is the number of entries in the pre-allocated sgtable, it is<br />
nents = max(rxglom_size, txglom_size) + max(rxglom_size, txglom_size) >> 4 + 1.<br />
Given the default [rt]xglom_size=32 it&#39;s actually 35 which is too small.<br />
Worst case, the pkt queue can end up with 64 SKBs. This occurs when a new SKB<br />
is added for each original SKB if tailroom isn&#39;t enough to hold tail_pad.<br />
At least one sg entry is needed for each SKB. So, eventually the "skb_queue_walk loop"<br />
in brcmf_sdiod_sglist_rw may run out of sg entries. This makes sg_next return<br />
NULL and this causes the oops.<br />
<br />
The patch sets nents to max(rxglom_size, txglom_size) * 2 to be able handle<br />
the worst-case.<br />
Btw. this requires only 64-35=29 * 16 (or 20 if CONFIG_NEED_SG_DMA_LENGTH) = 464<br />
additional bytes of memory.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.4.287 (excluding) | |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.231 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.174 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.120 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.66 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.5 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/07c020c6d14d29e5a3ea4e4576b8ecf956a80834
- https://git.kernel.org/stable/c/342f87d263462c2670b77ea9a32074cab2ac6fa1
- https://git.kernel.org/stable/c/34941321b516bd7c6103bd01287d71a1804d19d3
- https://git.kernel.org/stable/c/67a25ea28f8ec1da8894f2f115d01d3becf67dc7
- https://git.kernel.org/stable/c/7522d7d745d13fbeff3350fe6aa56c8dae263571
- https://git.kernel.org/stable/c/857282b819cbaa0675aaab1e7542e2c0579f52d7
- https://git.kernel.org/stable/c/dfb3f9d3f602602de208da7bdcc0f6d5ee74af68
- https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html



