From 77dd712432a32554a9abdcd2f9b1bb3025d222a9 Mon Sep 17 00:00:00 2001 From: Arowa Suliman Date: Sat, 18 Sep 2021 23:24:29 -0700 Subject: [PATCH] Replace "dummy" with "stub" in Authenticator group keys Replace the word "dummy" with the inclusive word "stub". Signed-off-by: Arowa Suliman --- src/ap/wpa_auth.c | 18 +++++++++--------- src/ap/wpa_auth_ft.c | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index 83805681e..6d60f2629 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -2742,7 +2742,7 @@ static struct wpabuf * fils_prepare_plainbuf(struct wpa_state_machine *sm, struct wpabuf *plain; u8 *len, *tmp, *tmp2; u8 hdr[2]; - u8 *gtk, dummy_gtk[32]; + u8 *gtk, stub_gtk[32]; size_t gtk_len; struct wpa_group *gsm; size_t plain_len; @@ -2785,11 +2785,11 @@ static struct wpabuf * fils_prepare_plainbuf(struct wpa_state_machine *sm, * Provide unique random GTK to each STA to prevent use * of GTK in the BSS. */ - if (random_get_bytes(dummy_gtk, gtk_len) < 0) { + if (random_get_bytes(stub_gtk, gtk_len) < 0) { wpabuf_clear_free(plain); return NULL; } - gtk = dummy_gtk; + gtk = stub_gtk; } hdr[0] = gsm->GN & 0x03; hdr[1] = 0; @@ -3372,7 +3372,7 @@ static u8 * replace_ie(const char *name, const u8 *old_buf, size_t *len, u8 eid, SM_STATE(WPA_PTK, PTKINITNEGOTIATING) { - u8 rsc[WPA_KEY_RSC_LEN], *_rsc, *gtk, *kde = NULL, *pos, dummy_gtk[32]; + u8 rsc[WPA_KEY_RSC_LEN], *_rsc, *gtk, *kde = NULL, *pos, stub_gtk[32]; size_t gtk_len, kde_len, wpa_ie_len; struct wpa_group *gsm = sm->group; u8 *wpa_ie; @@ -3458,9 +3458,9 @@ SM_STATE(WPA_PTK, PTKINITNEGOTIATING) * Provide unique random GTK to each STA to prevent use * of GTK in the BSS. */ - if (random_get_bytes(dummy_gtk, gtk_len) < 0) + if (random_get_bytes(stub_gtk, gtk_len) < 0) goto done; - gtk = dummy_gtk; + gtk = stub_gtk; } gtkidx = gsm->GN; _rsc = rsc; @@ -3853,7 +3853,7 @@ SM_STATE(WPA_PTK_GROUP, REKEYNEGOTIATING) const u8 *kde; u8 *kde_buf = NULL, *pos, hdr[2]; size_t kde_len; - u8 *gtk, dummy_gtk[32]; + u8 *gtk, stub_gtk[32]; struct wpa_auth_config *conf = &sm->wpa_auth->conf; SM_ENTRY_MA(WPA_PTK_GROUP, REKEYNEGOTIATING, wpa_ptk_group); @@ -3885,9 +3885,9 @@ SM_STATE(WPA_PTK_GROUP, REKEYNEGOTIATING) * Provide unique random GTK to each STA to prevent use * of GTK in the BSS. */ - if (random_get_bytes(dummy_gtk, gsm->GTK_len) < 0) + if (random_get_bytes(stub_gtk, gsm->GTK_len) < 0) return; - gtk = dummy_gtk; + gtk = stub_gtk; } if (sm->wpa == WPA_VERSION_WPA2) { kde_len = 2 + RSN_SELECTOR_LEN + 2 + gsm->GTK_len + diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c index f91a2d2d5..fef1104d2 100644 --- a/src/ap/wpa_auth_ft.c +++ b/src/ap/wpa_auth_ft.c @@ -2259,7 +2259,7 @@ static u8 * wpa_ft_igtk_subelem(struct wpa_state_machine *sm, size_t *len) const u8 *kek, *igtk; size_t kek_len; size_t igtk_len; - u8 dummy_igtk[WPA_IGTK_MAX_LEN]; + u8 stub_igtk[WPA_IGTK_MAX_LEN]; if (wpa_key_mgmt_fils(sm->wpa_key_mgmt)) { kek = sm->PTK.kek2; @@ -2292,11 +2292,11 @@ static u8 * wpa_ft_igtk_subelem(struct wpa_state_machine *sm, size_t *len) * Provide unique random IGTK to each STA to prevent use of * IGTK in the BSS. */ - if (random_get_bytes(dummy_igtk, igtk_len / 8) < 0) { + if (random_get_bytes(stub_igtk, igtk_len / 8) < 0) { os_free(subelem); return NULL; } - igtk = dummy_igtk; + igtk = stub_igtk; } if (aes_wrap(kek, kek_len, igtk_len / 8, igtk, pos)) { wpa_printf(MSG_DEBUG, @@ -2319,7 +2319,7 @@ static u8 * wpa_ft_bigtk_subelem(struct wpa_state_machine *sm, size_t *len) const u8 *kek, *bigtk; size_t kek_len; size_t bigtk_len; - u8 dummy_bigtk[WPA_IGTK_MAX_LEN]; + u8 stub_bigtk[WPA_IGTK_MAX_LEN]; if (wpa_key_mgmt_fils(sm->wpa_key_mgmt)) { kek = sm->PTK.kek2; @@ -2352,11 +2352,11 @@ static u8 * wpa_ft_bigtk_subelem(struct wpa_state_machine *sm, size_t *len) * Provide unique random BIGTK to each OSEN STA to prevent use * of BIGTK in the BSS. */ - if (random_get_bytes(dummy_bigtk, bigtk_len / 8) < 0) { + if (random_get_bytes(stub_bigtk, bigtk_len / 8) < 0) { os_free(subelem); return NULL; } - bigtk = dummy_bigtk; + bigtk = stub_bigtk; } if (aes_wrap(kek, kek_len, bigtk_len / 8, bigtk, pos)) { wpa_printf(MSG_DEBUG,