]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
5 years agotests: SAE-PK with different SAE group combinations
Jouni Malinen [Tue, 9 Jun 2020 19:45:57 +0000 (22:45 +0300)] 
tests: SAE-PK with different SAE group combinations

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Remove requirement of SAE group matching SAE-PK (K_AP) group
Jouni Malinen [Tue, 9 Jun 2020 19:32:38 +0000 (22:32 +0300)] 
SAE-PK: Remove requirement of SAE group matching SAE-PK (K_AP) group

This was clarified in the draft specification to not be a mandatory
requirement for the AP and STA to enforce, i.e., matching security level
is a recommendation for AP configuration rather than a protocol
requirement.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWPS UPnP: Support build on OS X
Jouni Malinen [Tue, 9 Jun 2020 09:48:13 +0000 (12:48 +0300)] 
WPS UPnP: Support build on OS X

Define MAC address fetching for OS X (by reusing the existing FreeBSD
implementation) to allow full compile testing of the WPS implementation
on a more BSD-like platform.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWPS UPnP: Fix FreeBSD build
Jouni Malinen [Tue, 9 Jun 2020 09:43:53 +0000 (12:43 +0300)] 
WPS UPnP: Fix FreeBSD build

struct ifreq does not include the ifr_netmask alternative on FreeBSD, so
replace that more specific name with ifr_addr that works with both Linux
and FreeBSD.

Fixes: 5b78c8f961f2 ("WPS UPnP: Do not allow event subscriptions with URLs to other networks")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: wpa_supplicant global pmf parameter
Jouni Malinen [Mon, 8 Jun 2020 21:59:26 +0000 (00:59 +0300)] 
tests: wpa_supplicant global pmf parameter

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Use global pmf=2 for the created network block
Jouni Malinen [Mon, 8 Jun 2020 21:55:13 +0000 (00:55 +0300)] 
HS 2.0: Use global pmf=2 for the created network block

Previously, PMF support was enabled in optional mode (ieee80211w=1) for
Hotspot 2.0 network blocks automatically. This did not consider the
global PMF parameter and unconditionally changed that value to optional.
Since the newly added network block had an explicit ieee80211w
parameter, this overrode the global parameter. To make this less
surprising, use the global pmf parameter value to select whether to add
network blocks for Hotspot 2.0 with PMF being optionally enabled (pmf=0
or pmf=1) or required (pmf=2).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAllow TX queue parameters to be configured for wpa_supplicant AP/P2P GO
Subrat Dash [Sat, 6 Jun 2020 07:50:34 +0000 (13:20 +0530)] 
Allow TX queue parameters to be configured for wpa_supplicant AP/P2P GO

Allow user to configure the TX queue parameters through the
wpa_supplicant configuration file similarly to the way these can be set
in hostapd.

Parse the tx_queue_* parameters in the wpa_supplicant configuration file
and update the TX queue configuration to the AP/P2P GO interface in the
function wpa_supplicant_create_ap().

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoRemove unused enum values
Jouni Malinen [Mon, 8 Jun 2020 21:21:06 +0000 (00:21 +0300)] 
Remove unused enum values

