Commit Graph
998 Commits
Author SHA1 Message Date
Richard Allen 0e59d78459 TLS: Avoid discarded-qualifiers
Just a build issue fix depending on GCC5+ configuration, fixes:

assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
return discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]

Signed-off-by: Richard Allen <richard@bryghtlabs.com>
2026-09-10 11:32:36 +05:30
Jimi Chen c90545c85d SAE: Fix crash due to NULL pointer dereference in H2E parsing
In H2E (Hash-to-Element) mode, sae_parse_commit() parses the optional
Anti-Clogging Token Container by calling sae_parse_token_container().

However, callers of sae_parse_commit() that do not require retrieving
the anti-clogging token (such as PASN initiator/responder and SME auth)
pass NULL for the token and token_len output arguments.

If the peer sends a Commit frame containing a valid Anti-Clogging
Token Container element, sae_parse_token_container() unconditionally
sets *token and *token_len, resulting in a NULL pointer dereference
(SIGSEGV) and crashing wpa_supplicant.

Fix this by adding NULL checks before writing to token and token_len.
Update the debug log to print the token directly using 'pos'.

Fixes: 5e32fb0170f4 ("SAE: Use Anti-Clogging Token Container element with H2E")
Signed-off-by: Amarnath Hullur Subramanyam <amarnathhs@google.com>
2026-09-10 11:32:32 +05:30
Jouni Malinen 5a671d7412 Require network_ctx and AKMP match for accepting PMKSA entry
When wpa_supplicant was processing EAPOL-Key msg 1/4 with a PMKID
indicated by the AP/Authenticator, a PMKSA for the same AA was accepted
without enforcing matching network_ctx (i.e., same network configuration
block) and AKMP. This could allow misbehaving APs to make wpa_supplicant
use an unacceptable PMKSA entry that was generated for a different
network for AKMP under certain conditions. This could result in showing
a connection to an incorrect network when an attacker has credentials to
one network in wpa_supplicant configuration, but not to another network.

Fix this by accepting the PMKID to set the PMKSA for an association only
if the PMKSA with the same PMKID is for the same network and was
generated using the same AKMP.

Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
2026-09-10 11:32:19 +05:30
Aditi bd545de697 feat(wpa_supplicant): Match SPA when searching PMKSA cache
Store the supplicant address (SPA) in PMKSA cache entries and match
it when looking up the PMKSA cache.

(partially picked from commit 18cbdbf2b1)
2026-09-10 11:27:53 +05:30
Sarvesh Bodakhe ecab81cf41 test(wifi): wait for the idle task after esp_wifi_deinit in Wi-Fi UTs
The Wi-Fi task deletes itself when esp_wifi_deinit() is called, and FreeRTOS
only reclaims its TCB and stack from the idle task afterwards. Test apps that
read the heap right after deinit therefore see that memory as still allocated
and report a leak, most visibly as the eloop unit tests failing on ESP32.

Wait for the idle task at every point where a test deinitialises Wi-Fi
before a leak check, replacing the single-tick delays that only matched what
esp_wifi_deinit() already waits for internally.

(cherry picked from commit bff264775a)
2026-09-07 15:46:12 +05:30
Akshat Agrawal 128606356c fix(wpa_supplicant): Assign correct return value for SAE y-construction failure 2026-09-03 11:35:47 +05:30
Jiang Jiang Jian e24f64d20d 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
2026-08-20 20:58:31 +08:00
Shreyas Sheth 40b0c613e0 fix(esp_wifi): Harden dpp Auth confirm and drop mismatched auth confirms 2026-08-19 14:26:23 +05:30
Sajia 1d135bebcf fix(wifi): Prevent double free in owe failure path 2026-08-18 11:27:24 +08:00
akshat e7013f62f0 bugfix(wifi): Clear Sta TX queue to prevent key 2 send failure
Also, Ensure correct return values for key 2 and key 4.
2026-07-22 18:10:00 +05:30
Jiang Jiang Jian 1396dc9aaa Merge branch 'bugfix/supplicant_crypto_code_correction_v6.0' into 'release/v6.0'
fix(wpa_supplicant): Correct some functions in crypto porting layer (v6.0)

