Skip to content

Commit 7cca5c1

Browse files
committed
wifi: rtw89: Fix array index mistake in rtw89_sta_info_get_iter()
jira NONE_AUTOMATION cve CVE-2024-43842 Rebuild_History Non-Buildable kernel-4.18.0-553.54.1.el8_10 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 32f8780 commit 7cca5c1

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
@@ -3247,7 +3247,7 @@ static void rtw89_sta_info_get_iter(void *data, struct ieee80211_sta *sta)
32473247
case RX_ENC_HE:
32483248
seq_printf(m, "HE %dSS MCS-%d GI:%s", status->nss, status->rate_idx,
32493249
status->he_gi <= NL80211_RATE_INFO_HE_GI_3_2 ?
3250-
he_gi_str[rate->he_gi] : "N/A");
3250+
he_gi_str[status->he_gi] : "N/A");
32513251
break;
32523252
}
32533253
seq_printf(m, " BW:%u", rtw89_rate_info_bw_to_mhz(status->bw));

0 commit comments

Comments
 (0)