541 Commits

Author SHA1 Message Date
Jouni Malinen
4e9f740a0e 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-12-03 14:05:21 +08:00
Jouni Malinen
7d943fb032 SAE: Check that peer's rejected groups are not enabled
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-12-03 14:05:21 +08:00
Jouni Malinen
84dc7782b7 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-12-03 14:05:21 +08:00
Jouni Malinen
2e25cef6b3 SAE: Check for invalid Rejected Groups element length explicitly
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.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-12-03 14:05:21 +08:00
Jouni Malinen
3448ff697b SAE: Check that peer's rejected groups are not enabled in AP
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-12-03 14:05:21 +08:00
sibeibei
ee099bda6c fix(wifi): fix some wifi issues 241031
1. fix cant sleep if reconnect to connected ap
    2. clear pmk in internal reconnection
    3. update connect status for init-->auth
2024-11-28 16:44:20 +08:00
Shyamal Khachane
2eaee75296 fix(esp_wifi): Populate appropriate reason codes when softAP sends deauthentication
Populate appropriate reason for sending deauthentication when softAP receives
invalid RSN IE from association request
2024-11-27 00:34:50 +05:30
Sarvesh Bodakhe
e35035aa9a fix(wifi): Fix wrong wifi reason codes reported on station and softAP
- Fix wrong reason code reported when softAP issues a disconnect for station
- Fix wrong reason code reported when association timeout happens at station
- Deprecate enums WIFI_REASON_ASSOC_EXPIRE, WIFI_REASON_NOT_AUTHED, WIFI_REASON_NOT_ASSOCED
  and use WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY,
  WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA,
  WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA respectively
- Update wifi documentation related to reason codes
2024-11-27 00:34:47 +05:30
Sarvesh Bodakhe
9475109311 fix(wpa_supplicant): Fix debug print in wps_start_msg_timer() 2024-11-27 00:30:24 +05:30
Jiang Jiang Jian
b3e6d62c70 Merge branch 'bugfix/wpa2_ent_fixes_v5.1' into 'release/v5.1'
Few fixes in wpa_supplicant(v5.1)

