projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09ed8bf
)
rsi: fix array out of bound
author
zhangyue
<zhangyue1@kylinos.cn>
Wed, 8 Dec 2021 09:53:41 +0000
(17:53 +0800)
committer
Kalle Valo
<kvalo@kernel.org>
Wed, 15 Dec 2021 14:28:26 +0000
(16:28 +0200)
Limit the max of 'ii'. If 'ii' greater than or
equal to 'RSI_MAX_VIFS', the array 'adapter->vifs'
may be out of bound
Signed-off-by: zhangyue <zhangyue1@kylinos.cn>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link:
https://lore.kernel.org/r/20211208095341.47777-1-zhangyue1@kylinos.cn
drivers/net/wireless/rsi/rsi_91x_mac80211.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index e70c1c7fdf59560f1031e564d69f02e4844fd14e..913e11fb38072cee37f482ab67143381811fa614 100644
(file)
--- a/
drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/
drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@
-1108,6
+1108,9
@@
static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
break;
}
+ if (ii >= RSI_MAX_VIFS)
+ return status;
+
mutex_lock(&common->mutex);
if (ssn != NULL)