CVE-2026-90399: wifi: ath12k: fix stride mismatch in mac_phy_caps_parse()
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath12k: fix stride mismatch in macphycapsparse()
Currently, in ath12kwmimacphycapsparse(), kzalloc() sizes the macphycaps buffer as totphyid len, where len is clamped to min(firmwarelen, sizeof(struct ath12kwmimacphycapsparams)). The subsequent memcpy() destination advances by sizeof(full struct) per slot via C pointer arithmetic, not by the clamped len. When firmware sends short TLVs, the second and later slots are written past the end of the allocation.
The reader in ath12kpullmacphycapsvcreadyext() also indexes the buffer with full-struct pointer arithmetic, so the allocation must match that stride.
Fix by using kzallocobjs(), which derives the element size from the pointer type, making allocation size and pointer stride provably consistent regardless of what len the firmware provides.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPLV1.0V2.0SILICONZUPSTREAM-3
Affected Software
Event History
Frequently Asked Questions
What systems are exposed to this issue?
Systems using the Linux kernel ath12k Wi-Fi driver are exposed when processing service-ready extension MAC/PHY capability data from firmware. The issue was tested on WCN7850 hardware, but the provided data does not identify a complete affected-device list.
What is required to trigger the memory corruption?
The firmware must provide short MAC/PHY capability TLVs such that the parsed length is smaller than the full capability structure size, with multiple PHY capability slots present. The mismatch then causes later slots to be copied beyond the allocated buffer.
How can this be mitigated if an update cannot be applied immediately?
No workaround or configuration mitigation is provided. The available remediation is the kernel fix that allocates the capability buffer using element-sized allocation so its size matches the access stride.