]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
4 years agoRemove obsolete defconfig notes regarding EAP-FAST support in OpenSSL
Jouni Malinen [Tue, 9 Jul 2019 13:43:05 +0000 (16:43 +0300)] 
Remove obsolete defconfig notes regarding EAP-FAST support in OpenSSL

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoReturn success/failure result from tls_prf_sha256()
Jouni Malinen [Thu, 27 Jun 2019 15:08:16 +0000 (18:08 +0300)] 
Return success/failure result from tls_prf_sha256()

The hash functions used within this function could fail in theory, so
provide the result to the caller.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoOpenSSL: Allow anon-DH cipher suites to be added for TEAP
Jouni Malinen [Tue, 9 Jul 2019 13:37:19 +0000 (16:37 +0300)] 
OpenSSL: Allow anon-DH cipher suites to be added for TEAP

Add a new TLS_CONN_* flag to provide a higher level mechanism for adding
(instead of fully replacing) allowed list of TLS ciphersuites for TEAP
provisioning purposes.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoOpenSSL: Add tls_connection_get_cipher_suite()
Jouni Malinen [Fri, 5 Jul 2019 15:07:14 +0000 (18:07 +0300)] 
OpenSSL: Add tls_connection_get_cipher_suite()

This can be used to fetch the 16-bit TLS cipher suite identifier.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoOpenSSL: Reject empty cipher list in tls_connection_set_cipher_list()
Jouni Malinen [Sat, 11 Feb 2017 13:56:47 +0000 (15:56 +0200)] 
OpenSSL: Reject empty cipher list in tls_connection_set_cipher_list()

Previously, this invalid call would have resulted in printing out a
string from uninitialized memory

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoAdd tls_get_tls_unique() to fetch "tls-unique" for channel binding
Jouni Malinen [Mon, 10 Aug 2015 18:21:40 +0000 (21:21 +0300)] 
Add tls_get_tls_unique() to fetch "tls-unique" for channel binding

This implements "tls-unique" derivation per RFC 5929, Section 3. This
will be needed for channel binding, e.g., with EAP-TEAP.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Allow test selection with prefix wildcards
Jouni Malinen [Tue, 9 Jul 2019 13:09:04 +0000 (16:09 +0300)] 
tests: Allow test selection with prefix wildcards

Test names can now use wildcard in the end (e.g., ap_wpa2_psk*) to match
all test cases with the specified prefix.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoSilence static analyzer warning about null termination of a string
Jouni Malinen [Sun, 7 Jul 2019 07:02:40 +0000 (10:02 +0300)] 
Silence static analyzer warning about null termination of a string

The buf[] array is initialized to zeros, so it was already null
terminated since the read() call did not allow the last character of the
buffer to be overwritten. Since that was apparently not enough to make
some static analyzers understand the design, use explicit null
termination after a successful read() call.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoRemove useless NULL comparison for an array
Jouni Malinen [Sun, 7 Jul 2019 06:58:46 +0000 (09:58 +0300)] 
Remove useless NULL comparison for an array

Now that the TLS peer_cert information is provided as a full struct to
handler functions, the altsubject pointer shows up as an array and
causes static analyzers to warn about unnecessary NULL comparison. Get
rid of that comparison now that it is clearly not needed anymore.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoEAP-pwd: Run through prf result processing even if it >= prime
Jouni Malinen [Mon, 24 Jun 2019 20:02:51 +0000 (23:02 +0300)] 
EAP-pwd: Run through prf result processing even if it >= prime

This reduces differences in timing and memory access within the
hunting-and-pecking loop for ECC groups that have a prime that is not
close to a power of two (e.g., Brainpool curves).

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoSAE: Run through prf result processing even if it >= prime
Jouni Malinen [Mon, 24 Jun 2019 20:01:06 +0000 (23:01 +0300)] 
SAE: Run through prf result processing even if it >= prime

This reduces differences in timing and memory access within the
hunting-and-pecking loop for ECC groups that have a prime that is not
close to a power of two (e.g., Brainpool curves).

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoMove MAC address randomization enable/disable to helper functions
Eric Caruso [Thu, 30 May 2019 18:10:46 +0000 (11:10 -0700)] 
Move MAC address randomization enable/disable to helper functions

