]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 9 Apr 2022 06:12:25 +0000 (09:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 14:59:20 +0000 (16:59 +0200)
commit4bdcf32c965c27f55ccc4ee71c1927131115b0bb
treefaaa3197dce093a01aa99ec654b2b3c8f1325a84
parente663ce18cafc55338da57daf2f756bef43d967e1
ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix

[ Upstream commit 2dc509305cf956381532792cb8dceef2b1504765 ]

The "rxstatus->rs_keyix" eventually gets passed to test_bit() so we need to
ensure that it is within the bitmap.

drivers/net/wireless/ath/ath9k/common.c:46 ath9k_cmn_rx_accept()
error: passing untrusted data 'rx_stats->rs_keyix' to 'test_bit()'

Fixes: 4ed1a8d4a257 ("ath9k_htc: use ath9k_cmn_rx_accept")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220409061225.GA5447@kili
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c