aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKapil Gupta <kapgupta@codeaurora.org>2017-05-16 12:39:54 +0530
committerSean McCreary <mccreary@mcwest.org>2017-10-02 12:51:32 -0600
commit78960ea958ffd76a7c5d5750148d6a49366539b3 (patch)
tree75ae1f137802202530e44a3fc72ba4081e8f5173
parent50f207db9164c2f92c0a2679c3f0e809bd77b7a1 (diff)
prima: Drop assoc request if RSNIE/WPAIE parsing fail
Add changes to drop assoc request and return error if RSNIE or WPAIE parsing fail during parsing of assoc request. CRs-Fixed: 2046578 Change-Id: I88d779399c2eba5d33c30144bf9600a1f3a00b77 (cherry picked from commit aae237dfbaf8edcf310eeb84b887b20e7e9c0ff3)
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index 27413d48112..02d5717ade6 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -658,10 +658,18 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,
if(pAssocReq->rsn.length)
{
// Unpack the RSN IE
- dot11fUnpackIeRSN(pMac,
+ if (dot11fUnpackIeRSN(pMac,
&pAssocReq->rsn.info[0],
pAssocReq->rsn.length,
- &Dot11fIERSN);
+ &Dot11fIERSN) != DOT11F_PARSE_SUCCESS)
+ {
+ limLog(pMac, LOG1,
+ FL("Invalid RSNIE received"));
+ limSendAssocRspMgmtFrame(pMac,
+ eSIR_MAC_INVALID_RSN_IE_CAPABILITIES_STATUS,
+ 1, pHdr->sa, subType, 0,psessionEntry);
+ goto error;
+ }
/* Check RSN version is supported or not */
if(SIR_MAC_OUI_VERSION_1 == Dot11fIERSN.version)
@@ -721,10 +729,17 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,
// Unpack the WPA IE
if(pAssocReq->wpa.length)
{
- dot11fUnpackIeWPA(pMac,
+ if (dot11fUnpackIeWPA(pMac,
&pAssocReq->wpa.info[4], //OUI is not taken care
pAssocReq->wpa.length,
- &Dot11fIEWPA);
+ &Dot11fIEWPA) != DOT11F_PARSE_SUCCESS)
+ {
+ limLog(pMac, LOGE, FL("Invalid WPA IE"));
+ limSendAssocRspMgmtFrame(pMac,
+ eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS,
+ 1, pHdr->sa, subType, 0,psessionEntry);
+ goto error;
+ }
/* check the groupwise and pairwise cipher suites */
if(eSIR_SUCCESS != (status = limCheckRxWPAIeMatch(pMac, Dot11fIEWPA, psessionEntry, pAssocReq->HTCaps.present)))
{