ath11k: Add sanity check in htt pktlog
PATCH 1/1 ath11k: Add sanity check in htt pktlog
Add sanity check before processing pktlog buffer.
Signed-off-by Anilkumar Kolli <[email protected]>
--- drivers/net/wireless/ath/ath11k/debug.h | 2 ++ drivers/net/wireless/ath/ath11k/dp_rx.c | 9 +++++++++ 2 files changed, 11 insertions(+)
drivers/net/wireless/ath/ath11k/debug.h +2 -0
@@ -68,6 +68,8 @@ struct debug_htt_stats_req {#define ATH11K_FW_STATS_BUF_SIZE (1024 * 1024) +#define ATH11K_HTT_PKTLOG_MAX_SIZE 2048 +enum ath11k_pktlog_filter {ATH11K_PKTLOG_RX =0x000000001 ,ATH11K_PKTLOG_TX =0x000000002 ,
drivers/net/wireless/ath/ath11k/dp_rx.c +9 -0
@@ -1072,6 +1072,15 @@ static void ath11k_htt_pktlog(struct ath11k_base *ab,u8 pdev_id; len =FIELD_GET (HTT_T2H_PPDU_STATS_PAYLOAD_SIZE_M , *data); + +if (len >ATH11K_HTT_PKTLOG_MAX_SIZE ) + { +ath11k_warn (ab,"htt pktlog buffer size %d, expected < %d\n" , + len, +ATH11K_HTT_PKTLOG_MAX_SIZE ); +return ; + } + pdev_id =FIELD_GET (HTT_T2H_PPDU_STATS_PDEV_ID_M , *data); pdev_id =DP_HW2SW_MACID (pdev_id); ar = ab->pdevs[pdev_id].ar;
Signature · 7 lines
1.9.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 3 lines · Anilkumar Kolli
Add sanity check before processing pktlog buffer.
Signed-off-by Anilkumar Kolli <[email protected]>
Patch applied to ath.git, thanks.
65ab8594d0cf ath11k: Add sanity check in htt pktlog
Signature · 9 lines
https://patchwork.kernel.org/patch/10938543/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k