This makes it easier to share this for D-Bus implementation.

Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
4 years agotests: Fix scan_dfs false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:51:09 +0000 (10:51 +0900)] 
tests: Fix scan_dfs false negative by using common finalizer

scan_dfs fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix p2p_go_move_scm_peer_does_not_support false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:51:08 +0000 (10:51 +0900)] 
tests: Fix p2p_go_move_scm_peer_does_not_support false negative by using common finalizer

p2p_go_move_scm_peer_does_not_support fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix p2p_channel_5ghz_165_169_us false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:51:07 +0000 (10:51 +0900)] 
tests: Fix p2p_channel_5ghz_165_169_us false negative by using common finalizer

p2p_channel_5ghz_165_169_us fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix p2p_channel_5ghz_only false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:51:06 +0000 (10:51 +0900)] 
tests: Fix p2p_channel_5ghz_only false negative by using common finalizer

p2p_channel_5ghz_only fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix autogo_ht_vht false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:51:05 +0000 (10:51 +0900)] 
tests: Fix autogo_ht_vht false negative by using common finalizer

autogo_ht_vht fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix p2p_autogo_pref_chan_not_in_regulatory false negative by using common...
Masashi Honma [Tue, 25 Jun 2019 01:51:04 +0000 (10:51 +0900)] 
tests: Fix p2p_autogo_pref_chan_not_in_regulatory false negative by using common finalizer

p2p_autogo_pref_chan_not_in_regulatory fails with this message.

---------------
wlan0: Country code not reset back to 00: is SE
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht80_to_24g_ht false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:51:03 +0000 (10:51 +0900)] 
tests: Fix ap_vht80_to_24g_ht false negative by using common finalizer

ap_vht80_to_24g_ht fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht_40_fallback_to_20 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:51:02 +0000 (10:51 +0900)] 
tests: Fix ap_vht_40_fallback_to_20 false negative by using common finalizer

ap_vht_40_fallback_to_20 fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht_tkip false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:51:01 +0000 (10:51 +0900)] 
tests: Fix ap_vht_tkip false negative by using common finalizer

ap_vht_tkip fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix prefer_vht40 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:51:00 +0000 (10:51 +0900)] 
tests: Fix prefer_vht40 false negative by using common finalizer

prefer_vht40 fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht80_csa false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:59 +0000 (10:50 +0900)] 
tests: Fix ap_vht80_csa false negative by using common finalizer

ap_vht80_csa fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht80plus80_invalid false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:58 +0000 (10:50 +0900)] 
tests: Fix ap_vht80plus80_invalid false negative by using common finalizer

ap_vht80plus80_invalid fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht160_no_ht40 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:57 +0000 (10:50 +0900)] 
tests: Fix ap_vht160_no_ht40 false negative by using common finalizer

ap_vht160_no_ht40 fails with this message.

---------------
wlan0: Country code not reset back to 00: is ZA
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht_40 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:56 +0000 (10:50 +0900)] 
tests: Fix ap_vht_40 false negative by using common finalizer

ap_vht_40 fails with this message.

---------------
wlan0: Country code not reset back to 00: is DE
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht_20 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:55 +0000 (10:50 +0900)] 
tests: Fix ap_vht_20 false negative by using common finalizer

ap_vht_20 fails with this message.

---------------
wlan0: Country code not reset back to 00: is DE
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht80_invalid2 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:54 +0000 (10:50 +0900)] 
tests: Fix ap_vht80_invalid2 false negative by using common finalizer

ap_vht80_invalid2 fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht80_invalid false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:53 +0000 (10:50 +0900)] 
tests: Fix ap_vht80_invalid false negative by using common finalizer

ap_vht80_invalid fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht_wifi_generation false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:52 +0000 (10:50 +0900)] 
tests: Fix ap_vht_wifi_generation false negative by using common finalizer

ap_vht_wifi_generation fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht80 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:51 +0000 (10:50 +0900)] 
tests: Fix ap_vht80 false negative by using common finalizer

