Vulnerability · Published Dec 8, 2025 · Assigned by Linux

CVE-2025-40321wifi: brcmfmac: fix crash while sending Action Frames in standalone AP Mode

Unrated

In plain English

A security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 10% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS )–Not rated
Exploit odds (30 days)0.2%top 89.9% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: wifi: brcmfmac: fix crash while sending Action Frames in standalone AP Mode Currently, whenever there is a need to transmit an Action frame, the brcmfmac driver always uses the P2P vif to send the "actframe" IOVAR to firmware. The P2P interfaces were available when wpa_supplicant is managing the wlan interface. However, the P2P interfaces are not created/initialized when only hostapd is managing the wlan interface. And if hostapd receives an ANQP Query REQ Action frame even from an un-associated STA, the brcmfmac driver tries to use an uninitialized P2P vif pointer for sending the IOVAR to firmware. This NULL pointer dereferencing triggers a driver crash. [ 1417.074538] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [...] [ 1417.075188] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT) [...] [ 1417.075653] Call trace: [ 1417.075662] brcmf_p2p_send_action_frame+0x23c/0xc58 [brcmfmac] [ 1417.075738] brcmf_cfg80211_mgmt_tx+0x304/0x5c0 [brcmfmac] [ 1417.075810] cfg80211_mlme_mgmt_tx+0x1b0/0x428 [cfg80211] [ 1417.076067] nl80211_tx_mgmt+0x238/0x388 [cfg80211] [ 1417.076281] genl_family_rcv_msg_doit+0xe0/0x158 [ 1417.076302] genl_rcv_msg+0x220/0x2a0 [ 1417.076317] netlink_rcv_skb+0x68/0x140 [ 1417.076330] genl_rcv+0x40/0x60 [ 1417.076343] netlink_unicast+0x330/0x3b8 [ 1417.076357] netlink_sendmsg+0x19c/0x3f8 [ 1417.076370] __sock_sendmsg+0x64/0xc0 [ 1417.076391] ____sys_sendmsg+0x268/0x2a0 [ 1417.076408] ___sys_sendmsg+0xb8/0x118 [ 1417.076427] __sys_sendmsg+0x90/0xf8 [ 1417.076445] __arm64_sys_sendmsg+0x2c/0x40 [ 1417.076465] invoke_syscall+0x50/0x120 [ 1417.076486] el0_svc_common.constprop.0+0x48/0xf0 [ 1417.076506] do_el0_svc+0x24/0x38 [ 1417.076525] el0_svc+0x30/0x100 [ 1417.076548] el0t_64_sync_handler+0x100/0x130 [ 1417.076569] el0t_64_sync+0x190/0x198 [ 1417.076589] Code: f9401e80 aa1603e2 f9403be1 5280e483 (f9400000) Fix this, by always using the vif corresponding to the wdev on which the Action frame Transmission request was initiated by the userspace. This way, even if P2P vif is not available, the IOVAR is sent to firmware on AP vif and the ANQP Query RESP Action frame is transmitted without crashing the driver. Move init_completion() for "send_af_done" from brcmf_p2p_create_p2pdev() to brcmf_p2p_attach(). Because the former function would not get executed when only hostapd is managing wlan interface, and it is not safe to do reinit_completion() later in brcmf_p2p_tx_action_frame(), without any prior init_completion(). And in the brcmf_p2p_tx_action_frame() function, the condition check for P2P Presence response frame is not needed, since the wpa_supplicant is properly sending the P2P Presense Response frame on the P2P-GO vif instead of the P2P-Device vif. [Cc stable]

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.159-1DEBIAN-CVE-2025-40321
Debian:13linux6.12.63-1DEBIAN-CVE-2025-40321
Debian:14linux6.17.8-1DEBIAN-CVE-2025-40321
Ubuntu:22.04:LTSlinux5.15.0-173.183UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux6.8.0-106.106UBUNTU-CVE-2025-40321
Ubuntu:25.10linux6.17.0-14.14UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-aws5.15.0-1103.110UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-aws6.8.0-1050.53UBUNTU-CVE-2025-40321
Ubuntu:25.10linux-aws6.17.0-1007.7UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-aws-6.14no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-aws-6.176.17.0-1007.7~24.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1050.53~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-azure5.15.0-1109.118UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-azure6.8.0-1051.57UBUNTU-CVE-2025-40321
Ubuntu:25.10linux-azure6.17.0-1008.8UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-azure-6.14no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1109.118.1UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-azure-fde6.8.0-1058.65UBUNTU-CVE-2025-40321
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-azure-fde-6.14no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-azure-fde-6.86.8.0-1058.65~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-azure-nvidiano fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-azure-nvidia-6.14no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-gcp5.15.0-1103.112UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-gcp6.8.0-1052.55UBUNTU-CVE-2025-40321
Ubuntu:25.10linux-gcp6.17.0-1007.7UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-gcp-6.14no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-gcp-6.176.17.0-1008.8~24.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1052.55~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-gke5.15.0-1099.105UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-gke6.8.0-1048.53UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1086.94UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1035.38UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-hwe-6.14no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-106.106~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-ibm5.15.0-1097.100UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-ibm6.8.0-1049.49UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1049.49~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1098.104UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-kvm5.15.0-1095.100UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-173.183UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-106.106.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-106.106.1~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1098.99UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1049.52UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-nvidia-6.11no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-nvidia-6.176.17.0-1008.8UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1049.52~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1049.52.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1055.55UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-nvidia-tegra6.8.0-1020.20UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1044.44UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-oem-6.11no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-oem-6.14no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-oem-6.176.17.0-1011.11UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-oem-6.8no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-oracle5.15.0-1100.106UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-oracle6.8.0-1047.48UBUNTU-CVE-2025-40321
Ubuntu:25.10linux-oracle6.17.0-1007.7UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-oracle-6.14no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-oracle-6.176.17.0-1007.7~24.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1047.48~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-raspi5.15.0-1097.100UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-raspi6.8.0-1050.54UBUNTU-CVE-2025-40321
Ubuntu:25.10linux-raspi6.17.0-1008.8UBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-40321
Ubuntu:25.10linux-realtime6.17.0-1006.7UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-40321
Ubuntu:25.10linux-riscv6.17.0-14.14.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-riscv-6.14no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-106.106~22.04.1UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-40321
Ubuntu:24.04:LTSlinux-xilinx6.8.0-1028.29UBUNTU-CVE-2025-40321
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1067.71UBUNTU-CVE-2025-40321

Affected products (as reported)

VendorProductVersions
Linux Linux 18e2f61db3b708e0a22ccc403cb6ab2203d6faab – before c863b9c7b4e9af0b7931cb791ec91971a50f1a2518e2f61db3b708e0a22ccc403cb6ab2203d6faab – before e1fc9afcce9139791260f962541282d47fbb508d18e2f61db3b708e0a22ccc403cb6ab2203d6faab – before 55f60a72a178909ece4e32987e4c642ba57e1cf418e2f61db3b708e0a22ccc403cb6ab2203d6faab – before c2b0f8d3e7358c33d90f0e62765d474f25f26a4518e2f61db3b708e0a22ccc403cb6ab2203d6faab – before 64e3175d1c8a3bea02032e7c9d1befd5f43786fa18e2f61db3b708e0a22ccc403cb6ab2203d6faab – before a6eed58249e7d60f856900e682992300f770f64b18e2f61db3b708e0a22ccc403cb6ab2203d6faab – before dbc7357b6aae686d9404e1dd7e2e6cf92c3a1b5a18e2f61db3b708e0a22ccc403cb6ab2203d6faab – before 3776c685ebe5f43e9060af06872661de55e80b9a
Linux Linux 3.9

References