]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
8 years agoFILS: Claim FILS capability only if driver supports it
Jouni Malinen [Tue, 25 Oct 2016 20:44:00 +0000 (23:44 +0300)] 
FILS: Claim FILS capability only if driver supports it

"GET_CAPABILITY fils" used to return "FILS" based on wpa_supplicant
configuration. This can be made more useful by checking both for
wpa_supplicant and driver support for FILS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Setup EAPOL state machines properly after FILS association (AP)
Jouni Malinen [Thu, 10 Sep 2015 18:33:40 +0000 (21:33 +0300)] 
FILS: Setup EAPOL state machines properly after FILS association (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set TK after association (AP)
Jouni Malinen [Wed, 9 Sep 2015 16:32:44 +0000 (19:32 +0300)] 
FILS: Set TK after association (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Mark connection fully authorized after FILS Association (AP)
Jouni Malinen [Wed, 9 Sep 2015 15:56:57 +0000 (18:56 +0300)] 
FILS: Mark connection fully authorized after FILS Association (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Association Response processing (STA)
Jouni Malinen [Wed, 9 Sep 2015 14:34:13 +0000 (17:34 +0300)] 
FILS: Association Response processing (STA)

Decrypt the AES-SIV protected elements and verify Key-Auth. Parse and
configure keys to the driver.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add Association Response frame elements and encrypt them (AP)
Jouni Malinen [Wed, 9 Sep 2015 12:43:53 +0000 (15:43 +0300)] 
FILS: Add Association Response frame elements and encrypt them (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Decrypt Association Request elements and check Key-Auth (AP)
Jouni Malinen [Tue, 8 Sep 2015 22:27:22 +0000 (01:27 +0300)] 
FILS: Decrypt Association Request elements and check Key-Auth (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add elements to FILS Association Request frame
Jouni Malinen [Tue, 8 Sep 2015 17:58:53 +0000 (20:58 +0300)] 
FILS: Add elements to FILS Association Request frame

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agodriver: Add option to pass FILS KEK/AAD to the driver for association
Jouni Malinen [Sun, 23 Oct 2016 09:31:55 +0000 (12:31 +0300)] 
driver: Add option to pass FILS KEK/AAD to the driver for association

This allows the FILS KEK and AAD data (nonces) to be configured to the
driver for association so that the driver can encrypt the
(Re)Association Request frame and decrypt the (Re)Association Response
frame.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Check if the pref_freq reported by the driver supports P2P
Sunil Dutt [Fri, 21 Oct 2016 06:43:16 +0000 (12:13 +0530)] 
P2P: Check if the pref_freq reported by the driver supports P2P

Filter out get_pref_freq_list() (i.e.,
QCA_NL80211_VENDOR_SUBCMD_GET_PREFERRED_FREQ_LIST) output in case of
channel negotiation by removing channels that do not allow P2P operation
at all. Previously, only the explicitly disallowed channels were removed
and that could have resulted in selecting an operating channel that is
not allowed for P2P and failing to complete the operation to start the
group.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Authentication frame processing (STA)
Jouni Malinen [Mon, 7 Sep 2015 21:14:13 +0000 (00:14 +0300)] 
FILS: Authentication frame processing (STA)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Process FILS Authentication frame (AP)
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
FILS: Process FILS Authentication frame (AP)

This implements processing of FILS Authentication frame for FILS shared
key authentication with ERP and PMKSA caching.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add a helper function for status code conversion
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
FILS: Add a helper function for status code conversion

This will allow the existing code to be reused for FILS needs.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Extend wpa_auth_pmksa_get() to support PMKID matching
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
FILS: Extend wpa_auth_pmksa_get() to support PMKID matching

This is needed for FILS processing to enable PMKSA caching.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Export IEEE 802.1X helper functions
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
FILS: Export IEEE 802.1X helper functions

ieee802_1x_encapsulate_radius() and ieee802_1x_alloc_eapol_sm() need to
be called from FILS processing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoERP: Update client identity based on EAP-Initiate/Re-auth
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
ERP: Update client identity based on EAP-Initiate/Re-auth

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Try to use FILS authentication if PMKSA or ERP entry is available
Jouni Malinen [Fri, 4 Sep 2015 12:32:07 +0000 (15:32 +0300)] 
FILS: Try to use FILS authentication if PMKSA or ERP entry is available

If a PMKSA cache entry for the target AP is available, try to use FILS
with PMKSA caching.

If an ERP key for the target AP is available, try to use FILS with
EAP-Initiate/Re-auth added as Wrapper Data element.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoSME: Clear possibly used WPA/RSN IE for new connection
Jouni Malinen [Sat, 22 Oct 2016 19:48:25 +0000 (22:48 +0300)] 
SME: Clear possibly used WPA/RSN IE for new connection

This was already done in the case SME in the driver is used, but the SME
code path was resetting the local WPA/RSN IE only for association. While
that was fine for existing use cases, FILS needs a new RSN IE to be set
for PMKSA caching case in Authentication frames, so clear the local IE
before starting new authentication.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoWPA: Add debug print for not-update-own-IEs case
Jouni Malinen [Sat, 22 Oct 2016 19:47:30 +0000 (22:47 +0300)] 
WPA: Add debug print for not-update-own-IEs case

This makes it easier to understand debug logs related to own WPA/RSN IE
selection.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Include wpa_insert_pmkid() in non-FT builds
Jouni Malinen [Sat, 22 Oct 2016 19:46:48 +0000 (22:46 +0300)] 
FILS: Include wpa_insert_pmkid() in non-FT builds

This function is needed for FILS as well as FT.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoERP: Make eap_peer_finish() callable
Jouni Malinen [Thu, 10 Sep 2015 18:34:15 +0000 (21:34 +0300)] 
ERP: Make eap_peer_finish() callable

This is needed for FILS to process EAP-Finish/Re-auth.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoERP: Make eap_peer_erp_reauth_start() available
Jouni Malinen [Wed, 9 Sep 2015 20:39:48 +0000 (23:39 +0300)] 
ERP: Make eap_peer_erp_reauth_start() available

This needs to be callable through the EAPOL supplicant wrappers to allow
FILS implementation to use ERP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Make full (Re)Association Response frame available
Jouni Malinen [Wed, 9 Sep 2015 14:32:56 +0000 (17:32 +0300)] 
nl80211: Make full (Re)Association Response frame available

This is needed for FILS processing since AAD includes data before the
first element.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Do not clear PTK on FILS Auth/Assoc (AP)
Jouni Malinen [Tue, 8 Sep 2015 22:17:30 +0000 (01:17 +0300)] 
FILS: Do not clear PTK on FILS Auth/Assoc (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Key-Auth derivation function for FILS SK
Jouni Malinen [Tue, 8 Sep 2015 17:39:46 +0000 (20:39 +0300)] 
FILS: Key-Auth derivation function for FILS SK

This implements Key-Auth derivation for (Re)Association Request frames
(see P802.11ai/D11.0 12.12.2.6.2) and (Re)Association Response frames
(see P802.11ai/D11.0 12.12.2.6.3).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: PMK-to-PTK key derivation for FILS authentication
Jouni Malinen [Mon, 7 Sep 2015 21:58:11 +0000 (00:58 +0300)] 
FILS: PMK-to-PTK key derivation for FILS authentication

This is the PTKSA key derivation used as part of the FILS authentication
exchange. See P802.11ai/D11.0 12.12.2.5.3.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoRename sae_data to more generic auth_data
Jouni Malinen [Sat, 22 Oct 2016 14:11:11 +0000 (17:11 +0300)] 
Rename sae_data to more generic auth_data

This makes it cleaner for the FILS implementation to use the same design
for setting Authentication frame elements as was already done with SAE.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoAdd QCA vendor command/attr for low level DMG(11ad) RF sector control
Lior David [Mon, 26 Sep 2016 21:09:36 +0000 (00:09 +0300)] 
Add QCA vendor command/attr for low level DMG(11ad) RF sector control

Add operations to allow low level control over RF sectors in QCA DMG
(11ad) chipsets. Operations include getting/setting the configuration of
a specific sector, as well as getting/setting the selected sector which
the HW uses to communicate with a specific station.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
8 years agowpa_cli: Mark number of char *cmd constant
Jouni Malinen [Sun, 16 Oct 2016 09:21:25 +0000 (12:21 +0300)] 
wpa_cli: Mark number of char *cmd constant

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agohostapd_cli: Mark number of char *cmd constant
Jouni Malinen [Sun, 16 Oct 2016 09:21:07 +0000 (12:21 +0300)] 
hostapd_cli: Mark number of char *cmd constant

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agowpa_cli: Add completion for ssid config commands
Mikael Kanstrup [Wed, 12 Oct 2016 12:19:01 +0000 (14:19 +0200)] 
wpa_cli: Add completion for ssid config commands

Add network id command completion support for identity, password,
new_password, pin, otp, passphrase, sim and bssid commands.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agowpa_cli: Add completion for sta, deauthenticate and disassociate
Mikael Kanstrup [Wed, 12 Oct 2016 12:19:00 +0000 (14:19 +0200)] 
wpa_cli: Add completion for sta, deauthenticate and disassociate

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agocli: Add list_sta command
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:59 +0000 (14:18 +0200)] 
cli: Add list_sta command

Add list_sta command to print addresses of all stations. Command
added to both wpa_cli and hostapd_cli.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Process events received following control iface commands
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:58 +0000 (14:18 +0200)] 
hostapd_cli: Process events received following control iface commands

Events received as an immediate result of control interface commands
end up on the control request message callback function instead of
the registered read socket. This makes for example the station list
used for complete functions for disassociate and deauthenticate out
of sync. Process events in the message callback function too to ensure
no events are missed.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Refactor control iface reconnects with common helper
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:57 +0000 (14:18 +0200)] 
hostapd_cli: Refactor control iface reconnects with common helper

Code for connecting/reconnecting to the hostapd control interface
is found duplicated a number of times. Create a common reconnect
helper function to avoid code duplication.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Refresh stations list on control interface reconnect
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:56 +0000 (14:18 +0200)] 
hostapd_cli: Refresh stations list on control interface reconnect

Whenever reconnecting the control interface the hostapd station list
is unknown as stations might have dropped or connected. Refresh the
list of stations used for command completion on cli connect, reconnect
and interface change.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Add completion for sta command
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:55 +0000 (14:18 +0200)] 
hostapd_cli: Add completion for sta command

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Enable command completion and history for Android
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:54 +0000 (14:18 +0200)] 
hostapd_cli: Enable command completion and history for Android

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Add support for cli history file
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:53 +0000 (14:18 +0200)] 
hostapd_cli: Add support for cli history file

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd: Add CONFIG_WPA_CLI_EDIT to defconfig
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:52 +0000 (14:18 +0200)] 
hostapd: Add CONFIG_WPA_CLI_EDIT to defconfig