The last user of these was removed in commit 17fbb751e174 ("Remove user
space client MLME") and there is no need to maintain these unused values
anymore.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoMove local TX queue parameter parser into a common file
Subrat Dash [Thu, 21 May 2020 05:03:39 +0000 (10:33 +0530)] 
Move local TX queue parameter parser into a common file

This allows the same implementation to be used for wpa_supplicant as
well.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: OWE transition mode BSSID mismatches
Jouni Malinen [Mon, 8 Jun 2020 18:43:41 +0000 (21:43 +0300)] 
tests: OWE transition mode BSSID mismatches

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDo not try to connect with zero-length SSID
Jouni Malinen [Mon, 8 Jun 2020 18:40:56 +0000 (21:40 +0300)] 
Do not try to connect with zero-length SSID

It was possible to find a BSS to local network profile match for a BSS
entry that has no known SSID when going through some of the SSID
wildcard cases. At leas the OWE transition mode case without BSSID match
could result in hitting this. Zero-length SSID (i.e., wildcard SSID) is
not valid in (Re)Association Request frame, so such an association will
fail. Skip such a BSS to avoid known-to-be-failing association attempts.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut controlled AP using SAE-PK misbehavior
Jouni Malinen [Mon, 8 Jun 2020 16:17:53 +0000 (19:17 +0300)] 
tests: sigma_dut controlled AP using SAE-PK misbehavior

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Make SAE-PK test cases more robust
Jouni Malinen [Mon, 8 Jun 2020 14:48:57 +0000 (17:48 +0300)] 
tests: Make SAE-PK test cases more robust

Clear scan results explicitly in test cases that check BSS entry flags
to avoid incorrect failures based on results from earlier test cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWPS UPnP: Handle HTTP initiation failures for events more properly
Jouni Malinen [Thu, 4 Jun 2020 18:24:04 +0000 (21:24 +0300)] 
WPS UPnP: Handle HTTP initiation failures for events more properly

While it is appropriate to try to retransmit the event to another
callback URL on a failure to initiate the HTTP client connection, there
is no point in trying the exact same operation multiple times in a row.
Replve the event_retry() calls with event_addr_failure() for these cases
to avoid busy loops trying to repeat the same failing operation.

These potential busy loops would go through eloop callbacks, so the
process is not completely stuck on handling them, but unnecessary CPU
would be used to process the continues retries that will keep failing
for the same reason.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWPS UPnP: Fix event message generation using a long URL path
Jouni Malinen [Wed, 3 Jun 2020 19:41:02 +0000 (22:41 +0300)] 
WPS UPnP: Fix event message generation using a long URL path

More than about 700 character URL ended up overflowing the wpabuf used
for building the event notification and this resulted in the wpabuf
buffer overflow checks terminating the hostapd process. Fix this by
allocating the buffer to be large enough to contain the full URL path.
However, since that around 700 character limit has been the practical
limit for more than ten years, start explicitly enforcing that as the
limit or the callback URLs since any longer ones had not worked before
and there is no need to enable them now either.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWPS UPnP: Do not allow event subscriptions with URLs to other networks
Jouni Malinen [Wed, 3 Jun 2020 20:17:35 +0000 (23:17 +0300)] 
WPS UPnP: Do not allow event subscriptions with URLs to other networks

The UPnP Device Architecture 2.0 specification errata ("UDA errata
16-04-2020.docx") addresses a problem with notifications being allowed
to go out to other domains by disallowing such cases. Do such filtering
for the notification callback URLs to avoid undesired connections to
external networks based on subscriptions that any device in the local
network could request when WPS support for external registrars is
enabled (the upnp_iface parameter in hostapd configuration).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Fix FILS Public Key element Key Type for ECDSA
Jouni Malinen [Mon, 8 Jun 2020 11:59:49 +0000 (14:59 +0300)] 
SAE-PK: Fix FILS Public Key element Key Type for ECDSA

Use value 2 to point to RFC 5480 which describes the explicit
indicatiotion of the public key being in compressed form.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Check minimum password length more accurate
Jouni Malinen [Mon, 8 Jun 2020 11:49:31 +0000 (14:49 +0300)] 
SAE-PK: Check minimum password length more accurate

Get the Sec value from the password to check the minimum length based on
the used Sec.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Remove too short SAE-PK passwords
Jouni Malinen [Mon, 8 Jun 2020 14:09:56 +0000 (17:09 +0300)] 
tests: Remove too short SAE-PK passwords

This is in preparation of implementation changes to check SAE-PK
password length more accurately based on the Sec value.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SAE-PK AP misbehavior
Jouni Malinen [Mon, 8 Jun 2020 11:13:14 +0000 (14:13 +0300)] 
tests: SAE-PK AP misbehavior

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Testing functionality to allow behavior overrides
Jouni Malinen [Mon, 8 Jun 2020 11:00:28 +0000 (14:00 +0300)] 
SAE-PK: Testing functionality to allow behavior overrides

The new sae_commit_status and sae_pk_omit configuration parameters and
an extra key at the end of sae_password pk argument can be used to
override SAE-PK behavior for testing purposes.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut controlled AP and transition disabled indication change
Jouni Malinen [Sun, 7 Jun 2020 14:07:57 +0000 (17:07 +0300)] 
tests: sigma_dut controlled AP and transition disabled indication change

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAllow transition_disable updates during the lifetime of a BSS
Jouni Malinen [Sun, 7 Jun 2020 14:06:52 +0000 (17:06 +0300)] 
Allow transition_disable updates during the lifetime of a BSS

This is mainly for testing purposes to allow more convenient checking of
station behavior when a transition mode is disabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SAE-PK mixed deployment
Jouni Malinen [Sun, 7 Jun 2020 13:50:09 +0000 (16:50 +0300)] 
tests: SAE-PK mixed deployment

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Select SAE-PK network over SAE without PK
Jouni Malinen [Sun, 7 Jun 2020 13:49:07 +0000 (16:49 +0300)] 
SAE-PK: Select SAE-PK network over SAE without PK

If there is an acceptable BSS with SAE-PK enabled in the same ESS,
select that over a BSS that does not enable SAE-PK when the network
profile uses automatic SAE-PK selection.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoClean up wpa_scan_res_match()
Jouni Malinen [Sun, 7 Jun 2020 13:30:32 +0000 (16:30 +0300)] 
Clean up wpa_scan_res_match()

Move the BSS-against-SSID matching into a separate helper function to
make this overly long function a bit more readable and to allow that
helper function to be used for other purposes.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SAE-PK password, but no PK on AP
Jouni Malinen [Sun, 7 Jun 2020 09:04:14 +0000 (12:04 +0300)] 
tests: SAE-PK password, but no PK on AP

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Share a single definition of SAE-PK Sec=2 values
Jouni Malinen [Sun, 7 Jun 2020 09:01:52 +0000 (12:01 +0300)] 
tests: Share a single definition of SAE-PK Sec=2 values

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Replace sae_pk_only with sae_pk to match implementation
Jouni Malinen [Sun, 7 Jun 2020 08:53:00 +0000 (11:53 +0300)] 
tests: Replace sae_pk_only with sae_pk to match implementation

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Allow automatic SAE-PK to be disabled
Jouni Malinen [Sun, 7 Jun 2020 08:53:26 +0000 (11:53 +0300)] 
SAE-PK: Allow automatic SAE-PK to be disabled

This replaces the previously used sae_pk_only configuration parameter
with a more generic sae_pk that can be used to specify how SAE-PK is
negotiated. The default behavior (sae_pk=0) is to automatically
negotiate SAE-PK whenever the AP supports it and the password is in
appropriate format. sae_pk=1 allows only SAE-PK to be used and sae_pk=2
disables SAE-PK completely.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agowpa_cli: Add all_bss command to print all scan results (BSS entries)
Purushottam Kushwaha [Thu, 28 May 2020 06:37:37 +0000 (12:07 +0530)] 
wpa_cli: Add all_bss command to print all scan results (BSS entries)

The wpa_supplicant control interface returns maximum of 4 kB of response
data and, thus, limits maximum number of scan entries as part of
SCAN_RESULTS to approximately 60. Add a new all_bss command to use a
more robust iteration of the BSS table entries with the BSS command to
to get all scan entries and print them in the same format as the
scan_results command.

Signed-off-by: Purushottam Kushwaha <pkushwah@codeaurora.org>
5 years agotests: PMKSA cache control interface for external management (FT)
Jouni Malinen [Sat, 6 Jun 2020 13:46:03 +0000 (16:46 +0300)] 
tests: PMKSA cache control interface for external management (FT)

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFT: Do not add PMKID to the driver for FT-EAP if caching is disabled
Jouni Malinen [Sat, 6 Jun 2020 13:46:32 +0000 (16:46 +0300)] 
FT: Do not add PMKID to the driver for FT-EAP if caching is disabled

wpa_supplicant disables PMKSA caching with FT-EAP by default due to
known interoperability issues with APs. This is allowed only if the
network profile is explicitly enabling caching with
ft_eap_pmksa_caching=1. However, the PMKID for such PMKSA cache entries
was still being configured to the driver and it was possible for the
driver to build an RSNE with the PMKID for SME-in-driver cases. This
could result in hitting the interop issue with some APs.

Fix this by skipping PMKID configuration to the driver fot FT-EAP AKM if
ft_eap_pmksa_caching=1 is not used in the network profile so that the
driver and wpa_supplicant behavior are in sync for this.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoQCA vendor attribute for dynamic bandwidth adjustment
Min Liu [Fri, 5 Jun 2020 04:15:24 +0000 (12:15 +0800)] 
QCA vendor attribute for dynamic bandwidth adjustment

Define QCA vendor attribute in SET(GET)_WIFI_CONFIGURATION to
dynamically configure capabilities for dynamic bandwidth adjustment.

Signed-off-by: Min Liu <minliu@codeaurora.org>
5 years agoQCA vendor attributes for setting channel width
Min Liu [Fri, 5 Jun 2020 03:55:26 +0000 (11:55 +0800)] 
QCA vendor attributes for setting channel width

Define QCA vendor attribute in SET(GET)_WIFI_CONFIGURATION to
dynamically configure capabilities for channel width.

Signed-off-by: Min Liu <minliu@codeaurora.org>
5 years agoAdd support for indicating missing driver AKM capability flags
Tanmay Garg [Mon, 18 May 2020 10:22:44 +0000 (15:52 +0530)] 
Add support for indicating missing driver AKM capability flags

Add support for missing driver AKM capability flags from the list of
RSN_AUTH_KEY_MGMT_* flags and make these available through the
'GET_CAPABILITY key_mgmt' control interface command.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAdd vendor attributes to configure testing functionality for FT/OCV/SAE
Veerendranath Jakkam [Fri, 22 May 2020 09:17:34 +0000 (14:47 +0530)] 
Add vendor attributes to configure testing functionality for FT/OCV/SAE

Add new QCA vendor attributes to configure RSNXE Used (FTE), ignore CSA,
and OCI frequency override with QCA vendor command
QCA_NL80211_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION for STA testbed role.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFix a typo vendor attribute documentation
Min Liu [Fri, 5 Jun 2020 03:11:51 +0000 (11:11 +0800)] 
Fix a typo vendor attribute documentation

Fix a typo in comment of enum qca_wlan_tspec_ack_policy.

Signed-off-by: Min Liu <minliu@codeaurora.org>
5 years agoQCA vendor attribute to configure NSS
Sunil Dutt [Wed, 27 May 2020 11:25:49 +0000 (16:55 +0530)] 
QCA vendor attribute to configure NSS

Defines the attribute in SET(GET)_WIFI_CONFIGURATION to dynamically
configure NSS.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SAE-PK transition disable indication
Jouni Malinen [Sat, 6 Jun 2020 09:18:55 +0000 (12:18 +0300)] 
tests: SAE-PK transition disable indication

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Transition mode disabled indication processing
Jouni Malinen [Sat, 6 Jun 2020 09:06:59 +0000 (12:06 +0300)] 
SAE-PK: Transition mode disabled indication processing

Allow AP to disable transition mode for SAE-PK (i.e., prevent SAE
authentication without SAE-PK).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Verify SAE-PK use more explicitly
Jouni Malinen [Sat, 6 Jun 2020 09:10:41 +0000 (12:10 +0300)] 
tests: Verify SAE-PK use more explicitly

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Add sae_h2e and sae_pk to wpa_supplicant STATUS command
Jouni Malinen [Sat, 6 Jun 2020 09:09:47 +0000 (12:09 +0300)] 
SAE: Add sae_h2e and sae_pk to wpa_supplicant STATUS command

This provides additional information on which options were used during
SAE authentication.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Move H2E and PK flags to main sae_data
Jouni Malinen [Sat, 6 Jun 2020 09:08:37 +0000 (12:08 +0300)] 
SAE: Move H2E and PK flags to main sae_data

This maintains knowledge of whether H2E or PK was used as part of the
SAE authentication beyond the removal of temporary state needed during
that authentication. This makes it easier to use information about which
kind of SAE authentication was used at higher layer functionality.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDocument more network profile parameters
Jouni Malinen [Sat, 6 Jun 2020 08:47:12 +0000 (11:47 +0300)] 
Document more network profile parameters

Some of the recently added wpa_supplicant network profile parameters
were not documented in wpa_supplicant.conf. Add these there based on the
documentation in config_ssid.h.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SAE-PK only
Jouni Malinen [Sat, 6 Jun 2020 08:17:03 +0000 (11:17 +0300)] 
tests: SAE-PK only

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Allow SAE authentication without PK to be disabled
Jouni Malinen [Sat, 6 Jun 2020 08:42:59 +0000 (11:42 +0300)] 
SAE-PK: Allow SAE authentication without PK to be disabled

The new wpa_supplicant network profile parameter sae_pk_only=1 can now
be used to disable use of SAE authentication without SAE-PK.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Report unknown WpaSupplicant::connect() arguments
Jouni Malinen [Sat, 6 Jun 2020 08:25:40 +0000 (11:25 +0300)] 
tests: Report unknown WpaSupplicant::connect() arguments

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut and SAE-PK
Jouni Malinen [Fri, 5 Jun 2020 13:58:25 +0000 (16:58 +0300)] 
tests: sigma_dut and SAE-PK

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut controlled GTK rekeying
Jouni Malinen [Fri, 5 Jun 2020 12:35:44 +0000 (15:35 +0300)] 
tests: sigma_dut controlled GTK rekeying

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Fix sigma_dut ap_get_mac_address result parsing
Jouni Malinen [Fri, 5 Jun 2020 10:41:59 +0000 (13:41 +0300)] 
tests: Fix sigma_dut ap_get_mac_address result parsing

Get only the actual BSSID part from the response string.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut controlled AP using OCV
Jouni Malinen [Fri, 5 Jun 2020 10:39:41 +0000 (13:39 +0300)] 
tests: sigma_dut controlled AP using OCV

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWPS UPnP: Do not update Beacon frames unnecessarily on subscription removal
Jouni Malinen [Thu, 4 Jun 2020 18:04:59 +0000 (21:04 +0300)] 
WPS UPnP: Do not update Beacon frames unnecessarily on subscription removal

There is no need to update the WPS IE in Beacon frames when a
subscription is removed if that subscription is not for an actual
selected registrar. For example, this gets rids of unnecessary driver
operations when a subscription request gets rejected when parsing the
callback URLs.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Increment the minimum password length to 9
Jouni Malinen [Wed, 3 Jun 2020 22:36:50 +0000 (01:36 +0300)] 
SAE-PK: Increment the minimum password length to 9

While this is not explicitly defined as the limit, lambda=8 (i.e., 9
characters with the added hyphen) is needed with Sec=5 to reach the
minimum required resistance to preimage attacks, so use this as an
implicit definition of the password length constraint.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Skip too short SAE-PK passwords in positive testing
Jouni Malinen [Wed, 3 Jun 2020 22:41:50 +0000 (01:41 +0300)] 
tests: Skip too short SAE-PK passwords in positive testing

Lambda >= 12 is needed with Sec = 2, so drop the shorter password
lengths in the sae_pk and module_wpa_supplicant test cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Determine hash algorithm from K_AP group instead of SAE group
Jouni Malinen [Wed, 3 Jun 2020 14:30:36 +0000 (17:30 +0300)] 
SAE-PK: Determine hash algorithm from K_AP group instead of SAE group

While the current implementation forces these groups to be same, that is
not strictly speaking necessary and the correct group to use here is
K_AP, not the SAE authentication group.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Fix eapol-supp fuzzing tool build
Jouni Malinen [Tue, 2 Jun 2020 20:35:17 +0000 (23:35 +0300)] 
tests: Fix eapol-supp fuzzing tool build

Boolean handling was changed to use "true" instead of "TRUE", but this
location was missed.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SAE-PK
Jouni Malinen [Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)] 
tests: SAE-PK

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: A tool for generating SAE-PK Modifier and password
Jouni Malinen [Tue, 2 Jun 2020 19:44:42 +0000 (22:44 +0300)] 
SAE-PK: A tool for generating SAE-PK Modifier and password

sae_pk_gen can be used to generate Modifier (M) and password for SAE-PK
based on a previously generated EC private key, Sec value (2..5), and
SSID.

For example, these commands can be used to generate the private key and
the needed hostapd configuration parameter options:

make sae_pk_gen
openssl ecparam -genkey -outform DER -out saepk.der -name prime256v1
./sae_pk_gen saepk.der 3 "SAE-PK test"

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoShow SAE capabilities in control interface
Jouni Malinen [Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)] 
Show SAE capabilities in control interface

