]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
5 years agoOCV: Add hostapd config parameter
Mathy Vanhoef [Mon, 6 Aug 2018 19:46:25 +0000 (15:46 -0400)] 
OCV: Add hostapd config parameter

Add hostapd.conf parameter ocv to disable or enable Operating Channel
Verification (OCV) support.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
5 years agoOCV: Add build configuration for channel validation support
Mathy Vanhoef [Mon, 6 Aug 2018 19:46:25 +0000 (15:46 -0400)] 
OCV: Add build configuration for channel validation support

Add compilation flags for Operating Channel Verification (OCV) support.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
5 years agoOCV: Protocol definitions
Mathy Vanhoef [Mon, 6 Aug 2018 19:46:25 +0000 (15:46 -0400)] 
OCV: Protocol definitions

Define protocol identifiers for Operating Channel Verification (OCV)
based on IEEE P802.11-REVmd/D2.0.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
5 years agoStore the VHT Operation element of an associated STA
Mathy Vanhoef [Mon, 6 Aug 2018 19:46:24 +0000 (15:46 -0400)] 
Store the VHT Operation element of an associated STA

APs and mesh peers use the VHT Operation element to advertise certain
channel properties (e.g., the bandwidth of the channel). Save this
information element so we can later access this information.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
5 years agoAdd functions to convert channel bandwidth to an integer
Mathy Vanhoef [Mon, 6 Aug 2018 19:46:23 +0000 (15:46 -0400)] 
Add functions to convert channel bandwidth to an integer

This adds two utility functions to convert both operating classes and
and the chan_width enum to an integer representing the channel
bandwidth. This can then be used to compare bandwidth parameters in an
uniform manner.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
5 years agoAdd utility function to derive operating class and channel
Mathy Vanhoef [Mon, 6 Aug 2018 19:46:22 +0000 (15:46 -0400)] 
Add utility function to derive operating class and channel

This function can be used to easily convert the parameters returned
by the channel_info driver API, into their corresponding operating
class and channel number.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
5 years agoMake channel_info available to authenticator
Mathy Vanhoef [Mon, 6 Aug 2018 19:46:21 +0000 (15:46 -0400)] 
Make channel_info available to authenticator

This adds the necessary functions and callbacks to make the channel_info
driver API available to the authenticator state machine that implements
the 4-way and group key handshake. This is needed for OCV.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
5 years agoMake channel_info available to the supplicant state machine
Mathy Vanhoef [Mon, 6 Aug 2018 19:46:20 +0000 (15:46 -0400)] 
Make channel_info available to the supplicant state machine

This adds the necessary functions and callbacks to make the channel_info
driver API available to the supplicant state machine that implements the
4-way and group key handshake. This is needed for OCV.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
5 years agoAdd driver API to get current channel parameters
Mathy Vanhoef [Mon, 6 Aug 2018 19:46:19 +0000 (15:46 -0400)] 
Add driver API to get current channel parameters

This adds driver API functions to get the current operating channel
parameters. This encompasses the center frequency, channel bandwidth,
frequency segment 1 index (for 80+80 channels), and so on.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
5 years agoHS 2.0 server: Allow policy to be set for SIM provisioning
Jouni Malinen [Sun, 16 Dec 2018 16:33:11 +0000 (18:33 +0200)] 
HS 2.0 server: Allow policy to be set for SIM provisioning

A new osu_config field "sim_policy" can now be used to specify the
policy template for SIM provisioning.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: SIM provisioning exchange
Jouni Malinen [Sat, 15 Dec 2018 16:00:12 +0000 (18:00 +0200)] 
HS 2.0 server: SIM provisioning exchange

Support SIM provisioning exchange with SPP. This uses the
hotspot2dot0-mobile-identifier-hash value from the AAA server to allow
subscription registration through subscription remediation exchange.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Hotspot 2.0 AAA server behavior for SIM provisioning
Jouni Malinen [Fri, 14 Dec 2018 13:57:51 +0000 (15:57 +0200)] 
tests: Hotspot 2.0 AAA server behavior for SIM provisioning

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: RADIUS server support for SIM provisioning
Jouni Malinen [Fri, 14 Dec 2018 13:58:13 +0000 (15:58 +0200)] 
HS 2.0 server: RADIUS server support for SIM provisioning

