488 Commits

Author SHA1 Message Date
Jiang Jiang Jian
3106c368eb Merge branch 'feat/support_esp32c2_eco4_wifi_v50' into 'release/v5.0'
Feat/support esp32c2 eco4 wifi v50

See merge request espressif/esp-idf!34659
2024-12-04 20:43:06 +08:00
Jiang Jiang Jian
01a851ca9d Merge branch 'bugfix/wps_ie_reset_v50' into 'release/v5.0'
fix(wifi): Remove WPS IEs once WPS succeeds

See merge request espressif/esp-idf!35081
2024-11-25 15:04:09 +08:00
Kapil Gupta
88cb3141bf fix(wifi): Remove WPS IEs once WPS succeeds 2024-11-21 13:49:04 +05:30
wangtao@espressif.com
55184e83aa feat(wifi): support esp32c2 eco4 wifi bringup 2024-11-18 15:57:11 +08:00
Jiang Jiang Jian
aacfeee713 Merge branch 'bugfix/wpa2_ent_fixes_v5.0' into 'release/v5.0'
Few fixes in wpa_supplicant(v5.0)

See merge request espressif/esp-idf!34447
2024-10-31 14:36:50 +08:00
muhaidong
53584bbdce fix(wifi): fix miss internal wapi deinit issue 2024-10-29 11:56:41 +08:00
Aditi
0a84eb907f fix(wpa_supplicant): Add few fixes in dpp task 2024-10-28 17:46:56 +05:30
aditi
3d025d9ecf fix(wpa_supplicant): Add few fixes in btm_rrm task 2024-10-28 17:46:55 +05:30
aditi
20f1057797 fix(wpa_supplicant): Add few fixes in eloop task 2024-10-28 17:46:55 +05:30
aditi
716b4ddc32 fix(wpa_supplicant): Add few fixes in WPS task 2024-10-28 17:46:55 +05:30
aditi
a4b83d0c4a fix(wpa_supplicant): Add few fixes in eap client code 2024-10-28 17:46:53 +05:30
Jiang Jiang Jian
795e2bbae1 Merge branch 'bugfix/backport_supplicant_fixes_v5.0' into 'release/v5.0'
fix(wifi): Backport some fixes(v5.0)

See merge request espressif/esp-idf!33978
2024-10-24 15:47:37 +08:00
Kapil Gupta
6b3b661774 fix(esp_wifi): Prevent memory overflow in WPS 2024-10-13 18:13:18 +08:00
Kapil Gupta
1b9a66617d fix(esp_wifi): Mask some error conditions in WPS
Mask some error conditions in WPS to increase the probability of
WPS success.
2024-10-13 18:13:18 +08:00
Kapil Gupta
0803307ffe fix(esp_wifi): Disable WPS timers once WPS succeed 2024-10-13 18:13:18 +08:00
Kapil Gupta
c1f41cdfd0 fix(esp_wifi): Allow connection with WPA mode in WPS 2024-10-13 18:13:18 +08:00
Kapil Gupta
ab99551f8c fix(esp_wifi): Deinit WPS registrar during hostapd deinit 2024-10-13 18:13:18 +08:00
Kapil Gupta
7f9e2044df fix(esp_wifi): Added prints in btm roam for error condition 2024-10-13 18:13:18 +08:00
Jouni Malinen
ae56989c7f SAE: Check for invalid Rejected Groups element length explicitly on STA
Instead of practically ignoring an odd octet at the end of the element,
check for such invalid case explicitly. This is needed to avoid a
potential group downgrade attack.

Fixes: 444d76f74f65 ("SAE: Check that peer's rejected groups are not enabled")
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-10-07 12:31:11 +05:30
Jouni Malinen
92cf32a40b SAE: Check that peer's rejected groups are not enabled
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-10-07 12:31:11 +05:30
Jouni Malinen
8abeae65ed SAE: Reject invalid Rejected Groups element in the parser
There is no need to depend on all uses (i.e., both hostapd and
wpa_supplicant) to verify that the length of the Rejected Groups field
in the Rejected Groups element is valid (i.e., a multiple of two octets)
since the common parser can reject the message when detecting this.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-10-07 12:31:11 +05:30
Jouni Malinen
ecea235913 SAE: Check that peer's rejected groups are not enabled in AP
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-10-07 12:30:16 +05:30
Kapil Gupta
0c0d597f3c fix(esp_wifi): Set PMK after SAE exchange 2024-09-27 09:53:58 +05:30
Nachiket Kukade
1e88c7a2ff fix(wifi): Fix wrong typecasting of sta_info while getting SPP Caps 2024-09-04 10:53:22 +08:00
aditi
3769a10ef7 fix(wpa_supplicant):Deinit old dpp authentication data after receiving config. 2024-08-16 10:41:36 +05:30
Jiang Jiang Jian
cb74823a38 Merge branch 'bugfix/sae_gcmp_conn_failure' into 'release/v5.0'
Fix SAE connection failure when GCMP cipher is used (v5.0)

