Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit d0e4274

Browse files
Karthikeyan Periyasamygregkh
Karthikeyan Periyasamy
authored andcommitted
wifi: ath12k: fix array out-of-bound access in SoC stats
[ Upstream commit e106b7a ] Currently, the ath12k_soc_dp_stats::hal_reo_error array is defined with a maximum size of DP_REO_DST_RING_MAX. However, the ath12k_dp_rx_process() function access ath12k_soc_dp_stats::hal_reo_error using the REO destination SRNG ring ID, which is incorrect. SRNG ring ID differ from normal ring ID, and this usage leads to out-of-bounds array access. To fix this issue, modify ath12k_dp_rx_process() to use the normal ring ID directly instead of the SRNG ring ID to avoid out-of-bounds array access. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20240704070811.4186543-2-quic_periyasa@quicinc.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1ab2cfe commit d0e4274

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+1
-1
lines changed

drivers/net/wireless/ath/ath12k/dp_rx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2670,7 +2670,7 @@ int ath12k_dp_rx_process(struct ath12k_base *ab, int ring_id,
26702670
if (push_reason !=
26712671
HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION) {
26722672
dev_kfree_skb_any(msdu);
2673-
ab->soc_stats.hal_reo_error[dp->reo_dst_ring[ring_id].ring_id]++;
2673+
ab->soc_stats.hal_reo_error[ring_id]++;
26742674
continue;
26752675
}
26762676

0 commit comments

Comments
 (0)