This adds support for hostapd-as-RADIUS-authentication-server to request
subscription remediation for SIM-based credentials. The new hostapd.conf
parameter hs20_sim_provisioning_url is used to set the URL prefix for
the remediation server for SIM provisioning. The random
hotspot2dot0-mobile-identifier-hash value will be added to the end of
this URL prefix and the same value is stored in a new SQLite database
table sim_provisioning for the subscription server implementation to
use.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoEAP: Make method and IMSI available from server structures
Jouni Malinen [Fri, 14 Dec 2018 13:56:16 +0000 (15:56 +0200)] 
EAP: Make method and IMSI available from server structures

Expose EAP method and IMSI from the completed (or ongoing) EAP
authentication session. These are needed for implementing Hotspot 2.0
SIM provisioning.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWMM AC: Fix a typo in a comment
Jouni Malinen [Sat, 8 Dec 2018 14:50:42 +0000 (16:50 +0200)] 
WMM AC: Fix a typo in a comment

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoWMM AC: Do not write ERROR level log entries when WMM AC is not in use
Jouni Malinen [Sat, 8 Dec 2018 14:48:33 +0000 (16:48 +0200)] 
WMM AC: Do not write ERROR level log entries when WMM AC is not in use

These two wpa_printf() calls with MSG_ERROR level could be reached when
connecting without (Re)Association Response frame elements being
available. That would be the case for wired connections and IBSS. Those
cases are not supposed to use WMM AC in the first place, so do not
confuse logs with ERROR messages in them for normal conditions.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: wpa_supplicant config file writing and key_mgmt values
Jouni Malinen [Sat, 8 Dec 2018 14:14:42 +0000 (16:14 +0200)] 
tests: wpa_supplicant config file writing and key_mgmt values

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoOWE: Fix OWE network profile saving
Jouni Malinen [Sat, 8 Dec 2018 14:26:17 +0000 (16:26 +0200)] 
OWE: Fix OWE network profile saving

key_mgmt=OWE did not have a config parameter writer and wpa_supplicant
was unable to save such a network profile correctly. Fix this by adding
the needed parameter writer.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoDPP: Support DPP key_mgmt saving to wpa_supplicant configuration
Damodaran, Rohit (Contractor) [Wed, 5 Dec 2018 11:20:43 +0000 (11:20 +0000)] 
DPP: Support DPP key_mgmt saving to wpa_supplicant configuration

In the existing code, there was no "DPP" string available to the DPP key
management type for configuration parser of wpa supplicant. When the
configuration is saved, the key management string was left out from the
config file. Fix this by adding support for writing key_mgmt=DPP option.

Signed-off-by: Rohit Damodaran <Rohit_Damodaran@comcast.com>
5 years agotests: Remove parallel-vm.sh
Jouni Malinen [Sat, 8 Dec 2018 13:35:47 +0000 (15:35 +0200)] 
tests: Remove parallel-vm.sh

parallel-vm.py has obsoleted this a long time ago and there is no need
to maintain two scripts for doing more or less the same thing.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: Add dfs_etsi to the long_tests list
Jouni Malinen [Sat, 8 Dec 2018 13:33:31 +0000 (15:33 +0200)] 
tests: Add dfs_etsi to the long_tests list

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoHS 2.0: Fix PMF-in-use check for ANQP Venue URL processing
Jouni Malinen [Sat, 8 Dec 2018 11:57:51 +0000 (13:57 +0200)] 
HS 2.0: Fix PMF-in-use check for ANQP Venue URL processing

The previous implementation did not check that we are associated with
the sender of the GAS response before checking for PMF status. This
could have accepted Venue URL when not in associated state. Fix this by
explicitly checking for association with the responder first.

This fixes an issue that was detected, e.g., with these hwsim test case
sequences:
gas_anqp_venue_url_pmf gas_anqp_venue_url
gas_prot_vs_not_prot gas_anqp_venue_url

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Hotspot 2.0 connection attempt without PMF
Jouni Malinen [Sat, 8 Dec 2018 11:41:50 +0000 (13:41 +0200)] 
tests: Hotspot 2.0 connection attempt without PMF

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Enable PMF automatically for Hotspot 2.0 network profiles
Jouni Malinen [Sat, 8 Dec 2018 10:46:56 +0000 (12:46 +0200)] 
HS 2.0: Enable PMF automatically for Hotspot 2.0 network profiles

