summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSecurityBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2020-05-08 14:24:27 -0700
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2020-05-08 14:24:27 -0700
commit507ab41f37dd6e4e061fdd50e965668a78d598a0 (patch)
treeb9ad03d0dd81a871c256e0853dc7f01f6195b360
parent51d43cc220adac0b611b032e4dc2370939dee519 (diff)
parent6972e1915dee23f09528995868f202b142f79e78 (diff)
downloadqcacld-507ab41f37dd6e4e061fdd50e965668a78d598a0.tar.gz
Merge android-msm-floral-4.14-qt into android-msm-floral-4.14-qt-qpr1
SBMerger: 284775313 Change-Id: Icf6d12dd215a0713692b0f3b23f3b5ab0d867e7e Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--core/hdd/inc/wlan_hdd_main.h2
-rw-r--r--core/hdd/inc/wlan_hdd_wmm.h2
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c9
-rw-r--r--core/hdd/src/wlan_hdd_wmm.c4
-rw-r--r--core/sme/inc/sme_qos_api.h4
-rw-r--r--core/sme/src/common/sme_api.c17
6 files changed, 16 insertions, 22 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index c5129befa9..82a53cbf17 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1412,7 +1412,7 @@ struct hdd_adapter {
bool offloads_configured;
/* DSCP to UP QoS Mapping */
- enum sme_qos_wmmuptype dscp_to_up_map[WLAN_HDD_MAX_DSCP + 1];
+ enum sme_qos_wmmuptype dscp_to_up_map[WLAN_MAX_DSCP + 1];
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
bool is_link_layer_stats_set;
diff --git a/core/hdd/inc/wlan_hdd_wmm.h b/core/hdd/inc/wlan_hdd_wmm.h
index ead0a7829c..4e8be3bb2c 100644
--- a/core/hdd/inc/wlan_hdd_wmm.h
+++ b/core/hdd/inc/wlan_hdd_wmm.h
@@ -194,8 +194,6 @@ extern const uint8_t hdd_qdisc_ac_to_tl_ac[];
extern const uint8_t hdd_wmm_up_to_ac_map[];
extern const uint8_t hdd_linux_up_to_ac_map[];
-#define WLAN_HDD_MAX_DSCP 0x3f
-
/**
* hdd_wmmps_helper() - Function to set uapsd psb dynamically
*
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index e079d92713..df1108f977 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -2314,8 +2314,9 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
goto done;
}
- if (pCsrRoamInfo->nAssocRspLength == 0) {
- hdd_err("Assoc rsp length is 0");
+ if (pCsrRoamInfo->nAssocRspLength < FT_ASSOC_RSP_IES_OFFSET) {
+ hdd_err("Invalid assoc rsp length %d",
+ pCsrRoamInfo->nAssocRspLength);
goto done;
}
@@ -2348,6 +2349,10 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
/* Send the Assoc Resp, the supplicant needs this for initial Auth */
len = pCsrRoamInfo->nAssocRspLength - FT_ASSOC_RSP_IES_OFFSET;
+ if (len > IW_GENERIC_IE_MAX) {
+ hdd_err("Invalid Assoc resp length %d", len);
+ goto done;
+ }
rspRsnLength = len;
qdf_mem_copy(rspRsnIe, pFTAssocRsp, len);
qdf_mem_zero(rspRsnIe + len, IW_GENERIC_IE_MAX - len);
diff --git a/core/hdd/src/wlan_hdd_wmm.c b/core/hdd/src/wlan_hdd_wmm.c
index 5d02f02946..04a6584ecb 100644
--- a/core/hdd/src/wlan_hdd_wmm.c
+++ b/core/hdd/src/wlan_hdd_wmm.c
@@ -54,8 +54,6 @@
#include <cds_sched.h>
#include "sme_api.h"
-#define WLAN_HDD_MAX_DSCP 0x3f
-
#define HDD_WMM_UP_TO_AC_MAP_SIZE 8
const uint8_t hdd_wmm_up_to_ac_map[] = {
@@ -1283,7 +1281,7 @@ QDF_STATUS hdd_wmm_init(struct hdd_adapter *adapter)
/* DSCP to User Priority Lookup Table
* By default use the 3 Precedence bits of DSCP as the User Priority
*/
- for (dscp = 0; dscp <= WLAN_HDD_MAX_DSCP; dscp++)
+ for (dscp = 0; dscp <= WLAN_MAX_DSCP; dscp++)
dscp_to_up_map[dscp] = dscp >> 3;
/* Special case for Expedited Forwarding (DSCP 46) */
diff --git a/core/sme/inc/sme_qos_api.h b/core/sme/inc/sme_qos_api.h
index de71f94feb..da4c3914f6 100644
--- a/core/sme/inc/sme_qos_api.h
+++ b/core/sme/inc/sme_qos_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -133,6 +133,8 @@ enum sme_qos_statustype {
};
+#define WLAN_MAX_DSCP 0x3f
+
/*
* Enumeration of the various User priority (UP) types
* From 802.1D/802.11e/WMM specifications (all refer to same table)
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index fa1e831e03..f23e630e87 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -10717,24 +10717,15 @@ QDF_STATUS sme_update_dsc_pto_up_mapping(tHalHandle hHal,
sme_release_global_lock(&pMac->sme);
return QDF_STATUS_E_FAILURE;
}
+
for (i = 0; i < SME_QOS_WMM_UP_MAX; i++) {
for (j = pSession->QosMapSet.dscp_range[i][0];
- j <= pSession->QosMapSet.dscp_range[i][1];
- j++) {
- if ((pSession->QosMapSet.dscp_range[i][0] == 255)
- && (pSession->QosMapSet.dscp_range[i][1] ==
- 255)) {
- QDF_TRACE(QDF_MODULE_ID_SME,
- QDF_TRACE_LEVEL_DEBUG,
- FL("User Priority %d isn't used"), i);
- break;
- } else {
+ j <= pSession->QosMapSet.dscp_range[i][1] &&
+ j <= WLAN_MAX_DSCP; j++)
dscpmapping[j] = i;
- }
- }
}
for (i = 0; i < pSession->QosMapSet.num_dscp_exceptions; i++)
- if (pSession->QosMapSet.dscp_exceptions[i][0] != 255)
+ if (pSession->QosMapSet.dscp_exceptions[i][0] <= WLAN_MAX_DSCP)
dscpmapping[pSession->QosMapSet.dscp_exceptions[i][0]] =
pSession->QosMapSet.dscp_exceptions[i][1];