As hostapd_cli now supports command completion add documentation
of the config option to defconfig. Disabled per default.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agowpa_supplicant: Restore permanent MAC address on reassociation
Benjamin Richter [Tue, 11 Oct 2016 03:57:38 +0000 (05:57 +0200)] 
wpa_supplicant: Restore permanent MAC address on reassociation

With mac_addr=0 and preassoc_mac_addr=1, the permanent MAC address
should be restored for association. Previously this did not happen when
reassociating to the same ESS.

Signed-off-by: Benjamin Richter <br@waldteufel.eu>
8 years agoAlways propagate scan results to all interfaces
Avraham Stern [Mon, 10 Oct 2016 15:22:09 +0000 (18:22 +0300)] 
Always propagate scan results to all interfaces

Scan results were not propagated to all interfaces if scan results
started a new operation, in order to prevent concurrent operations. But
this can cause other interfaces to trigger a new scan when scan results
are already available. Instead, always notify other interfaces of the
scan results, but note that new operations are not allowed.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
8 years agoCheck for NULL qsort() base pointers
Joel Cunningham [Sat, 8 Oct 2016 17:04:15 +0000 (12:04 -0500)] 
Check for NULL qsort() base pointers

There are a couple of places in wpa_supplicant/hostapd where qsort() can
be called with a NULL base pointer. This results in undefined behavior
according to the C standard and with some standard C libraries (ARM RVCT
2.2) results in a data abort/memory exception. Fix this by skipping such
calls since there is nothing needing to be sorted.

Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
8 years agotests: WPS PBC with two APs advertising same SSID
Jouni Malinen [Mon, 10 Oct 2016 21:30:15 +0000 (00:30 +0300)] 
tests: WPS PBC with two APs advertising same SSID

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoWPS: Force BSSID for WPS provisioning step connection
Jouni Malinen [Mon, 10 Oct 2016 21:25:20 +0000 (00:25 +0300)] 
WPS: Force BSSID for WPS provisioning step connection

