CVE-2026-90398: wifi: ath11k: fix stride mismatch in mac_phy_caps_parse()
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath11k: fix stride mismatch in macphycapsparse()
Currently, in ath11kwmitlvmacphycapsparse(), kcalloc() sizes the macphycaps buffer as totphyid len, where len is clamped to min(firmwarelen, sizeof(struct wmimacphycapabilities)). 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 ath11kpullmacphycapsvcreadyext() 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.
Compile tested only.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the out-of-bounds write?
The ath11k driver must process firmware MAC/PHY capability TLVs containing more than one PHY entry, where the firmware-provided TLV length is shorter than the full wmi_mac_phy_capabilities structure. The mismatch between the clamped allocation length and full-structure pointer stride causes later entries to be written beyond the allocated buffer.
Is this issue tied to a normal host-side input path?
The affected parsing path consumes capability information supplied by the Wi-Fi firmware. The provided information does not indicate that ordinary network traffic or a local user-controlled input alone can trigger it.
What should be done if an update cannot be applied immediately?
No mitigation is provided in the available data. The described fix changes the allocation to kzalloc_objs() so the allocation element size matches the pointer arithmetic used by the parser and reader.