Skip to content

wifi: ath11k/ath12k: validate firmware array lengths

Jiale Yao ath11k ath12k linux-wireless lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4wifi: ath11k: validate extended regulatory capability countdrivers/net/wireless/ath/ath11k/wmi.c+7 -00 replies
2/4wifi: ath12k: validate extended regulatory capability countdrivers/net/wireless/ath/ath12k/wmi.c+7 -00 replies
3/4wifi: ath11k: validate ready event MAC address array lengthdrivers/net/wireless/ath/ath11k/wmi.c+3 -00 replies
4/4wifi: ath12k: validate ready event MAC address array lengthdrivers/net/wireless/ath/ath12k/wmi.c+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] wifi: ath11k/ath12k: validate firmware array lengths

From: Jiale Yao <[email protected]>

ath11k and ath12k consume two firmware-provided arrays without fully validating their lengths. The service-ready-ext parser accepts fewer extended regulatory capability entries than the separately reported PHY count, while the ready-event parser trusts the reported extra MAC address count without checking the fixed-structure array length.

Malformed firmware data can therefore make both drivers read beyond the corresponding TLV arrays. Add matching validation to each driver before the arrays are indexed.

The four patches are independent and each addresses one parsing path in one driver.

Jiale Yao (4):
wifi: ath11k: validate extended regulatory capability count
wifi: ath12k: validate extended regulatory capability count
wifi: ath11k: validate ready event MAC address array length
wifi: ath12k: validate ready event MAC address array length

 drivers/net/wireless/ath/ath11k/wmi.c | 10 ++++++++++
 drivers/net/wireless/ath/ath12k/wmi.c | 10 ++++++++++
 2 files changed, 20 insertions(+)
Signature · 1 line
2.34.1