]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: ath12k: Fix invalid data access in ath12k_dp_rx_h_undecap_nwifi
authorManish Dharanenthiran <quic_mdharane@quicinc.com>
Tue, 11 Feb 2025 09:03:02 +0000 (14:33 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:15 +0000 (10:45 +0200)
commit7f1d986da5c6abb75ffe4d0d325fc9b341c41a1c
treebf4c78ca6d50a42dd0b9b20c321937f823ffdc84
parentda3ba4a44e96ce8c517a709bd80a002f19d49dfb
wifi: ath12k: Fix invalid data access in ath12k_dp_rx_h_undecap_nwifi

[ Upstream commit 9a0dddfb30f120db3851627935851d262e4e7acb ]

In certain cases, hardware might provide packets with a
length greater than the maximum native Wi-Fi header length.
This can lead to accessing and modifying fields in the header
within the ath12k_dp_rx_h_undecap_nwifi function for
DP_RX_DECAP_TYPE_NATIVE_WIFI decap type and
potentially resulting in invalid data access and memory corruption.

Add a sanity check before processing the SKB to prevent invalid
data access in the undecap native Wi-Fi function for the
DP_RX_DECAP_TYPE_NATIVE_WIFI decap type.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1

Signed-off-by: Manish Dharanenthiran <quic_mdharane@quicinc.com>
Signed-off-by: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com>
Link: https://patch.msgid.link/20250211090302.4105141-1-tamizh.raja@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath12k/dp_rx.c