ap_vht80 fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_wps_conf_chan14 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:50 +0000 (10:50 +0900)] 
tests: Fix ap_wps_conf_chan14 false negative by using common finalizer

ap_wps_conf_chan14 fails with this message.

---------------
wlan0: Country code not reset back to 00: is JP
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_acs_vht160_scan_disable false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:49 +0000 (10:50 +0900)] 
tests: Fix ap_acs_vht160_scan_disable false negative by using common finalizer

ap_acs_vht160_scan_disable fails with this message.

---------------
wlan0: Country code not reset back to 00: is ZA
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix rrm_beacon_req_passive_scan_vht160 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:48 +0000 (10:50 +0900)] 
tests: Fix rrm_beacon_req_passive_scan_vht160 false negative by using common finalizer

rrm_beacon_req_passive_scan_vht160 fails with this message.

---------------
wlan0: Country code not reset back to 00: is ZA
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix rrm_beacon_req_table_vht false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:47 +0000 (10:50 +0900)] 
tests: Fix rrm_beacon_req_table_vht false negative by using common finalizer

rrm_beacon_req_table_vht fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_ht40_5ghz_disabled_sec false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:46 +0000 (10:50 +0900)] 
tests: Fix ap_ht40_5ghz_disabled_sec false negative by using common finalizer

ap_ht40_5ghz_disabled_sec fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_ht40_5ghz_invalid_pair false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:45 +0000 (10:50 +0900)] 
tests: Fix ap_ht40_5ghz_invalid_pair false negative by using common finalizer

ap_ht40_5ghz_invalid_pair fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_track_sta_force_2ghz false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:44 +0000 (10:50 +0900)] 
tests: Fix ap_track_sta_force_2ghz false negative by using common finalizer

ap_track_sta_force_2ghz fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_track_sta_force_5ghz false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:43 +0000 (10:50 +0900)] 
tests: Fix ap_track_sta_force_5ghz false negative by using common finalizer

ap_track_sta_force_5ghz fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_track_sta_no_auth_passive false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:42 +0000 (10:50 +0900)] 
tests: Fix ap_track_sta_no_auth_passive false negative by using common finalizer

ap_track_sta_no_auth_passive fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_track_sta_no_auth false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:41 +0000 (10:50 +0900)] 
tests: Fix ap_track_sta_no_auth false negative by using common finalizer

ap_track_sta_no_auth fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_track_sta_no_probe_resp false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:40 +0000 (10:50 +0900)] 
tests: Fix ap_track_sta_no_probe_resp false negative by using common finalizer

ap_track_sta_no_probe_resp fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_track_sta false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:39 +0000 (10:50 +0900)] 
tests: Fix ap_track_sta false negative by using common finalizer

ap_track_sta fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix nfc_wps_handover_chan14 false negative by using common finalizer
Masashi Honma [Tue, 25 Jun 2019 01:50:38 +0000 (10:50 +0900)] 
tests: Fix nfc_wps_handover_chan14 false negative by using common finalizer

nfc_wps_handover_chan14 fails with this message.

---------------
wlan0: Country code not reset back to 00: is JP
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agoP2P: Fix memory size for os_memmove() in p2p_check_pref_chan()
Daisuke Niwa [Wed, 26 Jun 2019 06:27:33 +0000 (15:27 +0900)] 
P2P: Fix memory size for os_memmove() in p2p_check_pref_chan()

'sizeof' was not used with os_memmove() for an integer array. This lead
to an issue with part of the preferred channel list not being used.

Fixes: 79329ae0aa19 ("P2P: Verify local driver preferred frequencies for P2P use cases")
Signed-off-by: Daichi Ueura <daichi.ueura@sony.com>
4 years agoWPS: Fix a typo in a comment (use full WPA2-Personal name)
Jouni Malinen [Wed, 26 Jun 2019 17:01:34 +0000 (20:01 +0300)] 
WPS: Fix a typo in a comment (use full WPA2-Personal name)

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Fix ap_vht_use_sta_nsts false negative by using common finalizer
Masashi Honma [Thu, 6 Jun 2019 05:27:40 +0000 (14:27 +0900)] 
tests: Fix ap_vht_use_sta_nsts false negative by using common finalizer

