]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
5 years agoFT-SAE: Add RSNXE into FT MIC
Jouni Malinen [Fri, 18 Oct 2019 13:20:27 +0000 (16:20 +0300)] 
FT-SAE: Add RSNXE into FT MIC

Protect RSNXE, if present, in FT Reassociation Request/Response frames.
This is needed for SAE H2E with FT.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAdd RSNXE into (Re)Association Response frames
Jouni Malinen [Fri, 18 Oct 2019 12:49:32 +0000 (15:49 +0300)] 
Add RSNXE into (Re)Association Response frames

Add the new RSNXE into (Re)Association Response frames if any of the
capability bits is nonzero.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: WPA2-PSK-FT-SAE AP (H2E)
Jouni Malinen [Fri, 18 Oct 2019 12:33:14 +0000 (15:33 +0300)] 
tests: WPA2-PSK-FT-SAE AP (H2E)

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoMerge wpa_supplicant and hostapd EAPOL-Key KDE parsers
Jouni Malinen [Fri, 18 Oct 2019 10:02:27 +0000 (13:02 +0300)] 
Merge wpa_supplicant and hostapd EAPOL-Key KDE parsers

Use a single struct definition and a single shared implementation for
parsing EAPOL-Key KDEs and IEs instead of maintaining more or less
identical functionality separately for wpa_supplicant and hostapd.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Verify that STA negotiated H2E if it claims to support it
Jouni Malinen [Fri, 18 Oct 2019 09:38:11 +0000 (12:38 +0300)] 
SAE: Verify that STA negotiated H2E if it claims to support it

If a STA indicates support for SAE H2E in RSNXE and H2E is enabled in
the AP configuration, require H2E to be used.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoRSN: Verify RSNXE match between (Re)AssocReq and EAPOL-Key msg 2/4
Jouni Malinen [Thu, 17 Oct 2019 21:17:51 +0000 (00:17 +0300)] 
RSN: Verify RSNXE match between (Re)AssocReq and EAPOL-Key msg 2/4

If the STA advertises RSN Extension element, it has to be advertised
consistently in the unprotected ((Re)Association Request) and protected
(EAPOL-Key msg 2/4) frames. Verify that this is the case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAdd RSNXE into AP KDE parser
Jouni Malinen [Thu, 17 Oct 2019 21:13:32 +0000 (00:13 +0300)] 
Add RSNXE into AP KDE parser

This is needed for SAE hash-to-element implementation.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoStore a copy of Association Request RSNXE in AP mode for later use
Jouni Malinen [Thu, 17 Oct 2019 21:11:24 +0000 (00:11 +0300)] 
Store a copy of Association Request RSNXE in AP mode for later use

This is needed to be able to compare the received RSNXE to a protected
version in EAPOL-Key msg 2/4.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Add RSNXE in Association Request and EAPOL-Key msg 2/4
Jouni Malinen [Thu, 17 Oct 2019 13:54:05 +0000 (16:54 +0300)] 
SAE: Add RSNXE in Association Request and EAPOL-Key msg 2/4

Add the new RSNXE into (Re)Association Request frames and EAPOL-Key msg
2/4 when using SAE with hash-to-element mechanism enabled. This allows
the AP to verify that there was no downgrade attack when both PWE
derivation mechanisms are enabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAdd RSNXE into IE parser
Jouni Malinen [Thu, 17 Oct 2019 13:53:09 +0000 (16:53 +0300)] 
Add RSNXE into IE parser

This is needed for SAE hash-to-element implementation.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWPS: Check SHA256 result success
Jouni Malinen [Tue, 15 Oct 2019 12:34:41 +0000 (15:34 +0300)] 
WPS: Check SHA256 result success

These functions can fail in theory, so verify they succeeded before
comparing the hash values.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoQCA vendor command for adding a STA node
Shiva Sankar Gajula [Tue, 8 Oct 2019 00:57:59 +0000 (06:27 +0530)] 
QCA vendor command for adding a STA node

Add a QCA vendor subcommand QCA_NL80211_VENDOR_SUBCMD_ADD_STA_NODE with
attributes qca_wlan_vendor_attr_add_sta_node_params to add STA peer
entries in AP mode. This vendor sub command is used in FT roaming
scenario to send STA node information from application/service to
driver/firmware. The attributes defined in enum
qca_wlan_vendor_attr_add_sta_node_params are used to deliver the
parameters.

Signed-off-by: Shiva Sankar Gajula <sgajula@codeaurora.org>
5 years agoAdd a new QCA vendor attribute to carry device info for OEM data
Subrat Dash [Thu, 3 Oct 2019 16:12:46 +0000 (21:42 +0530)] 
Add a new QCA vendor attribute to carry device info for OEM data