This was already done for most driver cases, but it is possible that the
BSSID/frequency is not forced if the driver reports BSS selection
capability (e.g., NL80211_ATTR_ROAM_SUPPORT). That could potentially
result in the driver ignoring the BSSID/frequency hint and associating
with another (incorrect) AP for the WPS provisioning step if that
another AP in the same ESS is more preferred (e.g., better signal
strength) by the driver and only one of the APs (the not preferred one)
is in active WPS registrar state.

While most drivers follow the BSSID hint for the initial connection to
an ESS, not doing it here for the WPS provisioning would break the
protocol. Fix this by enforcing a single BSSID/frequency to disallow the
driver from selecting an incorrect AP for the WPS provisioning
association.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoERP: Do not pass full EAP header to eap_peer_erp_reauth_start()
Jouni Malinen [Wed, 9 Sep 2015 18:34:36 +0000 (21:34 +0300)] 
ERP: Do not pass full EAP header to eap_peer_erp_reauth_start()

That function does not need the full EAP header -- it only needs to know
which EAP identifier to use in the message. Make this usable for cases
where the previous EAP message may not exist (FILS).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Update EAPOL-Key Descriptor Version RX rules (AP)
Jouni Malinen [Thu, 3 Sep 2015 17:45:02 +0000 (20:45 +0300)] 
FILS: Update EAPOL-Key Descriptor Version RX rules (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Handle Group Key msg 1/2 without MIC when using AEAD cipher (STA)
Jouni Malinen [Thu, 3 Sep 2015 15:26:25 +0000 (18:26 +0300)] 
FILS: Handle Group Key msg 1/2 without MIC when using AEAD cipher (STA)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Perform AEAD processing after PTK has been confirmed
Jouni Malinen [Thu, 3 Sep 2015 15:18:53 +0000 (18:18 +0300)] 
FILS: Perform AEAD processing after PTK has been confirmed

This covers EAPOL-Key frames other than 2/4 that needed special handling
to confirm PTK.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Use AEAD cipher to check received EAPOL-Key frames (STA)
Jouni Malinen [Thu, 3 Sep 2015 14:57:09 +0000 (17:57 +0300)] 
FILS: Use AEAD cipher to check received EAPOL-Key frames (STA)

This changes 4-way handshake authenticator processing to decrypt the
EAPOL-Key frames using an AEAD cipher (AES-SIV with FILS AKMs) before
processing the Key Data field. This replaces Key MIC validation for the
cases where AEAD cipher is used.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Use AEAD cipher to protect EAPOL-Key frames (AP)
Jouni Malinen [Thu, 3 Sep 2015 14:24:37 +0000 (17:24 +0300)] 
FILS: Use AEAD cipher to protect EAPOL-Key frames (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Use AEAD cipher to check received EAPOL-Key frames (AP)
Jouni Malinen [Thu, 3 Sep 2015 12:59:44 +0000 (15:59 +0300)] 
FILS: Use AEAD cipher to check received EAPOL-Key frames (AP)

This changes 4-way handshake authenticator processing to decrypt the
EAPOL-Key frames using an AEAD cipher (AES-SIV with FILS AKMs) before
processing the Key Data field. This replaces Key MIC validation for the
cases where AEAD cipher is used. This needs to move the EAPOL-Key msg
2/4 RSN element processing to happen only after the PTK has been derived
and validated. That is done for all AKMs to avoid extra complexity with
having to maintain two code paths for this.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Use AEAD cipher to protect EAPOL-Key frames (STA)
Jouni Malinen [Thu, 3 Sep 2015 09:34:23 +0000 (12:34 +0300)] 
FILS: Use AEAD cipher to protect EAPOL-Key frames (STA)

This modifies wpa_eapol_key_send() to use AEAD cipher (AES-SIV for FILS
AKMs) to provide both integrity protection for the EAPOL-Key frame and
encryption for the Key Data field. It should be noted that this starts
encrypting the Key Data field in EAPOL-Key message 2/4 while it remains
unencrypted (but integrity protected) in non-FILS cases. Similarly, the
empty Key Data field in EAPOL-Key message 4/4 gets encrypted for AEAD
cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoRSN: Pass full PTK to wpa_eapol_key_send() instead of KCK only
Jouni Malinen [Thu, 3 Sep 2015 09:31:55 +0000 (12:31 +0300)] 
RSN: Pass full PTK to wpa_eapol_key_send() instead of KCK only

This will be needed to be able to implement AEAD cipher support from
FILS that will need to use KEK to protect the frame.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Update EAPOL-Key RX rules for FILS (AP)
Jouni Malinen [Wed, 2 Sep 2015 21:48:47 +0000 (00:48 +0300)] 
FILS: Update EAPOL-Key RX rules for FILS (AP)

Key Descriptor Version 0 is used with FILS and Key Info MIC field is set
to 0 with AEAD ciphers.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Update EAPOL-Key descriptor version rules for RX (STA)
Jouni Malinen [Wed, 2 Sep 2015 21:44:14 +0000 (00:44 +0300)] 
FILS: Update EAPOL-Key descriptor version rules for RX (STA)

FILS AKM uses Key Descriptor version 0 and AEAD cipher.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set EAPOL-Key Key Descriptor Version to 0 with FILS AKMs (AP)
Jouni Malinen [Wed, 2 Sep 2015 21:31:45 +0000 (00:31 +0300)] 
FILS: Set EAPOL-Key Key Descriptor Version to 0 with FILS AKMs (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set EAPOL-Key Key Info MIC=0 when using AEAD cipher (supplicant)
Jouni Malinen [Wed, 2 Sep 2015 21:29:54 +0000 (00:29 +0300)] 
FILS: Set EAPOL-Key Key Info MIC=0 when using AEAD cipher (supplicant)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Do not add Key MIC field in supplicant when using AEAD cipher
Jouni Malinen [Wed, 2 Sep 2015 21:21:18 +0000 (00:21 +0300)] 
FILS: Do not add Key MIC field in supplicant when using AEAD cipher

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoRSN authenticator: Add more debug print details on EAPOL-Key RX
Jouni Malinen [Wed, 2 Sep 2015 21:18:27 +0000 (00:18 +0300)] 
RSN authenticator: Add more debug print details on EAPOL-Key RX

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agowlantest: Recognize EAPOL-Key frames without MIC bit for FILS
Jouni Malinen [Wed, 2 Sep 2015 20:33:29 +0000 (23:33 +0300)] 
wlantest: Recognize EAPOL-Key frames without MIC bit for FILS

The new AEAD AKM option in FILS sets the MIC bit in EAPOL-Key frames to
0 for some ciphers, so the determination of EAPOL-Key frame types needs
changes to work with these cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoMake struct wpa_eapol_key easier to use with variable length MIC
Jouni Malinen [Wed, 2 Sep 2015 19:55:03 +0000 (22:55 +0300)] 
Make struct wpa_eapol_key easier to use with variable length MIC

Suite B 192-bit addition from IEEE Std 802.11ac-2013 replaced the
previous fixed length Key MIC field with a variable length field. That
change was addressed with an addition of a new struct defined for the
second MIC length. This is not really scalable and with FILS coming up
with a zero-length MIC case for AEAD, a more thorough change to support
variable length MIC is needed.

Remove the Key MIC and Key Data Length fields from the struct
wpa_eapol_key and find their location based on the MIC length
information (which is determined by the AKMP). This change allows the
separate struct wpa_eapol_key_192 to be removed since struct
wpa_eapol_key will now include only the fixed length fields that are
shared with all EAPOL-Key cases in IEEE Std 802.11.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Advertise ERP domain in FILS Indication element
Jouni Malinen [Wed, 2 Sep 2015 13:33:42 +0000 (16:33 +0300)] 
FILS: Advertise ERP domain in FILS Indication element

Calculate the hashed realm from hostapd erp_domain configuration
parameter and add this to the FILS Indication element when ERP is
enabled.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Allow hostapd to select FILS AKM for connection
Jouni Malinen [Wed, 2 Sep 2015 12:58:23 +0000 (15:58 +0300)] 
FILS: Allow hostapd to select FILS AKM for connection

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Allow wpa_supplicant to select FILS AKM for connection
Jouni Malinen [Wed, 2 Sep 2015 12:35:55 +0000 (15:35 +0300)] 
FILS: Allow wpa_supplicant to select FILS AKM for connection

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add FILS flags into wpa_supplicant BSS command output
Jouni Malinen [Tue, 1 Sep 2015 17:35:00 +0000 (20:35 +0300)] 
FILS: Add FILS flags into wpa_supplicant BSS command output

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add 'GET_CAPABILITY fils' for runtime check
Jouni Malinen [Tue, 1 Sep 2015 17:04:20 +0000 (20:04 +0300)] 
FILS: Add 'GET_CAPABILITY fils' for runtime check

This can be used to check whether the running wpa_supplicant version was
built with CONFIG_FILS=y.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set FILS Capability bit in management frames from station
Jouni Malinen [Tue, 1 Sep 2015 17:00:16 +0000 (20:00 +0300)] 
FILS: Set FILS Capability bit in management frames from station

If FILS is supported, indicate that in Probe Request and (Re)Association
Request frames in the Extended Capabilities element.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set FILS Capability bit in management frames from AP
Jouni Malinen [Tue, 1 Sep 2015 16:44:23 +0000 (19:44 +0300)] 
FILS: Set FILS Capability bit in management frames from AP

If FILS is enabled, indicate that in Beacon, Probe Response, and
(Re)Association Response frames in the Extended Capabilities element.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add FILS Indication element to Beacon and Probe Response frames
Jouni Malinen [Tue, 1 Sep 2015 16:33:32 +0000 (19:33 +0300)] 
FILS: Add FILS Indication element to Beacon and Probe Response frames

If FILS is enabled, indicate that in AP Beacon/Probe Response frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add wpa_supplicant configuration options
Jouni Malinen [Tue, 1 Sep 2015 14:58:53 +0000 (17:58 +0300)] 
FILS: Add wpa_supplicant configuration options

This adds CONFIG_FILS=y build configuration option and new key
management options for FILS authentication.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add hostapd configuration options
Jouni Malinen [Tue, 1 Sep 2015 14:57:59 +0000 (17:57 +0300)] 
FILS: Add hostapd configuration options

This adds CONFIG_FILS=y build configuration option and new key
management options for FILS authentication.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add definitions for new frames and values
Jouni Malinen [Tue, 1 Sep 2015 14:50:04 +0000 (17:50 +0300)] 
FILS: Add definitions for new frames and values

This adds definitions for various management frame elements and values
from P802.11ai/D11.0.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add AKM definitions
Jouni Malinen [Tue, 1 Sep 2015 14:50:04 +0000 (17:50 +0300)] 
FILS: Add AKM definitions

This adds definitions for the new AKM suite values from P802.11ai/D11.0.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add new information elements
Jouni Malinen [Tue, 1 Sep 2015 14:50:04 +0000 (17:50 +0300)] 
FILS: Add new information elements

This adds definitions for new information elements from P802.11ai/D11.0
and parsing of these IEs.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Update eap_proto_psk_errors and ap_wpa2_eap_psk_oom
Jouni Malinen [Mon, 10 Oct 2016 17:23:57 +0000 (20:23 +0300)] 
tests: Update eap_proto_psk_errors and ap_wpa2_eap_psk_oom

The extension of aes_128_ctr_encrypt() to allow AES-192 and AES-256 to
be used in addition to AES-128 for CTR mode encryption resulted in the
backtrace for the function calls changing. Update the test cases that
started failing due to that change.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoExtend AES-SIV implementation to support different key lengths
Jouni Malinen [Mon, 10 Oct 2016 16:27:57 +0000 (19:27 +0300)] 
Extend AES-SIV implementation to support different key lengths

The previous implementation was hardcoded to use 128-bit AES key
(AEAD_AES_SIV_CMAC_256). Extend this by allowing AEAD_AES_SIV_CMAC_384
and AEAD_AES_SIV_CMAC_512 with 192-bit and 256-bit AES keys.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoMove CRC-32 routine from wlantest to src/utils
Jouni Malinen [Wed, 2 Sep 2015 13:16:50 +0000 (16:16 +0300)] 
Move CRC-32 routine from wlantest to src/utils

This allows the CRC-32 routine to be shared for other purposes in
addition to the WEP/TKIP/FCS within wlantest.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Mesh network and SELECT_NETWORK
Jouni Malinen [Sun, 9 Oct 2016 14:09:56 +0000 (17:09 +0300)] 
tests: Mesh network and SELECT_NETWORK

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotest: FT: EAP test for mismatching keys
Michael Braun [Sat, 24 Sep 2016 20:53:44 +0000 (22:53 +0200)] 
test: FT: EAP test for mismatching keys

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
8 years agotest: FT with locally generated PMK-R0/PMK-R1 from PSK
Michael Braun [Sat, 24 Sep 2016 20:53:43 +0000 (22:53 +0200)] 
test: FT with locally generated PMK-R0/PMK-R1 from PSK

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
8 years agoFT: Allow PMK-R0 and PMK-R1 for FT-PSK to be generated locally
Michael Braun [Sat, 24 Sep 2016 20:53:42 +0000 (22:53 +0200)] 
FT: Allow PMK-R0 and PMK-R1 for FT-PSK to be generated locally

Station should be able to connect initially without ft_pmk_cache filled,
so the target AP has the PSK available and thus the same information as
the origin AP. Therefore neither caching nor communication between the
APs with respect to PMK-R0 or PMK-R1 or VLANs is required if the target
AP derives the required PMKs locally.

This patch introduces the generation of the required PMKs locally for
FT-PSK. Additionally, PMK-R0 is not stored (and thus pushed) for FT-PSK.

So for FT-PSK networks, no configuration of inter-AP communication is
needed anymore when using ft_psk_generate_local=1 configuration. The
default behavior (ft_psk_generate_local=0) remains to use the pull/push
protocol.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
8 years agomka: Add driver op to get macsec capabilities
Sabrina Dubroca [Fri, 7 Oct 2016 10:08:12 +0000 (12:08 +0200)] 
mka: Add driver op to get macsec capabilities

This also implements the macsec_get_capability for the macsec_qca
driver to maintain the existing behavior.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
8 years agoEAP-pwd: Validate Prep field in EAP-pwd-ID/Response
Jouni Malinen [Sat, 8 Oct 2016 16:43:36 +0000 (19:43 +0300)] 
EAP-pwd: Validate Prep field in EAP-pwd-ID/Response

RFC 5931 Section 2.8.5.1 does not list the Prep field as something that
the server validates to match the Request. However, the supplicant side
has to use the same pre-processing mechanism for the password for the
authentication to work, so we may as well as enforce this field to match
the requested value now that wpa_supplicant implementation is fixed to
copy the value from the request.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoEAP-pwd: Fix Prep in EAP-pwd-ID/Response when EAP_PWD_PREP_MS is used
Brian Candler [Sat, 8 Oct 2016 07:09:07 +0000 (08:09 +0100)] 
EAP-pwd: Fix Prep in EAP-pwd-ID/Response when EAP_PWD_PREP_MS is used

Fix the pre-processing field in the response when EAP_PWD_PREP_MS is
being used. This fixes interoperability with EAP-pwd servers that
validate the Prep field in EAP-pwd-ID/Response when the RFC2759
(PasswordHashHash) pre-processing is used.

Signed-off-by: Brian Candler <B.Candler@pobox.com>
8 years agomka: Pass full structures down to macsec drivers' receive SC ops
Sabrina Dubroca [Fri, 7 Oct 2016 10:08:10 +0000 (12:08 +0200)] 
mka: Pass full structures down to macsec drivers' receive SC ops

Clean up the driver interface by passing pointers to struct receive_sc
down the stack to the {create,delete}_recevie_sc() ops, instead of
passing the individual properties of the SC.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
8 years agomka: Pass full structures down to macsec drivers' transmit SC ops
Sabrina Dubroca [Fri, 7 Oct 2016 10:08:09 +0000 (12:08 +0200)] 
mka: Pass full structures down to macsec drivers' transmit SC ops

Clean up the driver interface by passing pointers to struct transmit_sc
down the stack to the {create,delete}_transmit_sc() ops, instead of
passing the individual arguments.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
8 years agoLibreSSL: Fix compatibility for EAP-FAST
Julian Ospald [Fri, 7 Oct 2016 15:51:05 +0000 (17:51 +0200)] 
LibreSSL: Fix compatibility for EAP-FAST

This basically just follows commit
587b0457e0238b7b1800d46f5cdd5e1d2b06732f ('LibreSSL: Fix build with
LibreSSL') with the same pattern, which was missed here.

Signed-off-by: Julian Ospald <hasufell@hasufell.de>
8 years agoLibreSSL: Fix TLS initialization/deinitialization
Christian Neukirchen [Wed, 5 Oct 2016 14:37:40 +0000 (16:37 +0200)] 
LibreSSL: Fix TLS initialization/deinitialization

Due to a missing guard for old OpenSSL code, SSL_library_init() was not
called, which is required for LibreSSL. Likewise for cleanup.

Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
8 years agoLibreSSL: Fix dh5 code
Christian Neukirchen [Wed, 5 Oct 2016 14:35:48 +0000 (16:35 +0200)] 
LibreSSL: Fix dh5 code

Add LibreSSL check to old OpenSSL #ifdef guard as DH_{get0,set0}_key()
is not implemented in LibreSSL.

Signed-off-by: Christian Neukirchen <chneukirchen@gmail.com>
8 years agoAdd QCA vendor attributes for measurement frequency for FTM/AOA
Lior David [Sun, 25 Sep 2016 09:29:07 +0000 (12:29 +0300)] 
Add QCA vendor attributes for measurement frequency for FTM/AOA

Add attributes for specifing the frequency where FTM/AOA measurement is
done over the air. This allows the user space framework to maintain its
own cache of peers without depending on the kernel scan results cache,
or perform scans less often (since entries in the kernel scan results
cache expire quickly). The change is backward compatible. If the
frequency attribute is not specified, the kernel scan results cache will
be queried, like done today.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
8 years agomka: Pass full structures down to macsec drivers' receive SA ops
Sabrina Dubroca [Tue, 20 Sep 2016 07:43:09 +0000 (09:43 +0200)] 
mka: Pass full structures down to macsec drivers' receive SA ops

Clean up the driver interface by passing pointers to struct receive_sa
down the stack to the {create,enable,disable}_receive_sa() ops, instead
of passing the individual properties of the SA.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
8 years agomka: Pass full structures down to macsec drivers' transmit SA ops
Sabrina Dubroca [Tue, 20 Sep 2016 07:43:07 +0000 (09:43 +0200)] 
mka: Pass full structures down to macsec drivers' transmit SA ops

Clean up the driver interface by passing pointers to struct transmit_sa
down the stack to the {create,enable,disable}_transmit_sa ops, instead
of passing the individual properties of the SA.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
8 years agomka: Pass full structures down to macsec drivers' packet number ops
Sabrina Dubroca [Tue, 20 Sep 2016 07:43:05 +0000 (09:43 +0200)] 
mka: Pass full structures down to macsec drivers' packet number ops

Clean up the driver interface by passing pointers to structs transmit_sa
and receive_sa down the stack to get_receive_lowest_pn(),
get_transmit_next_pn(), and set_transmit_next_pn() ops, instead of
passing the individual arguments.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
8 years agomka: Move structs {transmit,receive}_{sa,sc} to a common header
Sabrina Dubroca [Tue, 20 Sep 2016 07:43:04 +0000 (09:43 +0200)] 
mka: Move structs {transmit,receive}_{sa,sc} to a common header

These structs will be passed down to macsec drivers in a coming patch to
make the driver interface cleaner, so they need to be shared between the
core MKA implementation and the drivers.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
8 years agotests: Fix wpas_ctrl_sched_scan_plans without WPA_TRACE
Jouni Malinen [Mon, 3 Oct 2016 08:35:42 +0000 (11:35 +0300)] 
tests: Fix wpas_ctrl_sched_scan_plans without WPA_TRACE

This test case did not clear sched_scan_plans if alloc_fail() resulted
in skipping the test case. This would result in the following
autoscan_exponential and autoscan_periodic test cases failing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoautoscan: Add more debug prints for cases where autoscan is not used
Jouni Malinen [Mon, 3 Oct 2016 08:34:35 +0000 (11:34 +0300)] 
autoscan: Add more debug prints for cases where autoscan is not used

This makes it easier to figure out why autoscan is not used even when
being configured through the control interface.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoThe master branch is now used for v2.7 development
Jouni Malinen [Sun, 2 Oct 2016 19:27:26 +0000 (22:27 +0300)] 
The master branch is now used for v2.7 development

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoChange version number to v2.6 for the release hostap_2_6
Jouni Malinen [Sun, 2 Oct 2016 18:51:11 +0000 (21:51 +0300)] 
Change version number to v2.6 for the release

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Fix cfg80211_tx_frame test
Avraham Stern [Mon, 5 Sep 2016 14:33:11 +0000 (17:33 +0300)] 
tests: Fix cfg80211_tx_frame test

In case that a dedicated P2P Device interface is used, a new interface
must be create for a P2P group. Thus, in order to send mgmt
frames, attach a new WpaSupplicant object to the newly created group
and use this object for sending the frames.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>