See merge request espressif/esp-idf!32601
2024-08-15 21:05:22 +08:00
Jiang Jiang Jian
4019318c60 Merge branch 'bugfix/handle_no_pmkid_case_owe_v5.0' into 'release/v5.0'
Recompute keys in OWE incase of PMKID absence or mismatch (Backport v5.0)

See merge request espressif/esp-idf!32336
2024-08-15 16:14:04 +08:00
Shyamal Khachane
cad8a7c41c fix(esp_wifi): Refactor and update wpa_supplicant with upstream 2024-08-07 12:36:13 +05:30
Shyamal Khachane
9a746e5b4e fix(esp_wifi): Handle PMKID mismatch or absence in OWE
Compute keys incase PMKID does not match or PMKID is absent in association response
2024-07-25 08:42:53 +05:30
Kapil Gupta
a3ef4cb054 fix(esp_wifi): backport some dpp fixes 2024-07-22 12:09:27 +05:30
Sarvesh Bodakhe
12d58c893d fix(wpa_supplicant): Avoid delaying removal of wps enrollee by 10ms
This is no longer needed as eloop timers are now executed in wifi task context.
2024-07-12 12:01:11 +05:30
Sarvesh Bodakhe
c36c3920fc fix(wpa_supplicant): Handle case when WPS registrar misses WSC_DONE sent by station
When registrar somehow misses the WSC_DONE sent by station and station
goes for next connection after sending deauth, make sure that softAP
disables the registrar.
2024-07-12 11:58:56 +05:30
aditi
30effe7894 fix(wpa_supplicant):Fix for setting wps status fail when connection fails 2024-07-11 18:17:00 +05:30
Sarvesh Bodakhe
b3fb47908c feat(wifi): Add support for WPA3 transition disable and more updates
1. Add support for SAE-PK and WPA3-Enterprise transition disable
2. Add support to handle OWE transition disable indication from AP
3. refactor: Backport common changes in scan/connect path from 90cc6158
   - 90cc6158 adds support for Network Introduction Protocol in DPP
4. Fix issue of supplicant using wrong parameters to configure bss
  - Ensure that wpa_supplicant's state machine registers the requirement for rsnxe
    before deciding to add rsnxe to a assoc request.

Co-authored-by: jgujarathi <jash.gujarathi@espressif.com>
2024-07-03 12:46:58 +05:30
muhaidong
fbc9fe582c fix(wifi): fix configure gcmp failure issue 2024-07-03 10:57:33 +08:00
Sarvesh Bodakhe
af72ce1f75 fix(esp_wifi): Fix some wifi bugs
1. Fix issues related to mgmt packets encryption in GCMP
2. Fix issue of wrong decryption of mgmt packets when PMF is enabled
3. Fix frame subtype in send_mgmt_frame
4. Fix issue of wrong Rx control information of espnow packets for esp32 and esp32s2
5. Fix send mgmt err when eapol process
2024-07-01 11:06:13 +05:30
Sarvesh Bodakhe
7fd73ede7f fix(wifi): Add bugfix to avoid RSNXE and KDE mismatch during 4-way-handshake 2024-07-01 11:05:25 +05:30
Shyamal Khachane
ff6db87429 fix(esp_wifi): Fix a memory leak that occurs when 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
2024-06-21 16:38:27 +05:30
Nachiket Kukade
c2123313b4 fix(wpa_supplicant): Suppress RSN IE print to Verbose level 2024-05-29 11:06:57 +05:30
aditi_lonkar
6c4c3d6ef8 fix(wpa_supplicant):Fix memory leak in wpa3-sae
Closes https://github.com/espressif/esp-idf/issues/11381
2024-05-21 19:06:26 +05:30
Sarvesh Bodakhe
9efdcd52cc fix(wifi): fix bug in 'esp_wifi_deauthenticate_internal' and other improvements 2024-05-20 14:44:36 +05:30
Sarvesh Bodakhe
61a91afa3a fix(wpa_supplicant): Add some bugfixes in wpa_supplicant
1) Add parameter to configure reason code of deauth frame
2) Add logs to indicate MIC failure 4-Way-Handshake
3) Process RSNXE capabilities only if AP advertises them
2024-05-20 14:44:16 +05:30
Jiang Jiang Jian
397c1d9903 Merge branch 'bugfix/wps_crash_issue_v5.0' into 'release/v5.0'
fix(wpa_supplicant): Avoid dereferencing a dangling function pointer in WPS (Backport v5.0)