ap_vht_use_sta_nsts fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht_capab_not_supported false negative by using common finalizer
Masashi Honma [Thu, 6 Jun 2019 05:27:39 +0000 (14:27 +0900)] 
tests: Fix ap_vht_capab_not_supported false negative by using common finalizer

ap_vht_capab_not_supported fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix ap_vht80c/d false negative by using common finalizer
Masashi Honma [Thu, 6 Jun 2019 05:27:38 +0000 (14:27 +0900)] 
tests: Fix ap_vht80c/d false negative by using common finalizer

ap_vht80c/d fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agotests: Fix dfs_radar2 false negative by using common finalizer
Masashi Honma [Thu, 6 Jun 2019 05:27:37 +0000 (14:27 +0900)] 
tests: Fix dfs_radar2 false negative by using common finalizer

dfs_radar2 fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agomesh: Add support for HE mode
Sven Eckelmann [Fri, 14 Jun 2019 14:49:21 +0000 (16:49 +0200)] 
mesh: Add support for HE mode

Mesh points can partially support HE features (when requiring no
controlling STA/AP) as long as hardware supports it. The kernel just
requires support for HE mesh and wpa_supplicant can forward the peer
capabilities to the kernel for further processing.

Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
4 years agonl80211: Add driver multi iftype HE capability parsing
Sven Eckelmann [Fri, 14 Jun 2019 14:49:20 +0000 (16:49 +0200)] 
nl80211: Add driver multi iftype HE capability parsing

The HE capabilities are no longer per PHY but per iftype on this
specific PHY. It is therefore no longer enough to just parse the AP
capabilities.

The he_capabilities are now duplicated to store all information for
IEEE80211_MODE_* which hostap cares about. The nl80211 driver fills in
this information when the iftype supports HE. The rest of the code still
only uses the IEEE80211_HE_AP portion but can be extended later to also
use other HE capabilities.

Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
4 years agowpa_supplicant: Fix type for ssid->mode comparisons
Sven Eckelmann [Fri, 14 Jun 2019 14:49:19 +0000 (16:49 +0200)] 
wpa_supplicant: Fix type for ssid->mode comparisons

The ssid->mode is from type enum wpas_mode and all its constants start
with WPAS_MODE_*. Still some of the code sections used the
IEEE80211_MODE_* defines instead of WPAS_MODE_*.

This should have no impact on the actual code because the constants for
INFRA, IBSS, AP and MESH had the same values.

Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
4 years agoAP: Simplify "i" definition in hostapd_config_free_bss()
Andrei Otcheretianski [Wed, 19 Jun 2019 12:49:14 +0000 (15:49 +0300)] 
AP: Simplify "i" definition in hostapd_config_free_bss()

Declare the variable only once and reuse it instead of openning
unneeded scopes.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agoDPP: Fix documentation to include operating class for URI
Amit Khatri [Sun, 16 Jun 2019 03:10:37 +0000 (08:40 +0530)] 
DPP: Fix documentation to include operating class for URI

As per code dpp_parse_uri_chan_list() function checks "/" as separator
for operating class and operating channel. Update readme accordingly.

Signed-off-by: Amit Khatri <amit7861234@gmail.com>
4 years agoHE: Fix HE capability check for PPE threshold present
Sven Eckelmann [Wed, 12 Jun 2019 23:10:07 +0000 (01:10 +0200)] 
HE: Fix HE capability check for PPE threshold present

The the mask for PPE threshold present in the HE phy capability byte 6 is
0x80 and not 0x6. This incorrect mask breaks the length calculation and as
result the acceptance of the HE capabilities for STAs which either:

* don't have the PPE threshold present bit set AND the Codebook Size={7,5}
  MU Feedback or the Triggered SU Beamforming feedback bit set

* do have the PPE threshold present set AND neither the Codebook Size={7,5}
  MU Feedback nor the Triggered SU Beamforming feedback bit set