Hotspot 2.0 Release 2 requires PMF to be negotiated, so enable this by
default in the network profiles created from cred blocks.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Reject Hotspot 2.0 Rel 2 or newer association without PMF
Jouni Malinen [Sat, 8 Dec 2018 10:20:33 +0000 (12:20 +0200)] 
HS 2.0: Reject Hotspot 2.0 Rel 2 or newer association without PMF

Hotspot 2.0 Rel 2 requires PMF to be enabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Fix ap_hs20_deauth_req_without_pmf
Jouni Malinen [Sat, 8 Dec 2018 11:08:04 +0000 (13:08 +0200)] 
tests: Fix ap_hs20_deauth_req_without_pmf

Now that hostapd starts mandating PMF for Hotspot 2.0 Release 2
association, this test case needs some more tweaks to work. Hardcode
Hotspot 2.0 Release 1 to be used and disable PMF explicitly.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Fix ap_hs20_ft with PMF enabled
Jouni Malinen [Sat, 8 Dec 2018 11:26:50 +0000 (13:26 +0200)] 
tests: Fix ap_hs20_ft with PMF enabled

The Beacon loss event was not reported anymore, so remove that as an
unnecessary step in the test case. In addition, check the key_mgmt
values explicitly.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Enable PMF in ap_hs20_unexpected configuration
Jouni Malinen [Sat, 8 Dec 2018 11:14:11 +0000 (13:14 +0200)] 
tests: Enable PMF in ap_hs20_unexpected configuration

This is needed to meet the Hotspot 2.0 Release 2 requirement for the
third station that is actually using RSN.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Enable PMF in ap_hs20_external_selection network profile
Jouni Malinen [Sat, 8 Dec 2018 11:01:47 +0000 (13:01 +0200)] 
tests: Enable PMF in ap_hs20_external_selection network profile

This is required for Hotspot 2.0 Release 2.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Allocate enough buffer for HS 2.0 Indication element for scan
Jouni Malinen [Fri, 7 Dec 2018 23:11:44 +0000 (01:11 +0200)] 
HS 2.0: Allocate enough buffer for HS 2.0 Indication element for scan

The HS 2.0 Indication element can be up to 9 octets in length, so add
two more octets to the minimum extra_ie buffer size for scanning.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Hotspot 2.0 release number indication
Jouni Malinen [Fri, 7 Dec 2018 23:09:44 +0000 (01:09 +0200)] 
tests: Hotspot 2.0 release number indication

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Update Hotspot 2.0 release number expectation to 3
Jouni Malinen [Sat, 8 Dec 2018 10:59:25 +0000 (12:59 +0200)] 
tests: Update Hotspot 2.0 release number expectation to 3

Match the implementation change to fix the test cases that verified a
specific Hotspot 2.0 release number indication.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Update supported release number to 3
Jouni Malinen [Fri, 7 Dec 2018 22:55:01 +0000 (00:55 +0200)] 
HS 2.0: Update supported release number to 3

Release 3 functionality is included, so start advertising support for
that release.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: As a STA, do not indicate release number greater than the AP
Jouni Malinen [Fri, 7 Dec 2018 22:51:04 +0000 (00:51 +0200)] 
HS 2.0: As a STA, do not indicate release number greater than the AP

Hotspot 2.0 tech spec mandates mobile device to not indicate a release
number that is greater than the release number advertised by the AP. Add
this constraint to the HS 2.0 Indication element when adding this into
(Re)Association Request frame. The element in the Probe Request frame
continues to show the station's latest supported release number.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Allow Hotspot 2.0 release number to be configured
Jouni Malinen [Fri, 7 Dec 2018 22:39:00 +0000 (00:39 +0200)] 
HS 2.0: Allow Hotspot 2.0 release number to be configured

