Merge branch 'bugfix/dpp_stray_auth_confirm_v6.0' into 'release/v6.0'

fix(esp_wifi): Harden dpp Auth confirm and drop mismatched auth confirms

See merge request espressif/esp-idf!51847
This commit is contained in:
Jiang Jiang Jian
2026-08-20 20:58:31 +08:00
3 changed files with 18 additions and 2 deletions

View File

@@ -395,7 +395,12 @@ static int esp_dpp_rx_auth_conf(struct action_rx_param *rx_param, uint8_t *dpp_d
if (os_memcmp(rx_param->sa, auth->peer_mac_addr, ETH_ALEN) != 0) {
wpa_printf(MSG_DEBUG, "DPP: MAC address mismatch (expected "
MACSTR ") - drop", MAC2STR(auth->peer_mac_addr));
return ESP_ERR_DPP_FAILURE;
return ESP_OK;
}
if (auth->auth_success || !auth->waiting_auth_conf) {
wpa_printf(MSG_DEBUG, "DPP: Not waiting for Auth Confirm - drop");
return ESP_OK;
}
eloop_cancel_timeout(esp_dpp_auth_conf_wait_timeout, NULL, NULL);
@@ -438,6 +443,11 @@ static esp_err_t esp_dpp_rx_peer_disc_resp(struct action_rx_param *rx_param)
return ESP_ERR_INVALID_ARG;
}
if (!auth) {
wpa_printf(MSG_DEBUG, "DPP: No DPP Authentication in progress - drop");
return ESP_OK;
}
if (rx_param->vendor_data_len < 2) {
wpa_printf(MSG_INFO, "DPP: Too short vendor specific data");
return ESP_FAIL;

View File

@@ -2688,6 +2688,12 @@ int dpp_auth_conf_rx(struct dpp_authentication *auth, const u8 *hdr,
return -1;
}
if (!auth->waiting_auth_conf) {
wpa_printf(MSG_DEBUG,
"DPP: Not waiting for Auth Confirm - drop");
return -1;
}
auth->waiting_auth_conf = 0;
wrapped_data = dpp_get_attr(attr_start, attr_len, DPP_ATTR_WRAPPED_DATA,