Indicate local support for SAE H2E and SAE-PK.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoShow SAE flags in scan results
Jouni Malinen [Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)] 
Show SAE flags in scan results

Indicate AP support for SAE H2E and SAE-PK in scan results.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: STA functionality
Jouni Malinen [Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)] 
SAE-PK: STA functionality

This adds STA side functionality for SAE-PK. This version enables SAE-PK
automatically based on the configured SAE password value if the selected
AP advertises support for SAE-PK.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: AP functionality
Jouni Malinen [Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)] 
SAE-PK: AP functionality

This adds AP side functionality for SAE-PK. The new sae_password
configuration parameters can now be used to enable SAE-PK mode whenever
SAE is enabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Module test for SAE-PK
Jouni Malinen [Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)] 
tests: Module test for SAE-PK

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Extend SAE functionality for AP validation
Jouni Malinen [Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)] 
SAE-PK: Extend SAE functionality for AP validation

This adds core SAE functionality for a new mode of using SAE with a
specially constructed password that contains a fingerprint for an AP
public key and that public key being used to validate an additional
signature in SAE confirm from the AP.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE-PK: Identifier definitions
Jouni Malinen [Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)] 
SAE-PK: Identifier definitions

Add the assigned identifiers for SAE-PK elements and fields.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOpenSSL: Additional EC functionality for SAE-PK
Jouni Malinen [Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)] 
OpenSSL: Additional EC functionality for SAE-PK

