{"id":"CVE-2024-56593","summary":"wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw()\n\nThis patch fixes a NULL pointer dereference bug in brcmfmac that occurs\nwhen a high 'sd_sgentry_align' value applies (e.g. 512) and a lot of queued SKBs\nare sent from the pkt queue.\n\nThe problem is the number of entries in the pre-allocated sgtable, it is\nnents = max(rxglom_size, txglom_size) + max(rxglom_size, txglom_size) \u003e\u003e 4 + 1.\nGiven the default [rt]xglom_size=32 it's actually 35 which is too small.\nWorst case, the pkt queue can end up with 64 SKBs. This occurs when a new SKB\nis added for each original SKB if tailroom isn't enough to hold tail_pad.\nAt least one sg entry is needed for each SKB. So, eventually the \"skb_queue_walk loop\"\nin brcmf_sdiod_sglist_rw may run out of sg entries. This makes sg_next return\nNULL and this causes the oops.\n\nThe patch sets nents to max(rxglom_size, txglom_size) * 2 to be able handle\nthe worst-case.\nBtw. this requires only 64-35=29 * 16 (or 20 if CONFIG_NEED_SG_DMA_LENGTH) = 464\nadditional bytes of memory.","modified":"2026-04-16T04:30:36.253771727Z","published":"2024-12-27T14:51:00.466Z","related":["SUSE-SU-2025:0289-1","SUSE-SU-2025:0428-1","SUSE-SU-2025:0499-1","SUSE-SU-2025:0557-1","SUSE-SU-2025:0565-1","SUSE-SU-2025:20165-1","SUSE-SU-2025:20166-1","SUSE-SU-2025:20248-1","SUSE-SU-2025:20249-1","USN-7379-2","USN-7380-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56593.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/07c020c6d14d29e5a3ea4e4576b8ecf956a80834"},{"type":"WEB","url":"https://git.kernel.org/stable/c/342f87d263462c2670b77ea9a32074cab2ac6fa1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/34941321b516bd7c6103bd01287d71a1804d19d3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/67a25ea28f8ec1da8894f2f115d01d3becf67dc7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7522d7d745d13fbeff3350fe6aa56c8dae263571"},{"type":"WEB","url":"https://git.kernel.org/stable/c/857282b819cbaa0675aaab1e7542e2c0579f52d7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dfb3f9d3f602602de208da7bdcc0f6d5ee74af68"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56593.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56593"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"af1fa210f4fc6e304b859b386a3c8a266b1110ab"},{"fixed":"342f87d263462c2670b77ea9a32074cab2ac6fa1"},{"fixed":"7522d7d745d13fbeff3350fe6aa56c8dae263571"},{"fixed":"dfb3f9d3f602602de208da7bdcc0f6d5ee74af68"},{"fixed":"67a25ea28f8ec1da8894f2f115d01d3becf67dc7"},{"fixed":"07c020c6d14d29e5a3ea4e4576b8ecf956a80834"},{"fixed":"34941321b516bd7c6103bd01287d71a1804d19d3"},{"fixed":"857282b819cbaa0675aaab1e7542e2c0579f52d7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-56593.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}