summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaidiReddy Yenuga <saidir@codeaurora.org>2016-11-28 14:35:06 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-12-06 01:24:06 -0800
commit0437618b179f99e7d55f652de33e4bdd18275da0 (patch)
tree2bacd7e64cdee285e92812e373536944e3b95c43
parent53ee85b514e718a496c38d755e4e280081cc4cc2 (diff)
qcacld-3.0: Validate station id
In function __hdd_softap_hard_start_xmit, station id is not validated with max station count, this might lead to a buffer overflow situation for array aStaInfo in SapCtx. Validate station id with max sta count. CRs-Fixed: 1093122 Change-Id: If9f59c5a7b76845bb7783a96453e595b5afa4f30
-rw-r--r--core/hdd/src/wlan_hdd_softap_tx_rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index ea8c3c55ab55..ff08535ea10c 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -294,7 +294,7 @@ static int __hdd_softap_hard_start_xmit(struct sk_buff *skb,
goto drop_pkt;
}
- if (STAId == HDD_WLAN_INVALID_STA_ID) {
+ if (STAId >= WLAN_MAX_STA_COUNT) {
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA,
QDF_TRACE_LEVEL_WARN,
"%s: Failed to find right station", __func__);