These will be needed for implementing SAE-PK ECDSA signing and signature
verification operations.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agowpaspy: Be a bit more careful on detaching the control interface
Jouni Malinen [Mon, 1 Jun 2020 19:24:00 +0000 (22:24 +0300)] 
wpaspy: Be a bit more careful on detaching the control interface

Check that the client socket is still open before trying to detach the
control interface to avoid undesired exceptions on cleanup paths on
unexpected errors due to the socket getting closed.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: OCV channel mismatch validation by STA
Jouni Malinen [Fri, 29 May 2020 21:29:56 +0000 (00:29 +0300)] 
tests: OCV channel mismatch validation by STA

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOCV: Report OCI validation failures with OCV-FAILURE messages (STA)
Jouni Malinen [Fri, 29 May 2020 21:24:15 +0000 (00:24 +0300)] 
OCV: Report OCI validation failures with OCV-FAILURE messages (STA)

Convert the previously used text log entries to use the more formal
OCV-FAILURE prefix and always send these as control interface events to
allow upper layers to get information about unexpected operating channel
mismatches.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOCV: Allow OCI channel to be overridden for testing (AP)
Jouni Malinen [Fri, 29 May 2020 21:04:53 +0000 (00:04 +0300)] 
OCV: Allow OCI channel to be overridden for testing (AP)