Fixes: 8f5fc369e263 ("HE: Fix HE Capabilities element variable length encoding")
Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
4 years agolibtommath: Make sure fast_s_mp_mul_digs initializes the W[] array
Jouni Malinen [Sat, 22 Jun 2019 15:42:53 +0000 (18:42 +0300)] 
libtommath: Make sure fast_s_mp_mul_digs initializes the W[] array

Some compilers have started to warn about this and the use of two loops
with ix 0..pa-1 and 0..pa loop a bit suspicious, so better make sure the
array is initialized with zeros before extracting the terms from it.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoTLS: Move ASN.1 DER BOOLEAN validation into generic ASN.1 parsing
Jouni Malinen [Sat, 22 Jun 2019 15:36:57 +0000 (18:36 +0300)] 
TLS: Move ASN.1 DER BOOLEAN validation into generic ASN.1 parsing

This does not need to be specific to X.509, so move the BOOLEAN DER
encoding validation into asn1_get_next() to make it apply for all cases
instead of having to have the caller handle this separately.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoTLS: Only allow 0xff value as TRUE for ASN.1 DER encoded BOOLEAN
Jouni Malinen [Sat, 22 Jun 2019 15:27:36 +0000 (18:27 +0300)] 
TLS: Only allow 0xff value as TRUE for ASN.1 DER encoded BOOLEAN

While BER encoding allows any nonzero value to be used for TRUE, DER is
explicitly allowing only the value 0xff. Enforce this constraint in
X.509 parsing to be more strict with what is acceptable.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Add X.509v3 parsing example with invalid BasicConstraints
Jouni Malinen [Sat, 22 Jun 2019 15:15:22 +0000 (18:15 +0300)] 
tests: Add X.509v3 parsing example with invalid BasicConstraints

This is a regression test based on an input data from OSS-Fuzz.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoTLS: Fix X.509v3 BasicConstraints parsing
Jouni Malinen [Sat, 22 Jun 2019 15:11:24 +0000 (18:11 +0300)] 
TLS: Fix X.509v3 BasicConstraints parsing

Handling of the optional pathLenConstraint after cA was not done
properly. The position after cA needs to be compared to the end of the
SEQUENCE, not the end of the available buffer, to determine whether the
optional pathLenConstraint is present. In addition, when parsing
pathLenConstraint, the length of the remaining buffer was calculated
incorrectly by not subtracting the length of the header fields needed
for cA. This could result in reading couple of octets beyond the end of
the buffer before rejecting the ASN.1 data as invalid.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15408
Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: sigma_dut and UOSC when CA is not trusted
Jouni Malinen [Thu, 20 Jun 2019 20:46:46 +0000 (23:46 +0300)] 
tests: sigma_dut and UOSC when CA is not trusted

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoOpenSSL: Send cert event for the peer even on CA cert failure
Jouni Malinen [Thu, 20 Jun 2019 20:44:51 +0000 (23:44 +0300)] 
OpenSSL: Send cert event for the peer even on CA cert failure

This adds a CTRL-EVENT-EAP-PEER-CERT even for depth=0 even if a depth >
0 certificate results in peer certificate validation error. Previously,
this case resulted in the upper layers not getting any information about
the used peer certificate. Now that information is available, e.g., to
allow server certificate -based overriding of the trust to be done.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agowpadebug: Allow WebView to parse and load clear text (HTTP)
Purushottam Kushwaha [Wed, 12 Jun 2019 12:15:37 +0000 (17:45 +0530)] 
wpadebug: Allow WebView to parse and load clear text (HTTP)

Recent Android version doesn't allow cleartext parsing by WebView by
default:

Error message: ERR_CLEARTEXT_NOT_PERMITTED.

To resolve this wpadebug need to have following updated under
application definition of AndroidManifest.xml
 - android:usesCleartextTraffic="true"

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAvoid use of a shadowed local variable
Jouni Malinen [Tue, 18 Jun 2019 22:17:54 +0000 (01:17 +0300)] 
Avoid use of a shadowed local variable

The same len variable can be used for both needs within
ieee802_1x_get_keys() to avoid compiler warning about use of shadowed
variable.

