Prechádzať zdrojové kódy

qcacld-3.0: Change RSNOpaque Min len to 2

WPA2 Security Improvements test plan case 4.2.2
Scenario F: RSN version Field is truncated to 1
octet. That means the test bed will send assoc
request with RSN ie total size 3.
Current driver unpack_core will return
DOT11F_INCOMPLETE_IE and doesn't extract the
incomplete RSN ie data.

lim_check_wpa_rsn_ie will have no chance to
run dot11f_unpack_ie_rsn to reject the assoc
request frame because the assoc_req->rsnPresent
is 0.

Change RSN Opaque Min Len to 2 (data min len 0),
so that the unpack_core can extract the RSN ie
even though it is "INCOMPLETE", and then
the later lim_check_wpa_rsn_ie can reject such
assoc request.

Change-Id: Icba37840ea6eb1cc1c2c225efd9ec58757606eea
CRs-Fixed: 2297852
Liangwei Dong 6 rokov pred
rodič
commit
5b25e3418b

+ 1 - 1
core/mac/src/cfg/cfgUtil/dot11f.frms

@@ -1441,7 +1441,7 @@ IE RSN (EID_RSN)                          // 7.3.2.25
 
 IE RSNOpaque (EID_RSN)                    // 7.3.2.25
 {
-    data[ 6..253 ];
+    data[ 0..253 ];
 }
 
 IE WAPI (EID_WAPI)                          // 7.3.2.25

+ 2 - 2
core/mac/src/include/dot11f.h

@@ -26,7 +26,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Tue Jun  5 18:01:08 2018 from the following file(s):
+ * Wed Aug 22 00:52:30 2018 from the following file(s):
  *
  * dot11f.frms
  *
@@ -6809,7 +6809,7 @@ typedef struct sDot11fIERSNOpaque {
 #define DOT11F_EID_RSNOPAQUE (48)
 
 /* N.B. These #defines do *not* include the EID & length */
-#define DOT11F_IE_RSNOPAQUE_MIN_LEN (6)
+#define DOT11F_IE_RSNOPAQUE_MIN_LEN (0)
 
 #define DOT11F_IE_RSNOPAQUE_MAX_LEN (253)
 

+ 7 - 7
core/mac/src/sys/legacy/src/utils/src/dot11f.c

@@ -24,7 +24,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Tue Jun  5 18:01:08 2018 from the following file(s):
+ * Wed Aug 22 00:52:30 2018 from the following file(s):
  *
  * dot11f.frms
  *
@@ -9494,7 +9494,7 @@ static const tIEDefn IES_AssocRequest[] = {
 	0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_QOSCAPSSTATION, 0, 0, },
 	{ offsetof(tDot11fAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque,
-	present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+	present), 0, "RSNOpaque", 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_RSNOPAQUE, 0, 0, },
 	{ offsetof(tDot11fAssocRequest, ExtSuppRates),
 	offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates",
@@ -9803,7 +9803,7 @@ static const tIEDefn IES_Authentication[] = {
 	0, DOT11F_EID_CHALLENGETEXT, 0, 0, },
 	{ offsetof(tDot11fAuthentication, RSNOpaque),
 	offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque",
-	0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+	0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_RSNOPAQUE, 0, 0, },
 	{ offsetof(tDot11fAuthentication, MobilityDomain),
 	offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain",
@@ -10156,7 +10156,7 @@ static const tIEDefn IES_Beacon2[] = {
 	present), 0, "ExtSuppRates", 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_EXTSUPPRATES, 0, 0, },
 	{ offsetof(tDot11fBeacon2, RSNOpaque), offsetof(tDot11fIERSNOpaque,
-	present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+	present), 0, "RSNOpaque", 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_RSNOPAQUE, 0, 0, },
 	{ offsetof(tDot11fBeacon2, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet,
 	present), 0, "EDCAParamSet", 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0},
@@ -11023,7 +11023,7 @@ static const tIEDefn IES_ProbeResponse[] = {
 	0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_EXTSUPPRATES, 0, 0, },
 	{ offsetof(tDot11fProbeResponse, RSNOpaque), offsetof(tDot11fIERSNOpaque,
-	present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+	present), 0, "RSNOpaque", 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_RSNOPAQUE, 0, 0, },
 	{ offsetof(tDot11fProbeResponse, QBSSLoad), offsetof(tDot11fIEQBSSLoad,
 	present), 0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0},
@@ -11308,7 +11308,7 @@ static const tIEDefn IES_ReAssocRequest[] = {
 	0, DOT11F_EID_SUPPCHANNELS, 0, 0, },
 	{ offsetof(tDot11fReAssocRequest, RSNOpaque),
 	offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque",
-	0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+	0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_RSNOPAQUE, 0, 0, },
 	{ offsetof(tDot11fReAssocRequest, QOSCapsStation),
 	offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation",
@@ -11460,7 +11460,7 @@ static const tIEDefn IES_ReAssocResponse[] = {
 	0, DOT11F_EID_RRMENABLEDCAP, 0, 0, },
 	{ offsetof(tDot11fReAssocResponse, RSNOpaque),
 	offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque",
-	0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+	0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_RSNOPAQUE, 0, 0, },
 	{ offsetof(tDot11fReAssocResponse, MobilityDomain),
 	offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain",