Skip to content

Commit 0b88472

Browse files
committed
wifi: rtw89: Fix array index mistake in rtw89_sta_info_get_iter()
jira LE-2157 cve CVE-2024-43842 Rebuild_History Non-Buildable kernel-5.14.0-503.14.1.el9_5 commit-author Aleksandr Mishin <[email protected]> commit 85099c7 In rtw89_sta_info_get_iter() 'status->he_gi' is compared to array size. But then 'rate->he_gi' is used as array index instead of 'status->he_gi'. This can lead to go beyond array boundaries in case of 'rate->he_gi' is not equal to 'status->he_gi' and is bigger than array size. Looks like "copy-paste" mistake. Fix this mistake by replacing 'rate->he_gi' with 'status->he_gi'. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: e3ec701 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Aleksandr Mishin <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://patch.msgid.link/[email protected] (cherry picked from commit 85099c7) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 387ddf1 commit 0b88472

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/realtek/rtw89

1 file changed

+1
-1
lines changed

drivers/net/wireless/realtek/rtw89/debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3531,7 +3531,7 @@ static void rtw89_sta_info_get_iter(void *data, struct ieee80211_sta *sta)
35313531
case RX_ENC_HE:
35323532
seq_printf(m, "HE %dSS MCS-%d GI:%s", status->nss, status->rate_idx,
35333533
status->he_gi <= NL80211_RATE_INFO_HE_GI_3_2 ?
3534-
he_gi_str[rate->he_gi] : "N/A");
3534+
he_gi_str[status->he_gi] : "N/A");
35353535
break;
35363536
case RX_ENC_EHT:
35373537
seq_printf(m, "EHT %dSS MCS-%d GI:%s", status->nss, status->rate_idx,

0 commit comments

Comments
 (0)