Fixes: 0ee6885dae04 ("macsec: Store EAP-Key-Name as eapSessionId")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agohostapd: Process OWE IE and update DH IE to the driver if needed
Liangwei Dong [Wed, 29 May 2019 09:11:48 +0000 (05:11 -0400)] 
hostapd: Process OWE IE and update DH IE to the driver if needed

This implements the required functionality in hostapd to facilitate OWE
connection with the AP SME-in-driver cases. Stations can either send DH
IE or PMKID (in RSNE) (or both) in Association Request frame during the
OWE handshake. The drivers that use this offload mechanism do not
interpret this information and instead, pass the same to hostapd for
further processing. hostapd will either validate the PMKID obtained from
the STA or generate DH IE and further indicate the same to the driver.
The driver further sends this information in the Association Response
frame.

Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agonl80211: Introduce the interface to update new DH IE
Liangwei Dong [Mon, 20 May 2019 05:17:38 +0000 (10:47 +0530)] 
nl80211: Introduce the interface to update new DH IE

This command/event interface can be used by SME based host drivers that
rely on user space (hostapd/wpa_supplicant) for DH IE
processing/generation. This interface facilitates the OWE connection
with host drivers by offloading DH IE processing to the user space
(hostapd/wpa_supplicant).

Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoHS 2.0: Skip credential without EAP method for roaming consortium match
Purushottam Kushwaha [Fri, 14 Jun 2019 07:50:01 +0000 (13:20 +0530)] 
HS 2.0: Skip credential without EAP method for roaming consortium match

EAP method is required for a credential that matches configured
roaming_consortium with an Interworking AP. Hence skip credentials which
do not have EAP method specified for this match. This fixes an issue
where a credential that cannot work without EAP method from NAI Realms
information is selected first based on roaming consortium.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Specify EAP type in ap_hs20_set_profile_failures
Jouni Malinen [Fri, 14 Jun 2019 19:57:17 +0000 (22:57 +0300)] 
tests: Specify EAP type in ap_hs20_set_profile_failures

Matching with roaming_consortium requires EAP type to be specified to
work for the connection. This test case was not really testing the
connection part, so this has not been much of an issue in the past, but
in preparation for the matching rules to start filtering out invalid
credential configurations from selection, the EAP type needs to be
explicitly set here.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: WNM BSS Transition Management disabled
Jouni Malinen [Fri, 14 Jun 2019 18:45:09 +0000 (21:45 +0300)] 
tests: WNM BSS Transition Management disabled

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoWNM: Provide option to disable/enable BTM support in STA
Ankita Bajaj [Thu, 30 May 2019 14:14:55 +0000 (19:44 +0530)] 
WNM: Provide option to disable/enable BTM support in STA

Add support to disable/enable BTM support using configuration and
wpa_cli command. This is useful mainly for testing purposes.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: sigma_dut server certificate validation with UOSC/TOD
Jouni Malinen [Wed, 12 Jun 2019 01:20:15 +0000 (04:20 +0300)] 
tests: sigma_dut server certificate validation with UOSC/TOD

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoOpenSSL: Report peer certificate before stopping due to validation issue
Jouni Malinen [Tue, 11 Jun 2019 22:23:23 +0000 (01:23 +0300)] 
OpenSSL: Report peer certificate before stopping due to validation issue

This is needed to allow upper layer software to learn the hash of the
server certificate for allowing user to override trust root
configuration.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: EAP-TLS server certificate validation and TOD
Jouni Malinen [Tue, 11 Jun 2019 01:40:51 +0000 (04:40 +0300)] 
tests: EAP-TLS server certificate validation and TOD

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoReport TOD policy in peer certificate events
Jouni Malinen [Tue, 11 Jun 2019 01:39:57 +0000 (04:39 +0300)] 
Report TOD policy in peer certificate events

Add tod=1 to CTRL-EVENT-EAP-PEER-CERT events if the peer certificate
includes the TOD policy in the X.509v3 Certificate Policies extension.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoPass full struct to peer certificate callbacks
Jouni Malinen [Tue, 11 Jun 2019 01:20:18 +0000 (04:20 +0300)] 
Pass full struct to peer certificate callbacks