See merge request espressif/esp-idf!50874
2026-07-22 16:26:33 +08:00
Kapil Gupta 9fb8a3ddaa fix(wpa_supplicant): Correct some functions in crypto porting layer 2026-07-22 10:50:19 +08:00
Shreyas Sheth b9066a7747 fix(esp_wifi): Backport dpp and other fixes
1) Fix crash while connecting to dpp akm
2) Fix phy ref cnt for power management for offchannel_tx
3) Introduced a variable to indicate dpp ap for scan results
4) Introduced WIFI_AUTH_UNKNOWN for ap with misconfigured security parameters
2026-07-21 13:52:33 +05:30
Kapil Gupta e5fe5fb8ac refactor(wpa_supplicant): add shared psa_import_aes_key helper
Centralize PSA AES key import used by ECB, CBC, CTR, CCM, CMAC, and
NIST key-wrap paths in crypto_mbedtls.c.
2026-06-29 15:37:42 +08:00
Kapil Gupta 005bedfbe0 fix(wpa_supplicant): migrate aes_wrap to PSA NIST-KW API
mbedTLS 3.x removed mbedtls_nist_kw_context; use psa_import_key and
mbedtls_nist_kw_wrap/unwrap with PSA key IDs instead.

Closes https://github.com/espressif/esp-idf/issues/18678
2026-06-29 15:37:42 +08:00
Jiang Jiang Jian a4aa3faf9f Merge branch 'bugfix/allow_m1_for_pmk_cache_v6.0' into 'release/v6.0'
fix(esp_wifi): Allow M1 in pmk caching case (v6.0)

See merge request espressif/esp-idf!49030
2026-06-04 10:29:23 +08:00
Kapil Gupta e862096a56 fix(esp_wifi): Correct igtk key installation in ft 2026-06-03 08:53:46 +05:30
Kapil Gupta 0d394f4196 fix(esp_wifi): Allow M1 in pmk caching case 2026-05-29 11:13:59 +05:30
Jiang Jiang Jian d220b6294c Merge branch 'bugfix/roaming_app_issues_v6.0' into 'release/v6.0'
fix(esp_wifi): Fixed some issues in roaming app found using static analysis (v6.0)

See merge request espressif/esp-idf!48353
2026-05-14 10:56:02 +08:00
Jiang Jiang Jian fb5fd726f7 Merge branch 'bugfix/fix_dangling_pointer_issue_v6.0' into 'release/v6.0'
fix(wpa_supplicant): Fix issues reported by compiler (v6.0)

See merge request espressif/esp-idf!48351
2026-05-13 16:00:58 +08:00
Jiang Jiang Jian 8b78960241 Merge branch 'bugfix/concurrency_hostapd_sae_queue_v6.0' into 'release/v6.0'
fix(wifi): Fix concurrency issues for hostapd_sae_queue for softap (v6.0)

See merge request espressif/esp-idf!48364
2026-05-13 10:39:18 +08:00
Jiang Jiang Jian 089548e805 Merge branch 'bugfix/backport_wifi_fixes_v6.0' into 'release/v6.0'
fix(wifi): backport some wifi fixes to v6.0

See merge request espressif/esp-idf!48386
2026-05-12 21:23:03 +08:00
Shreyas Sheth 355c65b6c2 fix(wifi): Fix skipping usage of supp pmk caching for some cases 2026-05-12 19:22:54 +08:00
Shreyas Sheth a6fbe48779 fix(wpa_supplicant): alter the check for eloop_is_running before wifi_task assertion 2026-05-11 12:32:24 +05:30
Shreyas Sheth 2d852cb533 fix(esp_wifi): Fix concurrency for flags between wpa3 and Wi-Fi task 2026-05-11 12:20:03 +05:30
Shreyas Sheth d7b95e28e3 fix(wpa_supplicant): Address comments for concurrency between WiFi and WPA3 task 2026-05-11 12:19:56 +05:30
Kapil Gupta 93d55c312a fix(wpa_supplicant): Fix issues reported by compiler 2026-05-11 12:15:54 +05:30
Shreyas Sheth 956147939f fix(wpa_supplicant): Fix concurrency issues between wpa3 and wifi task 2026-05-11 12:04:59 +05:30
Kapil Gupta a14702b848 fix(esp_wifi): Fixed some issues in esp_supplicant code 2026-05-11 11:32:25 +05:30
Kapil Gupta 9ac0488e79 fix(esp_wifi): Redesigned eloop code and extend UTs 2026-05-11 11:32:20 +05:30
Kapil Gupta db859a0e6a fix(esp_wifi): Fixed some issues in roaming app found using static analysis 2026-05-11 11:31:46 +05:30
Ashish Sharma 38c36dd9a0 fix(wpa_supplicant): replace deprecated APIs and relax dpp test 2026-05-10 19:16:12 +08:00
Shreyas Sheth fd5990f83e fix(wpa_supplicant): initialize wps pin len correctly 2026-05-06 14:46:27 +08:00
Kapil Gupta bdc7468ec0 Merge branch 'bugfix/fastpsk_optimization_v6.0' into 'release/v6.0'
fast psk optimization (v6.0)