Add hostapd configuration parameters oci_freq_override_* to allow the
OCI channel information to be overridden for various frames for testing
purposes. This can be set in the configuration and also updated during
the runtime of a BSS.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP2: Derive a separate key for enveloped data
Jouni Malinen [Fri, 29 May 2020 18:42:33 +0000 (21:42 +0300)] 
DPP2: Derive a separate key for enveloped data

Derive a new key from bk to be used as the password for PBKDF2 instead
of using ke for this.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Fix a typo in a comment
Jouni Malinen [Fri, 29 May 2020 18:35:26 +0000 (21:35 +0300)] 
DPP: Fix a typo in a comment

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOSEN: Do not send the actual BIGTK to OSEN STAs
Jouni Malinen [Fri, 29 May 2020 18:07:45 +0000 (21:07 +0300)] 
OSEN: Do not send the actual BIGTK to OSEN STAs

OSEN STAs are not authenticated, so do not send the actual BIGTK for
them so that they cannot generate forged protected Beacon frames. This
means that OSEN STAs cannot enable beacon protection.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFT: Do not expose GTK/IGTK in FT Reassociation Response frame in OSEN
Jouni Malinen [Fri, 29 May 2020 18:23:09 +0000 (21:23 +0300)] 
FT: Do not expose GTK/IGTK in FT Reassociation Response frame in OSEN