This makes it easier to add new information to the callbacks without
having to modify each callback function type in EAPOL and EAP code every
time.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Add a server certificate with TOD policy
Jouni Malinen [Tue, 11 Jun 2019 00:13:46 +0000 (03:13 +0300)] 
tests: Add a server certificate with TOD policy

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: sigma_dut and DPPConfIndex,8
Jouni Malinen [Mon, 10 Jun 2019 22:04:19 +0000 (01:04 +0300)] 
tests: sigma_dut and DPPConfIndex,8

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agowlantest: Allow duplicate frame processing after decryption failure
Jouni Malinen [Wed, 12 Jun 2019 19:23:30 +0000 (22:23 +0300)] 
wlantest: Allow duplicate frame processing after decryption failure

If a sniffer capture does not include FCS for each frame, but may
included frames with invalid FCS, it would be possible for wlantest to
try to decrypt the first received frame and fail (e.g., due to CCMP MIC
mismatch) because that particular frame was corrupted and then ignore
the following retry of that frame as a duplicate even if that retry has
different payload (e.g., if its reception did not show corruption).

Work around this by skipping duplicate frame detection immediately
following a decryption failure.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoTLS: Be more careful in X.509 Time parsing
Jouni Malinen [Sun, 9 Jun 2019 01:41:15 +0000 (04:41 +0300)] 
TLS: Be more careful in X.509 Time parsing

sscanf() can apparently read beyond the end of the buffer even if the
maximum length of the integer is specified in the format string. Replace
this parsing mechanism with helper functions that use sscanf() with NUL
terminated string to avoid this.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15158
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix CFLAGS passing for new fuzzing tools
Jouni Malinen [Fri, 7 Jun 2019 20:57:02 +0000 (23:57 +0300)] 
tests: Fix CFLAGS passing for new fuzzing tools