The OEM data binary blobs from application/service will be routed to the
appropriate device based on this attribute value. This optional
attribute is used to specify whether the device type is virtual or
physical. This attribute can be omitted when the command is for a
virtual device.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoQCA vendor attributes to indicate BW-based agile spectral capability
Edayilliam Jayadev [Thu, 19 Sep 2019 09:15:44 +0000 (14:45 +0530)] 
QCA vendor attributes to indicate BW-based agile spectral capability

Some chipsets don't have the capability to run agile spectral scan with
160/80+80 MHz modes. Add separate agile spectral scanning capability
flags for 160, 80+80, and non-160 MHz modes to cover such cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agonl80211: Allow external auth based on SAE/FT-SAE key mgmt
Sunil Dutt [Mon, 8 Jul 2019 14:12:12 +0000 (19:42 +0530)] 
nl80211: Allow external auth based on SAE/FT-SAE key mgmt

In the SME-in-driver case, wpa_supplicant used only the selected SAE
auth_alg value as the trigger for enabling external authentication
support for SAE. This prevented the driver from falling back to full SAE
authentication if PMKSA caching was attempted (Open auth_alg selected)
and the cached PMKID had been dropped.

Enable external auth based on SAE/FT-SAE key_mgmt, rather than doing
this based on SAE auth_alg, so that the driver can go through full SAE
authentication in cases where PMKSA caching is attempted and it fails.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFST: Update FST about MAC address change
Dedy Lansky [Tue, 10 Sep 2019 09:53:55 +0000 (12:53 +0300)] 
FST: Update FST about MAC address change

Notify FST module upon MAC address change. FST module will update the
Multiband IE accordingly.

Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
5 years agoAP: Publish only HE capabilities and operation IEs on 6 GHz band
Andrei Otcheretianski [Wed, 19 Jun 2019 12:49:13 +0000 (15:49 +0300)] 
AP: Publish only HE capabilities and operation IEs on 6 GHz band

When operating on the 6 GHz band, add 6 GHz Operation Information inside
the HE Operation element and don't publish HT/VHT IEs.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
- Replace HOSTAPD_MODE_IEEE80211AX mode checks with is_6ghz_op_class()

Signed-off-by: Vamsi Krishna <vamsin@codeaurora.org>
5 years agoAP: Add initial support for 6 GHz band
Andrei Otcheretianski [Wed, 19 Jun 2019 12:49:11 +0000 (15:49 +0300)] 
AP: Add initial support for 6 GHz band

Add support for new hardware mode for 6 GHz band. 6 GHz operation is
defined in IEEE P802.11ax/D4.3. 6 GHz band adds global operating classes
131-135 that define channels in frequency range from 5940 MHz to 7105
MHz.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
- Remove HOSTAPD_MODE_IEEE80211AX mode
- Replace check for HOSTAPD_MODE_IEEE80211AX with is_6ghz_freq()
- Move center_idx_to_bw_6ghz() to ieee802_11_common.c file

Signed-off-by: Vamsi Krishna <vamsin@codeaurora.org>
5 years agoAP: Add op_class config item to specify 6 GHz channels uniquely
Liangwei Dong [Fri, 9 Aug 2019 04:27:46 +0000 (12:27 +0800)] 
AP: Add op_class config item to specify 6 GHz channels uniquely

Add hostapd config option "op_class" for fixed channel selection along
with existing "channel" option. "op_class" and "channel" config options
together can specify channels across 2.4 GHz, 5 GHz, and 6 GHz bands
uniquely.

Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
Signed-off-by: Vamsi Krishna <vamsin@codeaurora.org>
5 years agowpa_supplicant: Pass in operating class for channel validity checks
Jouni Malinen [Wed, 9 Oct 2019 15:49:42 +0000 (18:49 +0300)] 
wpa_supplicant: Pass in operating class for channel validity checks

This is needed to allow the 6 GHz operating classes to be compared
against the driver support channels since the channel numbers are not
really unique identifiers of a channel even within a single band.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SAE PWE derivation methods
Jouni Malinen [Thu, 5 Sep 2019 09:34:48 +0000 (12:34 +0300)] 
tests: SAE PWE derivation methods