See merge request espressif/esp-idf!34446
2024-11-01 11:39:25 +08:00
muhaidong
0fff36592e fix(wifi): fix miss internal wapi deinit issue 2024-10-29 12:00:11 +08:00
Aditi
396df5d50f fix(wpa_supplicant): Add few fixes in dpp task 2024-10-25 14:49:42 +05:30
aditi
bc26245787 fix(wpa_supplicant): Add few fixes in btm_rrm task 2024-10-25 14:49:33 +05:30
aditi
ae2569e008 fix(wpa_supplicant): Add few fixes in eloop task 2024-10-25 14:48:45 +05:30
aditi
9e6da54e4d fix(wpa_supplicant): Add few fixes in WPS task 2024-10-25 14:48:38 +05:30
aditi
4e81e6e6f4 fix(wpa_supplicant): Add few fixes in eap client code 2024-10-25 14:48:24 +05:30
Kapil Gupta
6938abf90c fix(esp_wifi): Prevent memory overflow in WPS 2024-10-09 16:07:56 +05:30
Kapil Gupta
60552ecfa1 fix(esp_wifi): Mask some error conditions in WPS
Mask some error conditions in WPS to increase the probability of
WPS success.
2024-10-09 16:07:56 +05:30
Kapil Gupta
7810b9f4ff fix(esp_wifi): Disable WPS timers once WPS succeed 2024-10-09 16:07:56 +05:30
Kapil Gupta
beb46af390 fix(esp_wifi): Allow connection with WPA mode in WPS 2024-10-09 16:07:44 +05:30
Kapil Gupta
8baaec05be fix(esp_wifi): Deinit WPS registrar during hostapd deinit 2024-10-07 10:42:39 +05:30
Kapil Gupta
a6006f5a56 fix(esp_wifi): Added prints in btm roam for error condition 2024-10-07 10:42:32 +05:30
Kapil Gupta
4acdc6c830 fix(esp_wifi): Set PMK after SAE exchange 2024-09-27 12:27:32 +08:00
wangtao@espressif.com
4758622331 feat(wifi): support esp32c2 eco4 wifi bringup 2024-09-20 20:32:42 +08:00
Sajia
0dbd2aa24c fix(esp_wifi): Refactor and update wpa_supplicant with upstream 2024-09-02 16:12:32 +05:30
Nachiket Kukade
75f4e2c8bb fix(wifi): Fix wrong typecasting of sta_info while getting SPP Caps 2024-08-27 16:25:01 +05:30
aditi
ae9be2f03d fix(wpa_supplicant):Deinit old dpp authentication data after receiving config. 2024-08-23 10:36:36 +08:00
Shyamal Khachane
39d284ba33 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:33:42 +05:30
Kapil Gupta
3d84716864 fix(esp_wifi): backport some dpp fixes 2024-07-22 12:02:43 +05:30
aditi
03f7fad2fa fix(wpa_supplicant):Fix for setting wps status fail when connection fails 2024-07-17 11:17:34 +05:30
muhaidong
1f74339756 fix(wifi): fix configure gcmp failure issue 2024-07-15 20:04:09 +08:00
Sarvesh Bodakhe
67de87c6ba 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:03:30 +05:30
Sarvesh Bodakhe
23470b660e 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 12:03:06 +05:30
Sarvesh Bodakhe
de4010b95a feat(esp_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: default avatarjgujarathi <jash.gujarathi@espressif.com>
2024-07-03 13:07:47 +05:30
Jiang Jiang Jian
2653904d33 Merge branch 'bugfix/mgmt_gcmp_issue_v5.1' into 'release/v5.1'
fix(wifi): Fix GCMP encryption for mgmt packets and other bugfixes (Backport v5.1)

See merge request espressif/esp-idf!30481
2024-07-01 11:06:05 +08:00
Kapil Gupta
967eda03d0 fix(esp_wifi): Correct action frame type in send_mgmt_frame API 2024-06-28 16:25:18 +05:30
Sarvesh Bodakhe
9d637316a9 fix(wifi): Add bugfix to avoid RSNXE and KDE mismatch during 4-way-handshake 2024-06-28 16:25:18 +05:30
Kapil Gupta
c5e1603e6d fix(wifi): Fix encryption/decryption issue for mgmt packets
* Fix issues related to mgmt packets encryption in GCMP
* Fix issue of wrong decryption of mgmt packets when PMF is enabled
* Fix softAP bug in handling of SAE Reauthentication
* Fix send mgmt err when eapol process
* Fix data len not correct in he actions
2024-06-28 16:24:54 +05:30
Shreyas Sheth
a14d4ea8a4 fix(wpa_supplicant): Fix wpa3 AP crash because of dangling pointer 2024-06-26 10:45:28 +08:00
Shyamal Khachane
233a57d4f5 fix(esp_wifi): Fix a memory leak that occurs when the 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 14:47:30 +05:30
Nachiket Kukade
1614f9e3b5 fix(wpa_supplicant): Suppress RSN IE print to Verbose level 2024-05-29 11:09:57 +05:30
Jiang Jiang Jian
db65d0b71e Merge branch 'feature/disable_pmk_caching_v5.1' into 'release/v5.1'
feat(esp_wifi): Provide API to disable PMK caching (v5.1)

See merge request espressif/esp-idf!30290
2024-05-13 10:43:22 +08:00
Jiang Jiang Jian
3e151e836f Merge branch 'bugfix/dpp_auth_deinit_crash_v51' into 'release/v5.1'
Fix issues with DPP stop listen and DPP auth data deinit (Backport v5.1)

See merge request espressif/esp-idf!29702
2024-05-13 10:37:09 +08:00
Kapil Gupta
a4cda66e30 feat(esp_wifi): Provide API to disable PMK caching 2024-04-17 09:40:37 +05:30
Shreyas Sheth
2ac6e7345f fix(wpa_supplicant): Compile error when CONFIG_SAE is disabled
Closes https://github.com/espressif/esp-idf/issues/13553
2024-04-11 11:18:58 +05:30
Shreyas Sheth
a64d8b12c8 fix(esp_wifi): Fix crash when assoc req comes before confirm is processed 2024-04-03 00:04:14 +05:30
Sarvesh Bodakhe
d2b674622c fix(esp_wifi): Fix regression caused by 02d6704a when supplicant logs enabled 2024-03-20 11:03:20 +05:30
jgujarathi
aef69dffb3 fix(wpa_supplicant): Cancel offchannel listen operations before sending dpp fail
- Ensure that offchannel listening operations are cancelled before sending dpp
  fail events
2024-03-18 14:37:33 +05:30
jgujarathi
36f3cbf369 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-03-18 14:37:30 +05:30
Sarvesh Bodakhe
02d6704a30 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-03-18 12:44:59 +05:30