CVE-2025-21744: wifi: brcmfmac: fix NULL pointer dereference in brcmf_txfinalize()
In the Linux kernel, the following vulnerability has been resolved:
wifi: brcmfmac: fix NULL pointer dereference in brcmftxfinalize()
On removal of the device or unloading of the kernel module a potential NULL pointer dereference occurs.
The following sequence deletes the interface:
brcmfdetach() brcmfremoveinterface() brcmfdelif()
Inside the brcmfdelif() function the drvr->if2bss[ifidx] is updated to BRCMFBSSIDXINVALID (-1) if the bsscfgidx matches.
After brcmfremoveinterface() call the brcmfprotodetach() function is called providing the following sequence:
brcmfdetach() brcmfprotodetach() brcmfprotomsgbufdetach() brcmfflowringdetach() brcmfmsgbufdeleteflowring() brcmfmsgbufremoveflowring() brcmfflowringdelete() brcmfgetifp() brcmftxfinalize()
Since brcmfgetip() can and actually will return NULL in this case the call to brcmftxfinalize() will result in a NULL pointer dereference inside brcmftxfinalize() when trying to update ifp->ndev->stats.txerrors.
This will only happen if a flowring still has an skb.
Although the NULL pointer dereference has only been seen when trying to update the tx statistic, all other uses of the ifp pointer have been guarded as well with an early return if ifp is NULL.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.15.179.1-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.78.1-3
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21744?
CVE-2025-21744 is classified as a medium severity vulnerability due to the potential for a NULL pointer dereference.
How do I fix CVE-2025-21744?
To fix CVE-2025-21744, update your Linux kernel to a version later than 6.1.129 or within the specified safe ranges.
What versions of Linux Kernel are affected by CVE-2025-21744?
CVE-2025-21744 affects Linux Kernel versions between 6.2 and 6.6.78, and 6.7 to 6.12.14, and specifically 6.13 to 6.13.3.
What component is impacted by CVE-2025-21744?
The vulnerability affects the networking component 'brcmfmac' in the Linux kernel.
What type of vulnerability is CVE-2025-21744?
CVE-2025-21744 is an operational vulnerability that leads to a NULL pointer dereference when the device is removed.