From 233a57d4f5db2b731cd333dd4938832f29ffca39 Mon Sep 17 00:00:00 2001 From: Shyamal Khachane Date: Fri, 21 Jun 2024 14:47:30 +0530 Subject: [PATCH] fix(esp_wifi): Fix a memory leak that occurs when the SAE connection is interrupted 1. Free temporary data used by SAE before memsetting the same 2. Drop any received auth response that uses a different algorithm than the one currently in use --- components/esp_wifi/lib | 2 +- components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 1b4c86a66f..90c16e0122 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 1b4c86a66f012b8ba18a5a380ab87aed1af1e022 +Subproject commit 90c16e012270adf76b402e0ac00bbe2728a0d962 diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c index e1e036d6da..10244b2f45 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c @@ -257,7 +257,6 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code) case WIFI_REASON_ASSOC_FAIL: case WIFI_REASON_CONNECTION_FAIL: case WIFI_REASON_HANDSHAKE_TIMEOUT: - esp_wpa3_free_sae_data(); wpa_sta_clear_curr_pmksa(); wpa_sm_notify_disassoc(&gWpaSm); break; @@ -271,6 +270,7 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code) owe_deinit(); #endif /* CONFIG_OWE_STA */ + esp_wpa3_free_sae_data(); supplicant_sta_disconn_handler(); }