See merge request espressif/esp-idf!29736
2024-04-07 10:11:34 +08:00
Sarvesh Bodakhe
3847822531 fix(wpa_supplicant): Improve execution flow for WPS registrar public APIs
Make sure that WPS registrar public APIs do not modify supplicant
data in application task context. Execute API functionlity in eloop
context to prevent protential race conditions.
2024-04-03 11:33:54 +08:00
Sarvesh Bodakhe
c24b840ce7 fix(wifi): Avoid dereferencing a dangling function pointer in WPS supplicant
Avoid dereferencing a dangling function pointer in 'eap_server_sm_deinit()'.
This issue arises when hostap unregisteres EAP methods before it removes
the server state machine for station.
2024-04-03 11:33:54 +08:00
jgujarathi
969605c7c2 fix(wpa_supplicant): Cancel offchannel listen operations before sending dpp fail
- Ensure that offchannel listening operations are cancelled before sending dpp
  fail events
2024-04-03 10:20:54 +08:00
jgujarathi
0f1c0d27c8 fix(wpa_supplicant): Ensure dpp auth structure is deinited in dpp task context
- Ensure that the dpp auth data gets deinited only in DPP task context to ensure
  that there are no concurrency issues in usage of DPP auth data.
2024-04-03 10:20:54 +08:00
Kapil Gupta
34121bdeac fix(wpa_supplicant): (PEAP client) Update Phase 2 auth requirements
The previous PEAP client behavior allowed the server to skip Phase 2
authentication with the expectation that the server was authenticated
during Phase 1 through TLS server certificate validation. Various PEAP
specifications are not exactly clear on what the behavior on this front
is supposed to be and as such, this ended up being more flexible than
the TTLS/FAST/TEAP cases. However, this is not really ideal when
unfortunately common misconfiguration of PEAP is used in deployed
devices where the server trust root (ca_cert) is not configured or the
user has an easy option for allowing this validation step to be skipped.

Change the default PEAP client behavior to be to require Phase 2
authentication to be successfully completed for cases where TLS session
resumption is not used and the client certificate has not been
configured. Those two exceptions are the main cases where a deployed
authentication server might skip Phase 2 and as such, where a more
strict default behavior could result in undesired interoperability
issues. Requiring Phase 2 authentication will end up disabling TLS
session resumption automatically to avoid interoperability issues.

Allow Phase 2 authentication behavior to be configured with a new phase1
configuration parameter option:
'phase2_auth' option can be used to control Phase 2 (i.e., within TLS
tunnel) behavior for PEAP:
 * 0 = do not require Phase 2 authentication
 * 1 = require Phase 2 authentication when client certificate
   (private_key/client_cert) is no used and TLS session resumption was
   not used (default)
 * 2 = require Phase 2 authentication in all cases
2024-03-15 13:22:22 +05:30
muhaidong
0f3286aa92 fix(wifi): fix esp_wifi_scan_start memory leakage issue
Closes https://github.com/espressif/esp-idf/issues/10693
2024-03-07 17:43:57 +08:00
Jiang Jiang Jian
702853c00e Merge branch 'bugfix/esp32c2_eap_auth_v5.0' into 'release/v5.0'
fix(wifi): Added low heap usage Kconfig option for eap enterprise (v5.0)

See merge request espressif/esp-idf!28826
2024-02-29 11:24:50 +08:00