From 0ea62f0b58c750810ddce7d6d7984aaba2813832 Mon Sep 17 00:00:00 2001 From: Akshat Agrawal Date: Fri, 31 Jul 2026 12:46:46 +0530 Subject: [PATCH] fix(nan): Fix bug bounty reported and discovered vulnerabilities in NAN Rx --- components/esp_wifi/include/esp_wifi_types.h | 3 +++ components/esp_wifi/lib | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index ee39586abe2..6a6e3a5ad19 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -1064,6 +1064,9 @@ typedef struct { wifi_second_chan_t new_snd; /**< new second channel of the device */ } wifi_event_home_channel_change_t; +#define BIT_NUMBER_TO_CHANNEL(bit_number) \ + (((bit_number) >= 1 && (bit_number) <= 14) ? (bit_number) : 0) + /** Argument structure for WIFI_EVENT_AP_WRONG_PASSWORD event */ typedef struct { uint8_t mac[6]; /**< MAC address of the station trying to connect to Soft-AP */ diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index e064860a8ac..fab2cd099ec 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit e064860a8ac1d093d8d00ac26b4f89147186c800 +Subproject commit fab2cd099ec16bb543a39403b15106ac4456d325