CVE-2025-38199: wifi: ath12k: Fix memory leak due to multiple rx_stats allocation
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath12k: Fix memory leak due to multiple rxstats allocation
rxstats for each arsta is allocated when adding a station. arsta->rxstats will be freed when a station is removed.
Redundant allocations are occurring when the same station is added multiple times. This causes ath12kmacstationadd() to be called multiple times, and rxstats is allocated each time. As a result there is memory leaks.
Prevent multiple allocations of rxstats when ath12kmacstationadd() is called repeatedly by checking if rxstats is already allocated before allocating again. Allocate arsta->rxstats if arsta->rxstats is NULL respectively.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPLSILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPLV1.0V2.0SILICONZ-3
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-6.14to a version that resolves this vulnerability.Fixed in 6.14.0-1015.15~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-6.14to a version that resolves this vulnerability.Fixed in 6.14.0-1014.14~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-nvidia-6.14to a version that resolves this vulnerability.Fixed in 6.14.0-1007.7 - Upgrade
Upgrade
ubuntu/linux-gcp-6.14to a version that resolves this vulnerability.Fixed in 6.14.0-1018.19~24.04.1 - Upgrade
Upgrade
ubuntu/linux-oem-6.14to a version that resolves this vulnerability.Fixed in 6.14.0-1014.14 - Upgrade
Upgrade
ubuntu/linux-oracle-6.14to a version that resolves this vulnerability.Fixed in 6.14.0-1015.15~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-6.14to a version that resolves this vulnerability.Fixed in 6.14.0-34.34.1~24.04.1 - Upgrade
Upgrade
ubuntu/linux-realtime-6.14to a version that resolves this vulnerability.Fixed in 6.14.0-1014.14~24.04.1 - Compensating control
In ath12k_mac_station_add(), check whether arsta->rx_stats is already allocated and allocate it only when arsta->rx_stats is NULL; retain freeing arsta->rx_stats when the station is removed.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-38199?
CVE-2025-38199 has been classified as a medium severity vulnerability due to its impact on memory management within the Linux kernel.
How do I fix CVE-2025-38199?
To fix CVE-2025-38199, ensure that your Linux kernel is updated to a version that includes the patch for this vulnerability.
What is the impact of CVE-2025-38199 on system performance?
CVE-2025-38199 can potentially lead to a memory leak which may degrade system performance over time if not addressed.
Which software is affected by CVE-2025-38199?
CVE-2025-38199 affects the Linux kernel as well as specific Qualcomm chipsets such as QCN9274 and WCN7850.
What components of the network stack are affected by CVE-2025-38199?
CVE-2025-38199 specifically affects the ath12k driver in the Linux kernel responsible for managing Wi-Fi connections.