]> asedeno.scripts.mit.edu Git - linux.git/commit
ath10k: fix array out-of-bounds access
authorMiaoqing Pan <miaoqing@codeaurora.org>
Wed, 9 Oct 2019 08:18:08 +0000 (16:18 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 14 Oct 2019 08:34:20 +0000 (11:34 +0300)
commitc5329b2d5b8b4e41be14d31ee8505b4f5607bf9b
treea5ffdb24c39dda8e265cd2eea2d989514db03034
parenta69d3bdd4d40c8f780c94b5e1983adb1cd389b59
ath10k: fix array out-of-bounds access

If firmware reports rate_max > WMI_TPC_RATE_MAX(WMI_TPC_FINAL_RATE_MAX)
or num_tx_chain > WMI_TPC_TX_N_CHAIN, it will cause array out-of-bounds
access, so print a warning and reset to avoid memory corruption.

Tested HW: QCA9984
Tested FW: 10.4-3.9.0.2-00035

Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/debug.c
drivers/net/wireless/ath/ath10k/wmi.c