fix(nan): Fix bug bounty reported and discovered vulnerabilities in NAN Rx

This commit is contained in:
Akshat Agrawal
2026-07-31 19:42:27 +08:00
committed by BOT
parent 0290f8fc2d
commit 85a59c8405
2 changed files with 3 additions and 3 deletions
@@ -2230,7 +2230,7 @@ uint8_t esp_wifi_nan_publish_service(const wifi_nan_publish_cfg_t *publish_cfg)
}
#ifdef CONFIG_ESP_WIFI_NAN_PAIRING
if (cfg->pairing && nan_check_paired_service_hash(service_id)) {
if (cfg->pairing && cfg->pairing->npk_nik_caching && nan_check_paired_service_hash(service_id)) {
cfg->pairing->pairing_setup = false;
}
#endif
@@ -2412,7 +2412,7 @@ uint8_t esp_wifi_nan_subscribe_service(const wifi_nan_subscribe_cfg_t *subscribe
}
#ifdef CONFIG_ESP_WIFI_NAN_PAIRING
if (cfg->pairing && nan_check_paired_service_hash(service_id)) {
if (cfg->pairing && cfg->pairing->npk_nik_caching && nan_check_paired_service_hash(service_id)) {
cfg->pairing->pairing_setup = false;
}
#endif