Verify behavior with sae_pwe configuration values 0..2, i.e., test the
new hash-to-element mechanism for deriving PWE and negotiation for which
method to use.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Check that peer's rejected groups are not enabled in AP
Jouni Malinen [Fri, 6 Sep 2019 12:51:37 +0000 (15:51 +0300)] 
SAE: Check that peer's rejected groups are not enabled in AP

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: H2E version of SAE commit message handling for AP
Jouni Malinen [Fri, 6 Sep 2019 12:51:37 +0000 (15:51 +0300)] 
SAE: H2E version of SAE commit message handling for AP

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Derive H2E PT in AP when starting the AP
Jouni Malinen [Fri, 6 Sep 2019 12:51:37 +0000 (15:51 +0300)] 
SAE: Derive H2E PT in AP when starting the AP

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Check that peer's rejected groups are not enabled
Jouni Malinen [Fri, 6 Sep 2019 12:40:39 +0000 (15:40 +0300)] 
SAE: Check that peer's rejected groups are not enabled

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: H2E version of SAE commit message handling for STA
Jouni Malinen [Fri, 6 Sep 2019 12:40:39 +0000 (15:40 +0300)] 
SAE: H2E version of SAE commit message handling for STA

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Collect list of rejected groups for H2E in STA
Jouni Malinen [Fri, 6 Sep 2019 12:40:39 +0000 (15:40 +0300)] 
SAE: Collect list of rejected groups for H2E in STA

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Derive H2E PT in STA before connection
Jouni Malinen [Fri, 6 Sep 2019 12:40:39 +0000 (15:40 +0300)] 
SAE: Derive H2E PT in STA before connection

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoRSN: Verify RSNXE match between Beacon/ProbeResp and EAPOL-Key msg 3/4
Jouni Malinen [Fri, 6 Sep 2019 11:51:31 +0000 (14:51 +0300)] 
RSN: Verify RSNXE match between Beacon/ProbeResp and EAPOL-Key msg 3/4

If the AP advertises RSN Extension element, it has to be advertised
consistently in the unprotected (Beacon and Probe Response) and
protected (EAPOL-Key msg 3/4) frames. Verify that this is the case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Advertise Extended RSN Capabilities when H2E is enabled
Jouni Malinen [Thu, 5 Sep 2019 09:05:58 +0000 (12:05 +0300)] 
SAE: Advertise Extended RSN Capabilities when H2E is enabled

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Handle BSS membership selector indication for H2E-only in STA mode
Jouni Malinen [Sat, 7 Sep 2019 12:24:24 +0000 (15:24 +0300)] 
SAE: Handle BSS membership selector indication for H2E-only in STA mode

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Advertise BSS membership selector for H2E-only case
Jouni Malinen [Thu, 5 Sep 2019 08:54:47 +0000 (11:54 +0300)] 
SAE: Advertise BSS membership selector for H2E-only case

If hostapd is configured to enable only the hash-to-element version of
SAE PWE derivation (sae_pwe=1), advertise BSS membership selector to
indicate this.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Add sae_pwe configuration parameter for wpa_supplicant
Jouni Malinen [Thu, 5 Sep 2019 09:38:32 +0000 (12:38 +0300)] 
SAE: Add sae_pwe configuration parameter for wpa_supplicant

This parameter can be used to specify which PWE derivation mechanism(s)
is enabled. This commit is only introducing the new parameter; actual
use of it will be address in separate commits.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Add sae_pwe configuration parameter for hostapd
Jouni Malinen [Thu, 5 Sep 2019 08:44:57 +0000 (11:44 +0300)] 
SAE: Add sae_pwe configuration parameter for hostapd

This parameter can be used to specify which PWE derivation mechanism(s)
is enabled. This commit is only introducing the new parameter; actual
use of it will be address in separate commits.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Module test for SAE hash-to-element crypto routines
Jouni Malinen [Tue, 27 Aug 2019 13:33:15 +0000 (16:33 +0300)] 
tests: Module test for SAE hash-to-element crypto routines

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Add Rejected Groups element into H2E Commit
Jouni Malinen [Tue, 27 Aug 2019 13:33:15 +0000 (16:33 +0300)] 
SAE: Add Rejected Groups element into H2E Commit

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Hash algorithm selection for H2E KCK/CN()
Jouni Malinen [Tue, 27 Aug 2019 13:33:15 +0000 (16:33 +0300)] 
SAE: Hash algorithm selection for H2E KCK/CN()

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Implement hash-to-element PT/PWE crypto routines
Jouni Malinen [Tue, 27 Aug 2019 13:33:15 +0000 (16:33 +0300)] 
SAE: Implement hash-to-element PT/PWE crypto routines

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Parse Rejected Groups element from H2E SAE commit
Jouni Malinen [Sat, 7 Sep 2019 15:38:29 +0000 (18:38 +0300)] 
SAE: Parse Rejected Groups element from H2E SAE commit

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Tell sae_parse_commit() whether H2E is used
Jouni Malinen [Sat, 7 Sep 2019 15:33:02 +0000 (18:33 +0300)] 
SAE: Tell sae_parse_commit() whether H2E is used

This will be needed to help parsing the received SAE commit.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: H2E protocol defines
Jouni Malinen [Fri, 6 Sep 2019 12:46:10 +0000 (15:46 +0300)] 
SAE: H2E protocol defines

These are the defined values/identifiers for SAE hash-to-element
mechanism from IEEE P802.11-REVmd/D3.0.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agowolfSSL: Fix crypto_bignum_sub()
Jouni Malinen [Mon, 14 Oct 2019 16:27:47 +0000 (19:27 +0300)] 
wolfSSL: Fix crypto_bignum_sub()