See merge request espressif/esp-idf!47950
2026-05-01 09:16:32 +05:30
Jiang Jiang Jian a61730de72 Merge branch 'bugfix/coverity_get_band_failure_v6.0' into 'release/v6.0'
fix(wpa_supplicant): Fix coverity issue (CID 900721) (v6.0)

See merge request espressif/esp-idf!47016
2026-04-30 19:35:12 +08:00
Kapil Gupta 1b1b574bd1 fix(esp_wifi): Fallback to pbkdf2_sha1_psa when fast options are disabled 2026-04-30 14:52:04 +05:30
Kapil Gupta 69f00c7051 ci(esp_wifi): skip timing test if hw not available 2026-04-30 14:51:59 +05:30
Kapil Gupta e1ce570218 fix(wpa_supplicant): Only use fastpsk/fastpbkdf2 when hw available 2026-04-30 14:40:25 +05:30
Kapil Gupta 761d6def65 fix(wpa_supplicant): Add optimizations in fastpsk 2026-04-30 14:40:25 +05:30
Jiang Jiang Jian 8ae6d8bed6 Merge branch 'bugfix/eap_frag_optimization_v6.0' into 'release/v6.0'
fix(esp_wifi): Skip allocation of new buffers during EAP processing (v6.0)

See merge request espressif/esp-idf!47872
2026-04-30 16:32:22 +08:00
Jiang Jiang Jian 129f0961fc Merge branch 'bugfix/wps_frag_handling_v6.0' into 'release/v6.0'
fix(wps): harden enrollee WSC fragment handling (v6.0)

See merge request espressif/esp-idf!47856
2026-04-30 16:32:13 +08:00
Jiang Jiang Jian bf3ab41987 Merge branch 'bugfix/static_analysis_issue_supplicant_v6.0' into 'release/v6.0'
fix(esp_wifi): Backport some fixes to v6.0

See merge request espressif/esp-idf!47651
2026-04-30 16:30:23 +08:00
Nachiket Kukade 1565e9dc19 fix(wpa_supplicant): Fix coverity issue (CID 900721)
Return a valid band mode in case of get_band failure
2026-04-30 16:28:01 +08:00
Jiang Jiang Jian 080836b4cb Merge branch 'bugfix/fix_external_coex_function_ci_memory_check_fail_issue_v6.0' into 'release/v6.0'
fix(wifi): fix unit test ci memory check fail issue(Backport v6.0)

See merge request espressif/esp-idf!47142
2026-04-30 16:25:27 +08:00
Fu Hanxi 3132b2edb1 Merge branch 'ci/eco-to-rev_v6.0' into 'release/v6.0'
ci: rename eco tags to revision (v6.0)

See merge request espressif/esp-idf!47085
2026-04-27 15:31:16 +02:00
Kapil Gupta ec3c82c177 fix(esp_wifi): Backport some fixes to v6.0 2026-04-24 17:14:05 +08:00
Kapil Gupta a83eabab11 fix(esp_wifi): clean up fragment rx flow 2026-04-24 14:21:28 +05:30
Kapil Gupta 8a197ec0ea fix(esp_wifi): Skip allocation of new buffers during EAP processing 2026-04-23 09:47:38 +05:30
Kapil Gupta 2be5c4f05a fix(esp_wifi): Address review comments on MR 2026-04-22 16:30:15 +05:30
Kapil Gupta 6248e45526 fix(esp_wifi): Disconnect before sending WPS success event 2026-04-22 16:30:15 +05:30