src/*/Makefile needs to allow additional CFLAGS values to be provided
from the calling Makefiles so that the clang command line arguments to
enable sanitizers consistently. In addition, it can be useful to be able
to provide CC, CFLAGS, and LDFLAGS from external setup while still
requesing LIBFUZZER=y build. Allow that by not overriding these
variables if they are already set.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix eapol-key-auth memory use for the callback pointer struct
Jouni Malinen [Fri, 7 Jun 2019 20:54:20 +0000 (23:54 +0300)] 
tests: Fix eapol-key-auth memory use for the callback pointer struct

This struct needs to remain valid through the lifetime of the
authenticator state machine, so move it to the context struct instead of
being a local stack variable inside the setup function that returns
before the actual test functionality is executed.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAdd a QCA vendor attr to disable auto resume beacon reporting
Vamsi Krishna [Mon, 27 May 2019 08:52:10 +0000 (14:22 +0530)] 
Add a QCA vendor attr to disable auto resume beacon reporting

The driver automatically starts beacon reporting if it pauses the beacon
reporting for any reason other than disconnection. In specific cases,
userspace may not want the beacon reporting to be automatically resumed
after a pause. Add interface support for userspace to specify driver not
to start beacon reporting automatically after a pause.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoInterworking: Print HESSID in debug messages
Jouni Malinen [Wed, 5 Jun 2019 18:09:57 +0000 (21:09 +0300)] 
Interworking: Print HESSID in debug messages

This makes it easier to understand ANQP queries needed during
Interworking network selection.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Skip mesh_link_probe if kernel support not present
Jouni Malinen [Mon, 3 Jun 2019 17:30:51 +0000 (20:30 +0300)] 
tests: Skip mesh_link_probe if kernel support not present

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: MACsec with hostapd
Jouni Malinen [Mon, 3 Jun 2019 14:49:55 +0000 (17:49 +0300)] 
tests: MACsec with hostapd

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Shorter TX/RX test frame support for hostapd
Jouni Malinen [Mon, 3 Jun 2019 14:48:47 +0000 (17:48 +0300)] 
tests: Shorter TX/RX test frame support for hostapd

wpa_supplicant already included support for this, but hostapd
DATA_TEST_* commands did not yet have support for using a shorter test
frame. This is needed for MACsec testing.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoRADIUS server: Add EAP-Key-Name into Access-Accept
Jouni Malinen [Mon, 3 Jun 2019 14:28:50 +0000 (17:28 +0300)] 
RADIUS server: Add EAP-Key-Name into Access-Accept

If the EAP Session-ID is available, add it into Access-Accept
(EAP-Key-Name attribute). This is needed for MACsec.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agomacsec_linux: Hook QCA driver wrapper for hostapd MACsec
Jouni Malinen [Mon, 3 Jun 2019 13:20:57 +0000 (16:20 +0300)] 
macsec_linux: Hook QCA driver wrapper for hostapd MACsec

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agomacsec: Do not change eapol_version for non-MACsec cases in hostapd
Jouni Malinen [Mon, 3 Jun 2019 17:00:57 +0000 (20:00 +0300)] 
macsec: Do not change eapol_version for non-MACsec cases in hostapd

It is safer to maintain the old EAPOL version (2) in EAPOL frames that
are not related to MACsec and only update the version to 3 for the
MACsec specific cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agomacsec: Support IEEE 802.1X(EAP)/PSK MACsec Key Agreement in hostapd
leiwei [Fri, 24 May 2019 08:53:32 +0000 (16:53 +0800)] 
macsec: Support IEEE 802.1X(EAP)/PSK MACsec Key Agreement in hostapd

Signed-off-by: leiwei <leiwei@codeaurora.org>
4 years agomacsec: Export eapSessionId
leiwei [Fri, 24 May 2019 08:53:32 +0000 (16:53 +0800)] 
macsec: Export eapSessionId

Signed-off-by: leiwei <leiwei@codeaurora.org>
4 years agomacsec: Store EAP-Key-Name as eapSessionId
leiwei [Fri, 24 May 2019 08:53:32 +0000 (16:53 +0800)] 
macsec: Store EAP-Key-Name as eapSessionId

Signed-off-by: leiwei <leiwei@codeaurora.org>
4 years agomacsec: Note that MKA takes care of EAPOL-MKA processing
leiwei [Fri, 24 May 2019 08:53:32 +0000 (16:53 +0800)] 
macsec: Note that MKA takes care of EAPOL-MKA processing

Signed-off-by: leiwei <leiwei@codeaurora.org>
4 years agomacsec_qca: Hook QCA driver wrapper for hostapd MACsec
leiwei [Fri, 24 May 2019 03:24:46 +0000 (11:24 +0800)] 
macsec_qca: Hook QCA driver wrapper for hostapd MACsec

Signed-off-by: leiwei <leiwei@codeaurora.org>
4 years agomacsec: Add configuration parameters for hostapd
leiwei [Fri, 24 May 2019 07:26:46 +0000 (15:26 +0800)] 
macsec: Add configuration parameters for hostapd

Signed-off-by: leiwei <leiwei@codeaurora.org>
4 years agotests: Fix EAP-FAST protocol testing with older OpenSSL library versions
Jouni Malinen [Mon, 3 Jun 2019 17:25:56 +0000 (20:25 +0300)] 
tests: Fix EAP-FAST protocol testing with older OpenSSL library versions

Looks like the previous fix for a newer OpenSSL versions broke
functionality with older versions that did not seem to like @SECLEVEL=0
in the cipher list. Make that addition conditional on OpenSSL version to
work with both versions.

Fixes: e87e6f609bb1 ("tests: Fix EAP-FAST protocol testing with newer OpenSSL and pyOpenSSL")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoHS 2.0 client: Ignore generated/copied files in work directory
Jouni Malinen [Mon, 3 Jun 2019 11:09:33 +0000 (14:09 +0300)] 
HS 2.0 client: Ignore generated/copied files in work directory

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix ap-mgmt 'make clean'
Jouni Malinen [Mon, 3 Jun 2019 10:51:41 +0000 (13:51 +0300)] 
tests: Fix ap-mgmt 'make clean'

The binary name had not been updated for the new tool.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix wpas_ap_async_fail false negative by using common finalizer
Masashi Honma [Thu, 30 May 2019 08:05:55 +0000 (17:05 +0900)] 
tests: Fix wpas_ap_async_fail false negative by using common finalizer

wpas_ap_async_fail fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>