The initial crypto wrapper implementation for wolfSSL seems to have
included a copy-paste error in crypto_bignum_sub() implementation that
was identical to crypto_bignum_add() while mp_sub() should have been
used instead of mp_add().

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agocrypto: Add more bignum/EC helper functions
Jouni Malinen [Tue, 27 Aug 2019 13:33:15 +0000 (16:33 +0300)] 
crypto: Add more bignum/EC helper functions

These are needed for implementing SAE hash-to-element.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: PMF AP sending valid deauth/disassoc without dropping SA
Jouni Malinen [Fri, 11 Oct 2019 15:18:43 +0000 (18:18 +0300)] 
tests: PMF AP sending valid deauth/disassoc without dropping SA

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: WPA2-PSK PMF AP dropping SA
Jouni Malinen [Fri, 11 Oct 2019 14:53:04 +0000 (17:53 +0300)] 
tests: WPA2-PSK PMF AP dropping SA

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut DPP TCP Enrollee as initiator
Jouni Malinen [Fri, 11 Oct 2019 10:27:49 +0000 (13:27 +0300)] 
tests: sigma_dut DPP TCP Enrollee as initiator

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut DPP TCP Configurator (Controller) as responder
Jouni Malinen [Fri, 11 Oct 2019 10:07:39 +0000 (13:07 +0300)] 
tests: sigma_dut DPP TCP Configurator (Controller) as responder

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Fix confusing debug entry from Configurator
Jouni Malinen [Fri, 11 Oct 2019 10:04:42 +0000 (13:04 +0300)] 
DPP: Fix confusing debug entry from Configurator

The logic for displaying the message about no configuration being
available for the Enrollee was reversed when support for multiple Config
Objects was added. This was supposed to be shown only if the first
Config Object fails (i.e., when no configuration is available); not when
second attempt fails (since the first one had already been successful in
that case).

Fixes: 7eb06a33697f ("DPP2: Allow multiple Config Objects to be build on Configurator")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut controlled SAE association with PMKID
Jouni Malinen [Thu, 10 Oct 2019 13:21:10 +0000 (16:21 +0300)] 
tests: sigma_dut controlled SAE association with PMKID

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut controlled AP with SAE Confirm immediate
Jouni Malinen [Thu, 10 Oct 2019 12:56:01 +0000 (15:56 +0300)] 
tests: sigma_dut controlled AP with SAE Confirm immediate

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SAE and AP sending Confirm message without waiting STA
Jouni Malinen [Thu, 10 Oct 2019 12:42:11 +0000 (15:42 +0300)] 
tests: SAE and AP sending Confirm message without waiting STA

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Allow AP behavior for SAE Confirm to be configured
Jouni Malinen [Thu, 10 Oct 2019 12:38:26 +0000 (15:38 +0300)] 
SAE: Allow AP behavior for SAE Confirm to be configured

hostapd is by default waiting STA to send SAE Confirm before sending the
SAE Confirm. This can now be configured with sae_confirm_immediate=1
resulting in hostapd sending out SAE Confirm immediately after sending
SAE Commit.

These are the two different message sequences:

sae_confirm_immediate=0
STA->AP: SAE Commit
AP->STA: SAE Commit
STA->AP: SAE Confirm
AP->STA: SAE Confirm
STA->AP: Association Request
AP->STA: Association Response

sae_confirm_immediate=1
STA->AP: SAE Commit
AP->STA: SAE Commit
AP->STA: SAE Confirm
STA->AP: SAE Confirm
STA->AP: Association Request
AP->STA: Association Response

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agowpa_cli: Clean up unnecessarily complex CONFIG_MESH use
Jouni Malinen [Mon, 7 Oct 2019 12:23:38 +0000 (15:23 +0300)] 
wpa_cli: Clean up unnecessarily complex CONFIG_MESH use

There is no need for #ifdef/#else/#endif construction in
network_fields[] to cover "mode" (which is completely independent of
CONFIG_MESH) or two separate conditional blocks for mesh related network
fields, so move these into a single conditionally included block.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agowpa_supplicant: Pass AP mode EDMG config to hostapd struct
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
wpa_supplicant: Pass AP mode EDMG config to hostapd struct

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agowpa_supplicant: Add support for EDMG channels
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
wpa_supplicant: Add support for EDMG channels

As part of a connection request, set EDMG parameters for the driver to
use in the association. The EDMG parameters are based on EDMG IE
received from the AP's Probe Response frames, the driver's EDMG
capability, and the EDMG configuration from the configuration.

As part of starting an AP, set EDMG parameters for the driver to use for
AP operation. The EDMG parameters are based on the driver's EDMG
capability and the EDMG configuration from the configuration.

This implementation is limited to CB2 (channel bonding of 2 channels)
and the bonded channels must be adjacent, i.e., the supported values for
edmg_channel are 9..13.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agoIndicate EDMG in scan results
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
Indicate EDMG in scan results

