]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow RSNE Override element to override RSNE contents during parsing
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 11 Oct 2023 09:46:23 +0000 (12:46 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 20 Jul 2024 18:28:28 +0000 (21:28 +0300)
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/common/wpa_common.c

index 1cfdd9ad7e2ff91ad01be7e1920c10d188a9b2c5..8eb4a1dabd64f93d7f8c14f4d2027b8539690f85 100644 (file)
@@ -1890,6 +1890,14 @@ int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len,
                data->has_group = 1;
                data->key_mgmt = WPA_KEY_MGMT_OSEN;
                data->proto = WPA_PROTO_OSEN;
+       } else if (rsn_ie_len >= 2 + 4 + 2 && rsn_ie[1] >= 4 + 2 &&
+                  rsn_ie[1] == rsn_ie_len - 2 &&
+                  (WPA_GET_BE32(&rsn_ie[2]) == RSNE_OVERRIDE_IE_VENDOR_TYPE ||
+                   WPA_GET_BE32(&rsn_ie[2]) ==
+                   RSNE_OVERRIDE_2_IE_VENDOR_TYPE) &&
+                  WPA_GET_LE16(&rsn_ie[2 + 4]) == RSN_VERSION) {
+               pos = rsn_ie + 2 + 4 + 2;
+               left = rsn_ie_len - 2 - 4 - 2;
        } else {
                const struct rsn_ie_hdr *hdr;