The new hostapd configuration parameter hs20_release can be used to
configure the AP to advertise a specific Hotspot 2.0 release number
instead of the latest supported release. This is mainly for testing
purposes.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFILS: Do not process FILS HLP request again while previous one is pending
Jouni Malinen [Fri, 7 Dec 2018 14:03:40 +0000 (16:03 +0200)] 
FILS: Do not process FILS HLP request again while previous one is pending

It is better not to process a new (most likely repeated) FILS HLP
request if a station retransmits (Re)Association Request frame before
the previous HLP response has either been received or timed out. The
previous implementation ended up doing this and also ended up
rescheduling the fils_hlp_timeout timer in a manner that prevented the
initial timeout from being reached if the STA continued retransmitting
the frame. This could result in failed association due to a timeout on
the station side.

Make this more robust by processing (and relaying to the server) the HLP
request once and then ignoring any new HLP request while the response
for the relayed request is still pending. The new (Re)Association
Request frames are otherwise processed, but they do not result in actual
state change on the AP side before the HLP process from the first
pending request is completed.

This fixes hwsim test case fils_sk_hlp_oom failures with unmodified
mac80211 implementation (i.e., with a relatively short retransmission
timeout for (Re)Association Request frame).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agohostapd: Update HE Capabilities and Operation element definition
Peng Xu [Wed, 28 Nov 2018 18:50:34 +0000 (10:50 -0800)] 
hostapd: Update HE Capabilities and Operation element definition

Update HE Capabilities/Operation element definition based on IEEE
P802.11ax/D3.0.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoMove send_probe_response parameter to BSS specific items
Jouni Malinen [Fri, 7 Dec 2018 11:07:36 +0000 (13:07 +0200)] 
Move send_probe_response parameter to BSS specific items

This can be more convenient for testing Multiple BSSID functionality.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDefine spectral scaling parameters as QCA vendor specific attributes
Edayilliam Jayadev [Mon, 5 Nov 2018 10:19:34 +0000 (15:49 +0530)] 
Define spectral scaling parameters as QCA vendor specific attributes

Add spectral scaling parameters as vendor attributes to the
QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO vendor subcommand.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Connect to WPS AP with NFC connection handover (local failure)
Jouni Malinen [Tue, 4 Dec 2018 18:55:20 +0000 (20:55 +0200)] 
tests: Connect to WPS AP with NFC connection handover (local failure)

This is a regression test case for a potential NULL pointer
dereferencing fixed in the previous commit.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWPS NFC: Fix potential NULL pointer dereference on an error path
Yu Ouyang [Mon, 3 Dec 2018 06:18:53 +0000 (14:18 +0800)] 
WPS NFC: Fix potential NULL pointer dereference on an error path

The NFC connection handover specific case of WPS public key generation
did not verify whether the two wpabuf_dup() calls succeed. Those may
return NULL due to an allocation failure and that would result in a NULL
pointer dereference in dh5_init_fixed().

Fix this by checking memory allocation results explicitly. If either of
the allocations fail, do not try to initialize wps->dh_ctx and instead,
report the failure through the existing error case handler below.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org
5 years agoHS 2.0 server: Fix couple of memory leaks
Jouni Malinen [Tue, 4 Dec 2018 12:12:44 +0000 (14:12 +0200)] 
HS 2.0 server: Fix couple of memory leaks

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Client certificate reenrollment
Jouni Malinen [Tue, 4 Dec 2018 12:11:39 +0000 (14:11 +0200)] 
HS 2.0 server: Client certificate reenrollment

This adds support for the SPP server to request certificate reenrollment
and for the EST server to support the simplereenroll version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Document client certificate related Apache configuration
Jouni Malinen [Mon, 3 Dec 2018 22:15:04 +0000 (00:15 +0200)] 
HS 2.0 server: Document client certificate related Apache configuration

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Clear remediation requirement for certificate credentials
Jouni Malinen [Mon, 3 Dec 2018 22:11:37 +0000 (00:11 +0200)] 
HS 2.0 server: Clear remediation requirement for certificate credentials

Previous implementation updated user database only for username/password
credentials. While client certificates do not need the updated password
to be written, they do need the remediation requirement to be cleared,
so fix that.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Do not set phase2=1 for certificate-based users
Jouni Malinen [Mon, 3 Dec 2018 21:45:32 +0000 (23:45 +0200)] 
HS 2.0 server: Do not set phase2=1 for certificate-based users