Add [EDMG] flag to scan results.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agoAP: Show EDMG channel info in STATUS output
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
AP: Show EDMG channel info in STATUS output

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agohostapd: Check EDMG configuration against capability
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
hostapd: Check EDMG configuration against capability

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agohostapd: Check usability of EDMG channel
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
hostapd: Check usability of EDMG channel

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agoAdd EDMG parameters to set_freq functions
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
Add EDMG parameters to set_freq functions

This updates the frequency parameter setting functions to include
argument for EDMG.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agoEDMG: Helper functions for parameter encoding/checking
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
EDMG: Helper functions for parameter encoding/checking

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agowpa_supplicant: Add EDMG channel configuration parameters
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
wpa_supplicant: Add EDMG channel configuration parameters

Add two new configuration parameters for wpa_supplicant:
enable_edmg: Enable EDMG capability for STA/AP mode
edmg_channel: Configure channel bonding. In AP mode it defines the EDMG
channel to start the AP on. In STA mode it defines the EDMG channel to
use for connection.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agohostapd: Add EDMG channel configuration parameters
Alexei Avshalom Lazar [Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)] 
hostapd: Add EDMG channel configuration parameters

Add two new configuration parameters for hostapd:
enable_edmg: Enable EDMG capability for AP mode in the 60 GHz band
edmg_channel: Configure channel bonding for AP mode in the 60 GHz band

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agonl80211: Add support for EDMG channels
Alexei Avshalom Lazar [Tue, 10 Sep 2019 07:26:01 +0000 (10:26 +0300)] 
nl80211: Add support for EDMG channels

IEEE P802.11ay defines Enhanced Directional Multi-Gigabit (EDMG) STA and
AP which allow channel bonding of 2 channels and more.

nl80211 provides the driver's EDMG capabilities from the kernel
using two new attributes:
NL80211_BAND_ATTR_EDMG_CHANNELS - bitmap field that indicates the 2.16
GHz channel(s) that are supported by the driver.
NL80211_BAND_ATTR_EDMG_BW_CONFIG - represents the channel bandwidth
configurations supported by the driver.
The driver's EDMG capabilities are stored inside struct hostapd_hw_modes.

As part of the connect request and starting AP, EDMG parameters are
passed as part of struct hostapd_freq_params.

The EDMG parameters are sent to the kernel by using two new attributes:
NL80211_ATTR_WIPHY_EDMG_CHANNEL and NL80211_ATTR_WIPHY_EDMG_BW_CONFIG
which specify channel and bandwidth configuration for the driver to use.

This implementation is limited to CB2 (channel bonding of 2 channels)
and the bonded channels must be adjacent.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agoIEEE P802.11ay/D4.0 defines for EDMG
Alexei Avshalom Lazar [Tue, 10 Sep 2019 07:26:01 +0000 (10:26 +0300)] 
IEEE P802.11ay/D4.0 defines for EDMG

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
5 years agotests: sigma_dut DPP/QR responder status query
Jouni Malinen [Fri, 4 Oct 2019 14:03:47 +0000 (17:03 +0300)] 
tests: sigma_dut DPP/QR responder status query

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut DPP AP as Relay to Controller
Jouni Malinen [Fri, 4 Oct 2019 13:33:36 +0000 (16:33 +0300)] 
tests: sigma_dut DPP AP as Relay to Controller

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Update server and user certificates (2019)
Jouni Malinen [Fri, 4 Oct 2019 13:03:04 +0000 (16:03 +0300)] 
tests: Update server and user certificates (2019)

The previous versions expired, so need to re-sign these to fix number of
the EAP test cases. This contains updates from running
tests/hwsim/auth_server/update.sh.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoMBO/OCE: Update disable_mbo_oce flag after association
Ankita Bajaj [Fri, 27 Sep 2019 05:58:34 +0000 (11:28 +0530)] 
MBO/OCE: Update disable_mbo_oce flag after association

After roaming to an AP, update disable_mbo_oce flag based on the current
BSS capabilities. This flag is used to check whether STA should support
MBO/OCE features and process BTM request received from the current
connected AP.

When a STA roams from a WPA2 MBO/OCE AP with PMF enabled to a
misbehaving WPA2 MBO/OCE AP without PMF, or if the driver chooses a BSS
in which PMF is not enabled for the initial connection, BTM requests
from such APs should not be processed by STA.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut with DPPConfIndex 9 and 10
Jouni Malinen [Wed, 25 Sep 2019 20:55:35 +0000 (23:55 +0300)] 
tests: sigma_dut with DPPConfIndex 9 and 10

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP2: Parse AKM suite selector version of akm node
Jouni Malinen [Fri, 27 Sep 2019 00:09:09 +0000 (03:09 +0300)] 
DPP2: Parse AKM suite selector version of akm node

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP2: Allow Configurator to use AKM suite selectors in Config Object
Jouni Malinen [Thu, 26 Sep 2019 23:30:33 +0000 (02:30 +0300)] 
DPP2: Allow Configurator to use AKM suite selectors in Config Object