Do not include the actual GTK/IGTK value in FT protocol cases in OSEN or
with DGAF disabled (Hotspot 2.0). This was already the case for the
EAPOL-Key cases of providing GTK/IGTK, but the FT protocol case was
missed. OSEN cannot really use FT, so that part is not impacted, but it
would be possible to enable FT in a Hotspot 2.0 network that has DGAF
disabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWNM: Do not expose GTK/IGTK in WNM Sleep Mode Response frame in OSEN
Jouni Malinen [Fri, 29 May 2020 18:04:40 +0000 (21:04 +0300)] 
WNM: Do not expose GTK/IGTK in WNM Sleep Mode Response frame in OSEN

Do not include the actual GTK/IGTK value in WNM Sleep Mode Response
frame if WNM Sleep Mode is used in OSEN or in a network where use of GTK
is disabled. This was already the case for the EAPOL-Key cases of
providing GTK/IGTK, but the WNM Sleep Mode exit case was missed.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: HS 2.0 deauthentication request PMF misbehavior (+HTC)
Jouni Malinen [Fri, 29 May 2020 17:55:18 +0000 (20:55 +0300)] 
tests: HS 2.0 deauthentication request PMF misbehavior (+HTC)

Verify driver/mac80211 behavior with HT Control field in Public Action
frames.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: OWE transition mode with owe_transition_ifname
Jouni Malinen [Tue, 26 May 2020 13:15:45 +0000 (16:15 +0300)] 
tests: OWE transition mode with owe_transition_ifname

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOWE: Skip beacon update of transition BSS if it is not yet enabled
Hu Wang [Fri, 15 May 2020 06:20:32 +0000 (14:20 +0800)] 
OWE: Skip beacon update of transition BSS if it is not yet enabled

