CVE-2026-138852: wifi: ath12k: validate MAC/PHY capability count before saving
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath12k: validate MAC/PHY capability count before saving
Firmware supplies the hardware mode count and the PHY bitmap for each mode in the service-ready-ext event. ath12kwmisaveallmacphyinfo() uses those bitmaps to populate svcextinfo->macphyinfo, but the destination is a fixed array of ATH12KMAXMACPHYCAP elements.
If the total number of advertised PHY entries exceeds that limit, the loop writes beyond macphyinfo and corrupts adjacent memory.
ath12kwmimacphycapsparse() allocates the source array for totphyid entries and rejects excess capability TLVs. However, if the event contains fewer capability TLVs than advertised, the remaining allocated entries stay zeroed and are saved as invalid PHY information.
After parsing the MAC/PHY capability TLVs, validate the destination capacity and reject an incomplete capability list before saving any entries.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In ath12k_wmi_mac_phy_caps_parse(), allocate the source array for tot_phy_id entries and validate the capability-TLV count against the fixed ATH12K_MAX_MAC_PHY_CAP destination capacity; reject excess or incomplete capability lists before saving any entries.