The new use_akm_selector=1 value to Configurator parameters can now be
used to request a list of AKM suite selectors to be used in the
Configuration Object if the Enrollee supports version 2 or newer.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP2: Support multiple Config Objects in Enrollee
Jouni Malinen [Thu, 26 Sep 2019 22:08:56 +0000 (01:08 +0300)] 
DPP2: Support multiple Config Objects in Enrollee

Process all received DPP Configuration Object attributes from
Configuration Result in Enrollee STA case. If wpa_supplicant is
configured to add networks automatically, this results in one network
being added for each included Configuration Object.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP2: Allow multiple Config Objects to be build on Configurator
Jouni Malinen [Wed, 25 Sep 2019 00:49:41 +0000 (03:49 +0300)] 
DPP2: Allow multiple Config Objects to be build on Configurator

Special @CONF-OBJ-SEP@ string can now be used as a DPP configuration
string value to split the string into two different components to
configure two Config Objects for an Enrollee.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Cleaned up netrole indication for config object building
Jouni Malinen [Mon, 17 Jun 2019 13:41:20 +0000 (16:41 +0300)] 
DPP: Cleaned up netrole indication for config object building

Include netrole as part of struct dpp_configuration to make config
object building more flexible.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFILS+FT: Fix MFPR flag in RSNE during FILS exchange for FT
Jouni Malinen [Thu, 26 Sep 2019 22:49:36 +0000 (01:49 +0300)] 
FILS+FT: Fix MFPR flag in RSNE during FILS exchange for FT