When a single hostapd process manages both the OWE and open BSS for
transition mode, owe_transition_ifname can be used to clone the
transition mode information (i.e., BSSID/SSID) automatically. When both
BSSs use ACS, the completion of ACS on the 1st BSS sets state to
HAPD_IFACE_ENABLED and the OWE transition mode information is updated
for all the other BSSs. However, the 2nd BSS is still in the ACS phase
and the beacon update messes up the state for AP startup and prevents
proper ACS competion.

If 2nd BSS is not yet enabled (e.g., in ACS), skip beacon update and
defer OWE transition information cloning until the BSS is enabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Enforce proper OCV behavior for SA Query Response from STA
Jouni Malinen [Tue, 26 May 2020 09:31:16 +0000 (12:31 +0300)] 
tests: Enforce proper OCV behavior for SA Query Response from STA

Now that there is a pending mac80211 patch ("mac80211: allow SA-QUERY
processing in userspace") to allow wpa_supplicant to take care of SA
Query Request processing, start enforcing correct behavior for this in
ocv_sa_query and wpa2_ocv_sta_override_sa_query_resp.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAdd a vendor attribute to get OEM data
Sachin Ahuja [Mon, 18 May 2020 14:30:18 +0000 (20:00 +0530)] 
Add a vendor attribute to get OEM data

Add an attribute QCA_WLAN_VENDOR_ATTR_OEM_DATA_RESPONSE_EXPECTED
to get the response for the queried data.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoVendor attributes for configuring LDPC, TX STBC, RX STBC
Sunil Dutt [Wed, 6 May 2020 19:46:35 +0000 (01:16 +0530)] 
Vendor attributes for configuring LDPC, TX STBC, RX STBC

Defines the attributes in SET(GET)_WIFI_CONFIGURATION to dynamically
configure capabilities: LDPC, TX STBC, RX STBC.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut controlled STA using OCV
Jouni Malinen [Mon, 25 May 2020 20:24:55 +0000 (23:24 +0300)] 
tests: sigma_dut controlled STA using OCV

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: OCV and post-CSA SA Query error cases
Jouni Malinen [Mon, 25 May 2020 18:54:49 +0000 (21:54 +0300)] 
tests: OCV and post-CSA SA Query error cases

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOCV: Disconnect STAs that do not use SA Query after CSA
Jouni Malinen [Mon, 25 May 2020 18:55:49 +0000 (21:55 +0300)] 
OCV: Disconnect STAs that do not use SA Query after CSA

Verify that all associated STAs that claim support for OCV initiate an
SA Query after CSA. If no SA Query is seen within 15 seconds,
deauthenticate the STA.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOCV: Report validation errors for (Re)Association Request frames
Jouni Malinen [Mon, 25 May 2020 17:46:32 +0000 (20:46 +0300)] 
OCV: Report validation errors for (Re)Association Request frames

Add the OCV-FAILURE control interface event to notify upper layers of
OCV validation issues in FT and FILS (Re)Association Request frames.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: OCV with OCI override on STA
Jouni Malinen [Mon, 25 May 2020 15:32:32 +0000 (18:32 +0300)] 
tests: OCV with OCI override on STA

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOCV: Report validation errors for EAPOL-Key messages in AP mode
Jouni Malinen [Mon, 25 May 2020 16:08:16 +0000 (19:08 +0300)] 
OCV: Report validation errors for EAPOL-Key messages in AP mode

Add the OCV-FAILURE control interface event to notify upper layers of
OCV validation issues in EAPOL-Key msg 2/4 and group 2/2.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOCV: Report validation errors for SA Query Request/Response in AP mode
Jouni Malinen [Mon, 25 May 2020 15:41:04 +0000 (18:41 +0300)] 
OCV: Report validation errors for SA Query Request/Response in AP mode

Add a new OCV-FAILURE control interface event to notify upper layers of
OCV validation issues. This commit adds this for SA Query processing in
AP mode.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOCV: Move "OCV failed" prefix to callers
Jouni Malinen [Mon, 25 May 2020 15:33:00 +0000 (18:33 +0300)] 
OCV: Move "OCV failed" prefix to callers

Make reporting of OCV validation failure reasons more flexible by
removing the fixed prefix from ocv_verify_tx_params() output in
ocv_errorstr so that the caller can use whatever prefix or encapsulation
that is most appropriate for each case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOCV: Add support to override channel info OCI element (STA)
Vamsi Krishna [Fri, 8 May 2020 17:59:04 +0000 (23:29 +0530)] 
OCV: Add support to override channel info OCI element (STA)

To support the STA testbed role, the STA has to use specified channel
information in OCI element sent to the AP in EAPOL-Key msg 2/4, SA Query
Request, and SA Query Response frames. Add override parameters to use
the specified channel while populating OCI element in all these frames.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoClear current PMKSA cache selection on association/roam
Jouni Malinen [Mon, 25 May 2020 13:25:50 +0000 (16:25 +0300)] 
Clear current PMKSA cache selection on association/roam

It was possible for the RSN state machine to maintain old PMKSA cache
selection (sm->cur_pmksa) when roaming to another BSS based on
driver-based roaming indication. This could result in mismatching state
and unexpected behavior, e.g., with not generating a Suite B PMKSA cache
entry.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Suite B using PMKSA caching and roaming
Jouni Malinen [Mon, 25 May 2020 13:20:33 +0000 (16:20 +0300)] 
tests: Suite B using PMKSA caching and roaming

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agowlantest: Fix RSNE check in FT 4-way handshake msg 3/4
Jouni Malinen [Mon, 25 May 2020 10:42:08 +0000 (13:42 +0300)] 
wlantest: Fix RSNE check in FT 4-way handshake msg 3/4

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agowlantest: Validate FT elements in Reassociation Response frame
Jouni Malinen [Sat, 23 May 2020 21:35:13 +0000 (00:35 +0300)] 
wlantest: Validate FT elements in Reassociation Response frame

Verify that RSNE, MDE, and FTE have valid information in FT
Reassociation Response frames. In addition, decrypt GTK, IGTK, and BIGTK
from the frame.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agowlantest: Validate FT elements in Reassociation Request frame
Jouni Malinen [Sat, 23 May 2020 18:44:16 +0000 (21:44 +0300)] 
wlantest: Validate FT elements in Reassociation Request frame

Verify that RSNE, MDE, and FTE have valid information in FT
Reassociation Request frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agowlantest: Store PMK-R1 in STA entry
Jouni Malinen [Sat, 23 May 2020 18:43:36 +0000 (21:43 +0300)] 
wlantest: Store PMK-R1 in STA entry

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoDebug print PMK-R0/R1 and PMKR0/R1Name in the helper functions
Jouni Malinen [Sat, 23 May 2020 18:42:45 +0000 (21:42 +0300)] 
Debug print PMK-R0/R1 and PMKR0/R1Name in the helper functions

There is no need to have all callers debug print these separately.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agowlantest: Store PMK-R0 length explicitly
Jouni Malinen [Sat, 23 May 2020 18:24:01 +0000 (21:24 +0300)] 
wlantest: Store PMK-R0 length explicitly

PMK-R0 is not of fixed length, so store its length explicitly.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agowlantest: Handle FT over-the-DS association state update cleanly
Jouni Malinen [Sat, 23 May 2020 18:11:33 +0000 (21:11 +0300)] 
wlantest: Handle FT over-the-DS association state update cleanly

It is expected for the STA entry on the target AP to move directly from
State 1 to State 3 when performing FT over-the-DS (i.e., FT Action
Request/Response frame exchange through the old AP followed by
Reassociation Request/Response frame exchange with the target AP).

Signed-off-by: Jouni Malinen <j@w1.fi>