These are not really using Phase 2, so use more appropriate
configuration when going through online signup for client certificates.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Include phase2=0 users for TLS in the user list
Jouni Malinen [Mon, 3 Dec 2018 21:38:20 +0000 (23:38 +0200)] 
HS 2.0 server: Include phase2=0 users for TLS in the user list

EAP-TLS users are not really using phase2, so do not require the
database to be set in a way that claim that inaccurately.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoEAP-TLS server: Update user information based on serial number
Jouni Malinen [Mon, 3 Dec 2018 21:29:56 +0000 (23:29 +0200)] 
EAP-TLS server: Update user information based on serial number

This allows EAP user database entries for "cert-<serial number>" to be
used for client certificate based parameters when using EAP-TLS. This
commit addresses only the full authentication case and TLS session
resumption is not yet covered.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoVLAN: Warn about interface name truncation
Jouni Malinen [Mon, 3 Dec 2018 10:44:11 +0000 (12:44 +0200)] 
VLAN: Warn about interface name truncation

Add more snprintf checks to make it clearer if some of the ifname
constructions would end up being too long.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoFT: Fix CONFIG_IEEE80211X=y build without CONFIG_FILS=y
Jouni Malinen [Mon, 3 Dec 2018 10:00:26 +0000 (12:00 +0200)] 
FT: Fix CONFIG_IEEE80211X=y build without CONFIG_FILS=y

remove_ie() was defined within an ifdef CONFIG_FILS block while it is
now needed even without CONFIG_FILS=y. Remove the CONFIG_FILS condition
there.

Fixes 8c41734e5de1 ("FT: Fix Reassociation Request IEs during FT protocol")
Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoThe master branch is now used for v2.8 development
Jouni Malinen [Sun, 2 Dec 2018 20:55:28 +0000 (22:55 +0200)] 
The master branch is now used for v2.8 development

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoUpdate version to v2.7 and copyright years to include 2018 hostap_2_7
Jouni Malinen [Sun, 2 Dec 2018 18:56:31 +0000 (20:56 +0200)] 
Update version to v2.7 and copyright years to include 2018

Also add the ChangeLog entries for both hostapd and wpa_supplicant to
describe main changes between v2.6 and v2.7.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoUncomment CONFIG_LIBNL32=y in defconfig
Jouni Malinen [Sun, 2 Dec 2018 19:25:08 +0000 (21:25 +0200)] 
Uncomment CONFIG_LIBNL32=y in defconfig

libnl 3.2 release is much more likely to be used nowadays than the
versions using the older API, so uncomment this in wpa_supplicant and
hostapd defconfig.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: Opportunistic Wireless Encryption association rejection handling
Jouni Malinen [Sun, 2 Dec 2018 18:34:42 +0000 (20:34 +0200)] 
tests: Opportunistic Wireless Encryption association rejection handling

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoOWE: Try another group only on association rejection with status 77
Ashok Kumar [Thu, 1 Nov 2018 11:03:21 +0000 (16:33 +0530)] 
OWE: Try another group only on association rejection with status 77

Do not change the OWE group if association is rejected for any other
reason than WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED to avoid
unnecessary latency in cases where the APs reject association, e.g., for
load balancing reasons.

Signed-off-by: Ashok Kumar <aponnaia@codeaurora.org>
5 years agoOWE: Fix association rejection behavior
Jouni Malinen [Sun, 2 Dec 2018 18:21:21 +0000 (20:21 +0200)] 
OWE: Fix association rejection behavior

If association failed for any non-OWE specific reason, the previous
implementation tried to add the OWE related IEs into the (Re)Association
Response frame. This is not needed and could actually result in
dereferencing a NULL pointer. Fix this by adding those OWE related IEs
only for successful association and only if the RSN state machine has
been initialized.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agonl80211: Debug print TX queue parameter values and result
Jouni Malinen [Sun, 2 Dec 2018 17:50:59 +0000 (19:50 +0200)] 
nl80211: Debug print TX queue parameter values and result