Commit e820cf952f29 ("MFP: Add MFPR flag into station RSN IE if 802.11w
is mandatory") added indication of MFPR flag in non-FT cases and was
further extended to cover FT protocol in commit ded56f2fafb0 ("FT: Fix
MFPR flag in RSNE during FT protocol"). Similar fix is needed for
FILS+FT as well.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SAE in wpa_supplicant AP mode
Jouni Malinen [Thu, 19 Sep 2019 18:27:40 +0000 (21:27 +0300)] 
tests: SAE in wpa_supplicant AP mode

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAllow SAE to be used in wpa_supplicant AP mode
Jouni Malinen [Thu, 19 Sep 2019 18:25:52 +0000 (21:25 +0300)] 
Allow SAE to be used in wpa_supplicant AP mode

SAE password configuration for AP mode requires additional steps
compared to PSK cases. Previous implementation allowed SAE to be
configured, but all authentication attempts would fail due to no
password being available. Now both psk and sae_password/sae_password_id
parameters are translated properly to the hostapd configuration
structures to fix this.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoNetBSD: Fix compile
Roy Marples [Thu, 19 Sep 2019 09:59:09 +0000 (10:59 +0100)] 
NetBSD: Fix compile

On NetBSD the ethernet header is net/if_ether.h

This also pulls in net/if.h which defines if_type, which in turn
conflicts with an enum in wpa_supplicant. As such we need to
include this at the bottom rather than at the top.

Signed-off-by: Roy Marples <roy@marples.name>
5 years agotests: MBO and WPA2 without PMF on misbehaving AP
Jouni Malinen [Fri, 20 Sep 2019 21:34:51 +0000 (00:34 +0300)] 
tests: MBO and WPA2 without PMF on misbehaving AP

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoMBO/OCE: Work around misbehaving MBO/OCE APs that use RSN without PMF
Vamsi Krishna [Wed, 11 Sep 2019 10:35:22 +0000 (16:05 +0530)] 
MBO/OCE: Work around misbehaving MBO/OCE APs that use RSN without PMF

The MBO and OCE specification require the station to mandate use of PMF
when connecting to an MBO/OCE AP that uses WPA2. The earlier
implementation prevented such misbehaving APs from being selected for
connection completely. This looks like the safest approach to take, but
unfortunately, there are deployed APs that are not compliant with the
MBO/OCE requirements and this strict interpretation of the station
requirements results in interoperability issues by preventing the
association completely.

Relax the approach by allowing noncompliant MBO/OCE APs to be selected
for RSN connection without PMF to avoid the main impact of this
interoperability issue. However, disable MBO/OCE functionality when PMF
cannot be negotiated to try to be as compliant as practical with the
MBO/OCE tech spec requirements (i.e., stop being an MBO/OCE STA for the
duration of such workaround association). Also disable support for BTM
in this workaround state since MBO would expect all BTM frames to be
protected.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agowlantest: Process VLAN tagged Data frames
Jouni Malinen [Fri, 20 Sep 2019 20:54:05 +0000 (23:54 +0300)] 
wlantest: Process VLAN tagged Data frames

This allows Data frames to be fully processed for the case where VLAN
tags are used on the wireless link.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agonl80211: Migrate to current netlink key message format
Alexander Wetzel [Sun, 15 Sep 2019 20:08:22 +0000 (22:08 +0200)] 
nl80211: Migrate to current netlink key message format

Linux 2.6.32 (December 2009) introduced alternate netlink messages
for setting and installing keys, deprecating the older ones.

To allow hostapd/wpa_supplicant to use new features only provided via
the new API this patch migrates all netlink messages to the current ones.

Since the nl80211 driver was sometimes already using the new format this
is only unifying the netlink API usage and not changing the minimal
kernel requirement.

The following netlink attributes have been retired for key installs:

  NL80211_ATTR_KEY_DATA
  NL80211_ATTR_KEY_TYPE
  NL80211_ATTR_KEY_SEQ
  NL80211_ATTR_KEY_IDX
  NL80211_ATTR_KEY_CIPHER
  NL80211_ATTR_KEY_DEFAULT
  NL80211_ATTR_KEY_DEFAULT_MGMT
  NL80211_ATTR_KEY_DEFAULT_TYPES

And replaced by the following attributes nested in NL80211_ATTR_KEY:

  NL80211_KEY_DATA
  NL80211_KEY_TYPE
  NL80211_KEY_SEQ
  NL80211_KEY_IDX
  NL80211_KEY_CIPHER
  NL80211_KEY_DEFAULT
  NL80211_KEY_DEFAULT_MGMT
  NL80211_KEY_DEFAULT_TYPES

When getting Michael MIC failure notifications or querying a key
sequence number the kernel continues to use the old attributes:
  NL80211_ATTR_KEY_TYPE
  NL80211_ATTR_KEY_SEQ
  NL80211_ATTR_KEY_IDX

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
5 years agoAP: Provide correct keyid to wpa_send_eapol() for EAPOL-Key msg 3/4
Alexander Wetzel [Sun, 15 Sep 2019 20:08:21 +0000 (22:08 +0200)] 
AP: Provide correct keyid to wpa_send_eapol() for EAPOL-Key msg 3/4

PTKINITNEGOTIATING in the WPA state machine calls wpa_send_eapol() and
hands over the GTK instead of the PTK keyid.

Besides a confusing debug message this does not have any negative side
effects: The variable is only set to a wrong value when using WPA2 but
then it's not used.

With this patch PTKINITNEGOTIATING sets the PTK keyid unconditionally to
zero for EAPOL-Key msg 3/4 and differentiates more obviously between GTK
and PTK keyids.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
5 years agoBSD: Add support for route(4) message filtering
Roy Marples [Wed, 18 Sep 2019 11:50:36 +0000 (12:50 +0100)] 
BSD: Add support for route(4) message filtering

hostapd is only interested in RTM_IEEE80211.
wpa_supplicant is only interested in RTM_IEEE80211, RTM_IFINFO and
RTM_IFANNOUNCE.

This supports the NetBSD RO_MSGFILTER interface and the alternative
DragonFlyBSD/OpenBSD interface ROUTE_MSGFILTER.

Signed-off-by: Roy Marples <roy@marples.name>
5 years agotests: Automatic channel selection with invalid chanlist
Jouni Malinen [Thu, 19 Sep 2019 09:14:04 +0000 (12:14 +0300)] 
tests: Automatic channel selection with invalid chanlist

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoACS: Stop before scan if no channels in chanlist are available
Neo Jou [Wed, 18 Sep 2019 07:39:50 +0000 (15:39 +0800)] 
ACS: Stop before scan if no channels in chanlist are available

When we set "channel=0" in hostapd.conf to enable ACS function, and set
a wrong channel list, e.g., chanlist=222-999 on purpose, hostapd would
still start ACS process to compute the ideal channel, even when there
are no available channels with such configuration.

Though there is no problem since hostapd fails to initialize interface,
it spends time going through the scan and the debug log entries may make
it more difficult to tell what was behind the failure.

Thus, check if there are any available channels in acs_request_scan(),
and return -1 if no available channel, then it will fail at acs_init(),
without doing ACS computation. It will show the following in the log:
    Could not select hw_mode and channel. (-3)
    wlan0: interface state UNINITIALIZED->DISABLED

Then we can know the setting is incorrect already in
hostapd_select_hw_mode(), instead of waiting for scan callback function
to know if the setting is ok for ACS or not. This can save time and help
to tell if the setting is correct at the initial function at the first.
This will also allow the ENABLE control interface command to return FAIL
when adding an interface dynamically.

Signed-off-by: Neo Jou <neojou@gmail.com>
5 years agoDPP: Debug print configRequest bandSupport on Configurator
Jouni Malinen [Wed, 18 Sep 2019 21:12:27 +0000 (00:12 +0300)] 
DPP: Debug print configRequest bandSupport on Configurator

Go through the received bandSupport JSON array and print its contents in
the debug log. This information might be exposed to upper layer
configuration generation/use somehow in the future.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Add bandSupport JSON array into config request
Jouni Malinen [Wed, 18 Sep 2019 21:00:46 +0000 (00:00 +0300)] 
DPP: Add bandSupport JSON array into config request

Indicate supported global operating classes when wpa_supplicant is
operating as an Enrollee.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agomka: Check OLPN for exhaustion on SAKuse decode
Thomas Winter [Tue, 27 Aug 2019 03:55:38 +0000 (15:55 +1200)] 
mka: Check OLPN for exhaustion on SAKuse decode

Most of the time is spent in the CP state machine RETIRE state where LKI
is not set and OKI is the currently used SAK so OLPN needs to be checked
for PN exhaustion.

hostapd/wpa_supplicant implemented an interpretation of the standard as
described in a proposed amendment titled "MKA pending PN exhastion"
which was deemed to be wrong. This amendment was included in IEEE Std
802.1Xck-2018.

Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
5 years agomka: Check OLPN for exhaustion on SAKuse encode
Thomas Winter [Tue, 27 Aug 2019 03:55:37 +0000 (15:55 +1200)] 
mka: Check OLPN for exhaustion on SAKuse encode

Most of the time is spent in the CP state machine RETIRE state where LKI
is not set and OKI is the currently used SAK, so OLPN needs to be
checked for PN exhaustion.

hostapd/wpa_supplicant implemented an interpretation of the standard as
described in a proposed amendment titled "MKA pending PN exhastion"
which was deemed to be wrong. This amendment was included in IEEE Std
802.1Xck-2018.

Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
5 years agomka: Clear out old/latest key values on CHANGE in CP state machine
Thomas Winter [Tue, 27 Aug 2019 03:55:36 +0000 (15:55 +1200)] 
mka: Clear out old/latest key values on CHANGE in CP state machine

The associated SAs have been deleted and the key server has changed so
there's no point in keeping the key values.

Note that this isn't specified in IEEE Std 802.1X-2010.

Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
5 years agomka: Don't set newSAK to FALSE on ABANDON in CP state machine
Thomas Winter [Tue, 27 Aug 2019 03:55:35 +0000 (15:55 +1200)] 
mka: Don't set newSAK to FALSE on ABANDON in CP state machine

Previously the ABANDON->RECEIVE state change was impossible and did not
match the CP state machine in IEEE Std 802.1X-2010 Figure 12-2.

Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
5 years agomka: Change RECEIVE and RETIRE states to match the standard
Thomas Winter [Tue, 27 Aug 2019 03:55:34 +0000 (15:55 +1200)] 
mka: Change RECEIVE and RETIRE states to match the standard

The RECEIVE and RETIRE states were incorrect which can result in
incorrect information being advertised in SAKuse MKPDUs. Change these to
match IEEE Std 802.1X-2010, Figure 12-2 (CP state machine).

hostapd/wpa_supplicant implemented an interpretation of the standard as
described in a proposed amendment titled "MKA pending PN exhastion"
which was deemed to be wrong. This amendment was included in IEEE Std
802.1Xck-2018.

Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
5 years agotests: Fix p2p_stop_find() calls in discovery
Jouni Malinen [Wed, 18 Sep 2019 16:07:13 +0000 (19:07 +0300)] 
tests: Fix p2p_stop_find() calls in discovery

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: wpa_supplicant build for EAP-SIM and PC/SC
Jouni Malinen [Tue, 17 Sep 2019 15:07:03 +0000 (18:07 +0300)] 
tests: wpa_supplicant build for EAP-SIM and PC/SC

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFix wpa_supplicant build with CONFIG_PCSC=y
Jouni Malinen [Tue, 17 Sep 2019 15:00:49 +0000 (18:00 +0300)] 
Fix wpa_supplicant build with CONFIG_PCSC=y

This code block with dependency on PCSC_FUNCS was missed when conf->pin
was moved to conf->cert.pin. Fix this to get rid of compilation issues
with CONFIG_PCSC=y builds.

Fixes: b99c4cadb7f8 ("EAP peer: Move certificate configuration params into shared struct")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: DPP MUD URL
Jouni Malinen [Tue, 17 Sep 2019 14:57:51 +0000 (17:57 +0300)] 
tests: DPP MUD URL

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Allow name and mudurl to be configured for Config Request
Jouni Malinen [Tue, 17 Sep 2019 10:36:22 +0000 (13:36 +0300)] 
DPP: Allow name and mudurl to be configured for Config Request

The new hostapd and wpa_supplicant configuration parameters dpp_name and
dpp_mud_url can now be used to set a specific name and MUD URL for the
Enrollee to use in the Configuration Request. dpp_name replaces the
previously hardcoded "Test" string (which is still the default if an
explicit configuration entry is not included). dpp_mud_url can
optionally be used to add a MUD URL to describe the Enrollee device.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Layer 2 Update frame behavior in mac80211
Jouni Malinen [Wed, 11 Sep 2019 12:09:22 +0000 (15:09 +0300)] 
tests: Layer 2 Update frame behavior in mac80211

This verifies mac80211 behavior for Layer 2 Update frame use and other
unexpected frames from a not fully authentication station.

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