Some mac80211_hwsim test cases have failed with mysterious sequence
where mac80211 has claimed the parameters are invalid ("wlan3: invalid
CW_min/CW_max: 9484/40"). Those values look strange since they are not
from hostapd configuration or default values.. hostapd is seeing TX
queue parameter set failing for queues 0, 1, and 3 (but not 2) for these
cases. Add debug prints to hostapd to get more details on what exactly
is happening if such error cases can be reproduced.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP network addition failure
Jouni Malinen [Sun, 2 Dec 2018 15:17:50 +0000 (17:17 +0200)] 
tests: DPP network addition failure

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP and continue listen state
Jouni Malinen [Sun, 2 Dec 2018 15:04:21 +0000 (17:04 +0200)] 
tests: DPP and continue listen state

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoDPP: Remove unused wpas_dpp_remain_on_channel_cb()
Jouni Malinen [Sun, 2 Dec 2018 15:03:13 +0000 (17:03 +0200)] 
DPP: Remove unused wpas_dpp_remain_on_channel_cb()

This function was apparently never used at all.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP_BOOTSTRAP_GEN/REMOVE/GET_URI/INFO error cases
Jouni Malinen [Sun, 2 Dec 2018 14:37:46 +0000 (16:37 +0200)] 
tests: DPP_BOOTSTRAP_GEN/REMOVE/GET_URI/INFO error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP and unknown configurator id
Jouni Malinen [Sun, 2 Dec 2018 14:08:29 +0000 (16:08 +0200)] 
tests: DPP and unknown configurator id

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP and PKEX with local failure in processing Commit Reveal Req
Jouni Malinen [Sun, 2 Dec 2018 10:52:32 +0000 (12:52 +0200)] 
tests: DPP and PKEX with local failure in processing Commit Reveal Req

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP and PKEX with local failure in processing Exchange Resp
Jouni Malinen [Sun, 2 Dec 2018 10:44:13 +0000 (12:44 +0200)] 
tests: DPP and PKEX with local failure in processing Exchange Resp

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP and PKEX with mismatching curve (local failure)
Jouni Malinen [Sun, 2 Dec 2018 10:39:05 +0000 (12:39 +0200)] 
tests: DPP and PKEX with mismatching curve (local failure)

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP PKEX identifier combinations
Jouni Malinen [Sun, 2 Dec 2018 10:32:17 +0000 (12:32 +0200)] 
tests: DPP PKEX identifier combinations

Check behavior with valid and invalid identifier combinations.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoDPP: Do not reply to PKEX request with identifier if no local identifier
Jouni Malinen [Sun, 2 Dec 2018 10:30:11 +0000 (12:30 +0200)] 
DPP: Do not reply to PKEX request with identifier if no local identifier

The reverse case (local identifier configured but no identifier
received) was already covered, but PKEX is not going to complete
successfully if there is any difference in identifier configuration, so
ignore this other case as well. This avoids unnecessary responses to
PKEX requests with identifier from a device that is ready for PKEX in
general, but not for that particular request.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: SAE and password identifier with FFC
Jouni Malinen [Sun, 2 Dec 2018 09:56:04 +0000 (11:56 +0200)] 
tests: SAE and password identifier with FFC

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP peer introduction local failures
Jouni Malinen [Sat, 1 Dec 2018 23:20:30 +0000 (01:20 +0200)] 
tests: DPP peer introduction local failures

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP peer introduction failures
Jouni Malinen [Sat, 1 Dec 2018 22:44:42 +0000 (00:44 +0200)] 
tests: DPP peer introduction failures

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoDPP: Apply testing configuration option to signing of own config
Jouni Malinen [Sat, 1 Dec 2018 22:26:21 +0000 (00:26 +0200)] 
DPP: Apply testing configuration option to signing of own config

Previous implementation had missed this case of setting configurator
parameters.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP own config signing failure
Jouni Malinen [Sat, 1 Dec 2018 22:10:08 +0000 (00:10 +0200)] 
tests: DPP own config signing failure

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP invalid configurator key
Jouni Malinen [Sat, 1 Dec 2018 21:50:24 +0000 (23:50 +0200)] 
tests: DPP invalid configurator key

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: DPP legacy parameters local failure
Jouni Malinen [Sat, 1 Dec 2018 18:22:53 +0000 (20:22 +0200)] 
tests: DPP legacy parameters local failure

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: Radio measurement capability with roaming
Jouni Malinen [Sat, 1 Dec 2018 18:15:50 +0000 (20:15 +0200)] 
tests: Radio measurement capability with roaming

This verifies that radio measurement capabilities are negotiated
correctly for the reassociation cases with and without FT.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoFT: Fix Reassociation Request IEs during FT protocol
Jouni Malinen [Sat, 1 Dec 2018 18:10:54 +0000 (20:10 +0200)] 
FT: Fix Reassociation Request IEs during FT protocol

The previous implementation ended up replacing all pending IEs prepared
for Association Request frame with the FT specific IEs (RSNE, MDE, FTE)
when going through FT protocol reassociation with the wpa_supplicant
SME. This resulted in dropping all other IEs that might have been
prepared for the association (e.g., Extended Capabilities, RM Enabled
Capabilities, Supported Operating Classes, vendor specific additions).

Fix this by replacing only the known FT specific IEs with the
appropriate values for FT protocol while maintaining other already
prepared elements.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: Do not generate /tmp/hwsim-tests-*.tar.gz in VM case
Jouni Malinen [Sat, 1 Dec 2018 14:44:53 +0000 (16:44 +0200)] 
tests: Do not generate /tmp/hwsim-tests-*.tar.gz in VM case

There is no point in building this tarball in /tmp that is on the
ramdisk of the VM since it will go away when the VM exits.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoUse more consistent Action frame RX handling in both AP mode paths
Jouni Malinen [Sat, 1 Dec 2018 11:19:47 +0000 (13:19 +0200)] 
Use more consistent Action frame RX handling in both AP mode paths

Both handle_action() and hostapd_action_rx() are used for processing
received Action frames depending on what type of driver architecture is
used (MLME in hostapd vs. driver) and which build options were used to
build hostapd. These functions had a bit different sequence for checking
the frame and printing debug prints. Make those more consistent by
checking that the frame includes the category-specific action field and
some payload. Add a debug print for both functions to make it easier to
see which path various Action frames use.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoFT: Check session_timeout pointer consistently
Jouni Malinen [Fri, 30 Nov 2018 19:07:19 +0000 (21:07 +0200)] 
FT: Check session_timeout pointer consistently

Avoid smatch warning on this even thought the only caller of the
function uses a non-NULL pointer in all cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFix hostapd testing functionality for setting key/seq
Jouni Malinen [Fri, 30 Nov 2018 19:03:08 +0000 (21:03 +0200)] 
Fix hostapd testing functionality for setting key/seq

Use sizeof() correctly on seq[].

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoEAP DB: Use NULL to clear a pointer
Jouni Malinen [Fri, 30 Nov 2018 16:00:31 +0000 (18:00 +0200)] 
EAP DB: Use NULL to clear a pointer

Avoid a sparse warning from use of a plain integer.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Check own_bi/peer_bi pointers more consistently
Jouni Malinen [Fri, 30 Nov 2018 15:57:35 +0000 (17:57 +0200)] 
DPP: Check own_bi/peer_bi pointers more consistently

This gets rid of smatch warnings about a dereference before check.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFix indentation level
Jouni Malinen [Fri, 30 Nov 2018 15:56:56 +0000 (17:56 +0200)] 
Fix indentation level

This gets rid of smatch warnings about inconsistent indenting.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOpenSSL: Include sha512.h to match function prototypes
Jouni Malinen [Fri, 30 Nov 2018 15:38:35 +0000 (17:38 +0200)] 
OpenSSL: Include sha512.h to match function prototypes

This gets rid of sparse warnings.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agomacsec_linux: Make create_transmit_sc() handler use matching arguments
Jouni Malinen [Fri, 30 Nov 2018 15:36:46 +0000 (17:36 +0200)] 
macsec_linux: Make create_transmit_sc() handler use matching arguments

The currently unused conf_offset parameter used a mismatching type (enum
vs. unsigned int) compared to the prototype.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agomacsec_linux: Use NULL to clear a pointer
Jouni Malinen [Fri, 30 Nov 2018 15:32:35 +0000 (17:32 +0200)] 
macsec_linux: Use NULL to clear a pointer

Avoid a sparse warning from use of a plain integer.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agomacsec_qca: Mark macsec_qca_set_transmit_next_pn() static
Jouni Malinen [Fri, 30 Nov 2018 15:31:30 +0000 (17:31 +0200)] 
macsec_qca: Mark macsec_qca_set_transmit_next_pn() static

This function is not used outside this C file. Mark it static to avoid a
warning from sparse.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoSAE: Fix external authentication on big endian platforms
Ashok Ponnaiah [Fri, 30 Nov 2018 15:26:26 +0000 (17:26 +0200)] 
SAE: Fix external authentication on big endian platforms

Need to handle the little endian 16-bit fields properly when building
and parsing Authentication frames.

Fixes: 5ff39c1380d9 ("SAE: Support external authentication offload for driver-SME cases")
Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
5 years agotests: DPP invalid legacy parameters
Jouni Malinen [Fri, 30 Nov 2018 15:17:03 +0000 (17:17 +0200)] 
tests: DPP invalid legacy parameters

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Reject invalid no-psk/pass legacy configurator parameters
Jouni Malinen [Fri, 30 Nov 2018 15:14:49 +0000 (17:14 +0200)] 
DPP: Reject invalid no-psk/pass legacy configurator parameters

Instead of going through the configuration exchange, reject invalid
legacy configurator parameters explicitly. Previously, configuring
legacy (psk/sae) parameters without psk/pass resulted in a config object
that used a zero length passphrase. With this change, that config object
is not sent and instead, either the initialization attempts is rejected
or the incoming initialization attempt is ignored.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: DPP protocol testing - Auth Conf RX processing failure
Jouni Malinen [Fri, 30 Nov 2018 12:21:35 +0000 (14:21 +0200)] 
tests: DPP protocol testing - Auth Conf RX processing failure

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: DPP Auth Resp AES-SIV issue
Jouni Malinen [Fri, 30 Nov 2018 12:10:12 +0000 (14:10 +0200)] 
tests: DPP Auth Resp AES-SIV issue

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: More DPP incompatible roles coverage
Jouni Malinen [Fri, 30 Nov 2018 11:46:15 +0000 (13:46 +0200)] 
tests: More DPP incompatible roles coverage

Cover the Configurator/Configurator case in addition Enrollee/Enrollee.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: DPP and Auth Resp(status) build failure
Jouni Malinen [Fri, 30 Nov 2018 11:39:19 +0000 (13:39 +0200)] 
tests: DPP and Auth Resp(status) build failure

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: DPP bootstrap key autogen issues
Jouni Malinen [Fri, 30 Nov 2018 11:30:08 +0000 (13:30 +0200)] 
tests: DPP bootstrap key autogen issues

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOWE: Fix a compiler warning in non-testing build
Jouni Malinen [Tue, 27 Nov 2018 18:49:53 +0000 (20:49 +0200)] 
OWE: Fix a compiler warning in non-testing build

The new conf variable was used only within the CONFIG_TESTING_OPTIONS
block and as such, added a warning about unused variable into
non-testing builds. Fix that by using that variable outside the
conditional block as well.

Fixes: a22e235fd0df ("OWE: Add testing RSNE for OWE assoc response with driver SME/MLME")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: DPP protocol testing cases for Auth Resp status-not-OK cases
Jouni Malinen [Tue, 27 Nov 2018 15:21:22 +0000 (17:21 +0200)] 
tests: DPP protocol testing cases for Auth Resp status-not-OK cases

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Fix no-Status protocol testing in Auth Resp error case
Jouni Malinen [Tue, 27 Nov 2018 15:20:41 +0000 (17:20 +0200)] 
DPP: Fix no-Status protocol testing in Auth Resp error case

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Additional DPP AES-SIV local failure coverage
Jouni Malinen [Tue, 27 Nov 2018 15:00:24 +0000 (17:00 +0200)] 
tests: Additional DPP AES-SIV local failure coverage

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: DPP QR Code and keygen failure
Jouni Malinen [Tue, 27 Nov 2018 14:50:36 +0000 (16:50 +0200)] 
tests: DPP QR Code and keygen failure

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>