]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
7 years agoDPP: Protocol testing to allow missing attributes in peer discovery
Jouni Malinen [Mon, 6 Nov 2017 10:40:18 +0000 (12:40 +0200)] 
DPP: Protocol testing to allow missing attributes in peer discovery

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: sigma_dut and DPP protocol testing
Jouni Malinen [Sun, 5 Nov 2017 22:35:58 +0000 (00:35 +0200)] 
tests: sigma_dut and DPP protocol testing

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: sigma_dut controlled AP as DPP PKEX responder
Jouni Malinen [Sat, 4 Nov 2017 10:32:46 +0000 (12:32 +0200)] 
tests: sigma_dut controlled AP as DPP PKEX responder

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: hostapd as DPP Responder requiring mutual authentication
Jouni Malinen [Sat, 4 Nov 2017 09:29:21 +0000 (11:29 +0200)] 
tests: hostapd as DPP Responder requiring mutual authentication

This verifies the qr=mutual case with STATUS_RESPONSE_PENDING.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Add DPP_LISTEN and DPP_STOP_LISTEN to hostapd
Jouni Malinen [Sat, 4 Nov 2017 09:27:00 +0000 (11:27 +0200)] 
DPP: Add DPP_LISTEN and DPP_STOP_LISTEN to hostapd

This is an initial step in allowing non-operating channel operations
with DPP when hostapd is the Responder. For now, this is only used for
specifying role=configurator/enrollee and qr=mutual cases similarly to
the wpa_supplicant configuration for in Responder role. Request to use a
non-operating channel will be rejected.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoAdd QCA vendor commands for spectral scan
Edayilliam Jayadev [Wed, 25 Oct 2017 08:51:49 +0000 (14:21 +0530)] 
Add QCA vendor commands for spectral scan

Add the following vendor commands and their vendor attributes for
spectral scan.

 1) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CONFIG
        Get current values of spectral parameters.
 2) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_DIAG_STATS
        Get stats for spectral scan debug.
 3) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO
        Get the spectral hardware capability.
 4) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS
        Get the current status of spectral scan.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoP2P: Continue P2P_WAIT_PEER_(IDLE/CONNECT) sequence on a listen cancel
Sunil Dutt [Mon, 9 Oct 2017 14:32:20 +0000 (20:02 +0530)] 
P2P: Continue P2P_WAIT_PEER_(IDLE/CONNECT) sequence on a listen cancel

Some drivers may accept the remain-on-channel command, but instead of
indicating start event for remain-on-channel, just indicate that the
operation has been canceled immediately. This listen cancel from the
WAIT_PEER_CONNECT state ended up in discontinuation of further
WAIT_PEER_IDLE/WAIT_PEER_CONNECT state transitions. Hence, delay the
subsequent IDLE state by 100 ms.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoP2P: ACS offload for the autonomous GO
Sunil Dutt [Mon, 25 Sep 2017 15:56:52 +0000 (21:26 +0530)] 
P2P: ACS offload for the autonomous GO

This commit introduces the ACS functionality for the autonomous GO. The
optional parameter <freq> in p2p_group_add is enhanced to carry a value
"acs" with the intention to select the channels among any supported
band. freq = 2 / 5 carry the need to select the channels only in the
respective bands 2.4 / 5 GHz. This functionality is on top of the host
driver's capability to offload ACS, which is advertized through
WPA_DRIVER_FLAGS_ACS_OFFLOAD.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoAdd new QCA vendor attributes for MAC counters
Zhang Qian [Fri, 29 Sep 2017 02:36:45 +0000 (10:36 +0800)] 
Add new QCA vendor attributes for MAC counters

Add QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_REPORT_TIME
and QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MEASUREMENT_TIME to record
timestamp and duration for the last MAC counters. Some user layer
application is delay sensitive. It needs to know time stamp and
measurment duration for the counters.

Signed-off-by: Zhang Qian <zhangq@qti.qualcomm.com>
7 years agotests: DPP Protocol testing for invalid Config Resp attribute values
Jouni Malinen [Fri, 3 Nov 2017 19:11:25 +0000 (21:11 +0200)] 
tests: DPP Protocol testing for invalid Config Resp attribute values

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Protocol testing for invalid Config Resp attribute values
Jouni Malinen [Fri, 3 Nov 2017 19:11:00 +0000 (21:11 +0200)] 
DPP: Protocol testing for invalid Config Resp attribute values

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP Config Request/Response missing attributes
Jouni Malinen [Fri, 3 Nov 2017 18:59:35 +0000 (20:59 +0200)] 
tests: DPP Config Request/Response missing attributes

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Report Config Request/Response failure reasons on control interface
Jouni Malinen [Fri, 3 Nov 2017 18:58:53 +0000 (20:58 +0200)] 
DPP: Report Config Request/Response failure reasons on control interface

This provides more details of failures to upper layer components.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Protocol testing to remove attributes from Config Req/Resp
Jouni Malinen [Fri, 3 Nov 2017 18:39:00 +0000 (20:39 +0200)] 
DPP: Protocol testing to remove attributes from Config Req/Resp

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP protocol - I/R-auth tag mismatch in PKEX Commit-Reveal
Jouni Malinen [Fri, 3 Nov 2017 18:18:52 +0000 (20:18 +0200)] 
tests: DPP protocol - I/R-auth tag mismatch in PKEX Commit-Reveal

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Protocol testing - invalid I/R-Auth value in PKEX Commit-Reveal
Jouni Malinen [Fri, 3 Nov 2017 18:18:24 +0000 (20:18 +0200)] 
DPP: Protocol testing - invalid I/R-Auth value in PKEX Commit-Reveal

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP protocol - invalid Bootstrap Key in PKEX Commit-Reveal
Jouni Malinen [Fri, 3 Nov 2017 17:58:41 +0000 (19:58 +0200)] 
tests: DPP protocol - invalid Bootstrap Key in PKEX Commit-Reveal

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Protocol testing - invalid Bootstrap Key value in PKEX Commit-Reveal
Jouni Malinen [Fri, 3 Nov 2017 17:54:48 +0000 (19:54 +0200)] 
DPP: Protocol testing - invalid Bootstrap Key value in PKEX Commit-Reveal

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP protocol testing - invalid Status in PKEX Exchange Response
Jouni Malinen [Fri, 3 Nov 2017 17:41:24 +0000 (19:41 +0200)] 
tests: DPP protocol testing - invalid Status in PKEX Exchange Response

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Protocol testing - invalid Status value in PKEX Exchange Response
Jouni Malinen [Fri, 3 Nov 2017 17:33:17 +0000 (19:33 +0200)] 
DPP: Protocol testing - invalid Status value in PKEX Exchange Response

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Move PKEX z derivation on Responder to earlier phase
Jouni Malinen [Fri, 3 Nov 2017 17:24:41 +0000 (19:24 +0200)] 
DPP: Move PKEX z derivation on Responder to earlier phase

K and z can be derived already based on information available at the
time the PKEX Exchange Request is being processed, so move these there
from the PKEX Commit-Reveal Request processing since that matches the
DPP tech spec description close and allows PKEX exchange to be aborted
earlier if anything unexpected happens.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Fix a typo in a debug print
Jouni Malinen [Fri, 3 Nov 2017 17:02:07 +0000 (19:02 +0200)] 
DPP: Fix a typo in a debug print

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Explicitly check that PKEX Qr is not the point-at-infinity
Jouni Malinen [Fri, 3 Nov 2017 17:01:24 +0000 (19:01 +0200)] 
DPP: Explicitly check that PKEX Qr is not the point-at-infinity

This was already done for Qi, but the same needs to be done for Qr as
well.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP and PKEX with mismatching code limit
Jouni Malinen [Fri, 3 Nov 2017 16:55:32 +0000 (18:55 +0200)] 
tests: DPP and PKEX with mismatching code limit

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: PKEX counter t
Jouni Malinen [Fri, 3 Nov 2017 15:49:45 +0000 (17:49 +0200)] 
DPP: PKEX counter t

Add limit on number of failed attempts that could have used PKEX code.
If the limit (5) is reached, drop the PKEX state (including the code)
and report this on the control interface to indicate that a new code
needs to be entered due to possible attack.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP PKEX retry after incorrect PKEX code
Jouni Malinen [Fri, 3 Nov 2017 15:15:08 +0000 (17:15 +0200)] 
tests: DPP PKEX retry after incorrect PKEX code

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Terminate PKEX exchange on detection of a mismatching code
Jouni Malinen [Fri, 3 Nov 2017 15:13:17 +0000 (17:13 +0200)] 
DPP: Terminate PKEX exchange on detection of a mismatching code

Clean up the pending PKEX exchange if Commit-Reveal Request processing
indicates a mismatch in the PKEX code. Previously, the this case was
silently ignored and the session was left in pending state that
prevented new PKEX exchanges from getting initated. Now, a new attempt
is allowed to be initiated.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Use dpp_bn2bin_pad() helper to simplify code
Jouni Malinen [Fri, 3 Nov 2017 14:49:48 +0000 (16:49 +0200)] 
DPP: Use dpp_bn2bin_pad() helper to simplify code

Number of places writing BIGNUM values with left-padding were open
coding this helper functionality unnecessarily.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP and PKEX with mismatching curve
Jouni Malinen [Fri, 3 Nov 2017 14:45:28 +0000 (16:45 +0200)] 
tests: DPP and PKEX with mismatching curve

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: PKEX and STATUS_BAD_GROUP
Jouni Malinen [Fri, 3 Nov 2017 14:43:58 +0000 (16:43 +0200)] 
DPP: PKEX and STATUS_BAD_GROUP

Report mismatching finite cyclic group with PKEX Exchange Response using
STATUS_BAD_GROUP and provide more detailed error report over the control
interface on the peer device when this happens.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Remove obsolete TODO comment on discovery object
Jouni Malinen [Fri, 3 Nov 2017 10:09:15 +0000 (12:09 +0200)] 
DPP: Remove obsolete TODO comment on discovery object

The optional channel information was removed from the discovery object
in the DPP tech spec, so no need to maintain this TODO note anymore.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: WPA+WPA2-PSK/TKIP countermeasures (detected by mixed mode AP)
Jouni Malinen [Fri, 3 Nov 2017 08:52:24 +0000 (10:52 +0200)] 
tests: WPA+WPA2-PSK/TKIP countermeasures (detected by mixed mode AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFix Status Code in TKIP countermeasures case
Jouni Malinen [Fri, 3 Nov 2017 08:49:45 +0000 (10:49 +0200)] 
Fix Status Code in TKIP countermeasures case

The previously used WLAN_REASON_MICHAEL_MIC_FAILURE (14) value as a
response to Authentication frame or (Re)Association Request frame is not
correct since the resp value is encoded in the Status Code (not Reason
Code) field. Status Code 14 is WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION
which is really what this value would have meant in the response frames.

There is no Michael MIC failure status code, so have to use the generic
"Unspecified failure" (1) reason code for these cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP protocol testing - invalid Encrypted Key in PKEX Exchange
Jouni Malinen [Thu, 2 Nov 2017 22:49:35 +0000 (00:49 +0200)] 
tests: DPP protocol testing - invalid Encrypted Key in PKEX Exchange

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Testing capability to generate invalid PKEX encrypted key (M and N)
Jouni Malinen [Thu, 2 Nov 2017 22:42:54 +0000 (00:42 +0200)] 
DPP: Testing capability to generate invalid PKEX encrypted key (M and N)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: Missing attributes in DPP PKEX messages
Jouni Malinen [Thu, 2 Nov 2017 22:14:44 +0000 (00:14 +0200)] 
tests: Missing attributes in DPP PKEX messages

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Report PKEX failure reasons over control interface
Jouni Malinen [Thu, 2 Nov 2017 22:14:02 +0000 (00:14 +0200)] 
DPP: Report PKEX failure reasons over control interface

This provides more information to upper layer software to report failure
reasons on the UI.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Extend protocol testing to cover missing attributes in PKEX
Jouni Malinen [Thu, 2 Nov 2017 21:53:55 +0000 (23:53 +0200)] 
DPP: Extend protocol testing to cover missing attributes in PKEX

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Move PKEX Commit-Reveal Response building to a helper function
Jouni Malinen [Thu, 2 Nov 2017 19:28:58 +0000 (21:28 +0200)] 
DPP: Move PKEX Commit-Reveal Response building to a helper function

This cleans up dpp_pkex_rx_commit_reveal_req() a bit and makes it easier
to add protocol testing functionality to PKEX exchange similarly to the
previously added DPP Authentication case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Move PKEX Commit-Reveal Request building to a helper function
Jouni Malinen [Thu, 2 Nov 2017 19:21:55 +0000 (21:21 +0200)] 
DPP: Move PKEX Commit-Reveal Request building to a helper function

This cleans up dpp_pkex_rx_exchange_resp() a bit and makes it easier to
add protocol testing functionality to PKEX exchange similarly to the
previously added DPP Authentication case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Move PKEX Exchange Response building to a helper function
Jouni Malinen [Thu, 2 Nov 2017 19:13:43 +0000 (21:13 +0200)] 
DPP: Move PKEX Exchange Response building to a helper function

This cleans up dpp_pkex_rx_exchange_req() a bit and makes it easier to
add protocol testing functionality to PKEX exchange similarly to the
previously added DPP Authentication case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Fix couple of typos in debug messages
Jouni Malinen [Thu, 2 Nov 2017 19:34:03 +0000 (21:34 +0200)] 
DPP: Fix couple of typos in debug messages

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Fix hostapd control interface events for initiator case
Jouni Malinen [Thu, 2 Nov 2017 10:23:17 +0000 (12:23 +0200)] 
DPP: Fix hostapd control interface events for initiator case

Incorrect msg_ctx was registered for the wpa_msg() calls from the DPP
module.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP and PKEX with mismatching code
Jouni Malinen [Thu, 2 Nov 2017 10:22:29 +0000 (12:22 +0200)] 
tests: DPP and PKEX with mismatching code

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Report possible PKEX code mismatch in control interface
Jouni Malinen [Thu, 2 Nov 2017 10:21:00 +0000 (12:21 +0200)] 
DPP: Report possible PKEX code mismatch in control interface

Indicate to upper layers if PKEX Commit-Reveal Request frame AES-SIV
decryption fails. That is a likely sign of the PKEX code mismatch
between the devices.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: sigma_dut DPP functionality
Jouni Malinen [Thu, 2 Nov 2017 10:05:37 +0000 (12:05 +0200)] 
tests: sigma_dut DPP functionality

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: Require use of PMF with DPP AKM
Jouni Malinen [Wed, 1 Nov 2017 15:24:18 +0000 (17:24 +0200)] 
tests: Require use of PMF with DPP AKM

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Enable PMF when adding wpa_supplicant network profile
Jouni Malinen [Wed, 1 Nov 2017 15:14:30 +0000 (17:14 +0200)] 
DPP: Enable PMF when adding wpa_supplicant network profile

DPP AKM should really require PMF to be used, but since that is not yet
explicitly required in the specification, make PMF enabled for now. For
legacy PSK cases, configure PMF to be enabled as well to support both
APs in no-PMF, optional-PMF, and required-PMF configuration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFix test build breakage when not compiling with ieee80211w support
Lior David [Wed, 1 Nov 2017 09:10:47 +0000 (11:10 +0200)] 
Fix test build breakage when not compiling with ieee80211w support

Build breakage was introduced by commit
d8afdb210e379f414307778b9711938fbba67f9b ('Allow EAPOL-Key messages 1/4
and 3/4 to be retransmitted for testing') for some
CONFIG_TESTING_OPTIONS=y builds without CONFIG_IEEE80211W=y.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
7 years agotests: New hostapd STATUS/STA values
Jouni Malinen [Tue, 31 Oct 2017 15:10:17 +0000 (17:10 +0200)] 
tests: New hostapd STATUS/STA values

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agohostapd: Add max_txpower into STATUS command
bhagavathi perumal s [Fri, 6 Oct 2017 15:03:25 +0000 (20:33 +0530)] 
hostapd: Add max_txpower into STATUS command

Signed-off-by: bhagavathi perumal s <bperumal@qti.qualcomm.com>
7 years agohostapd: Add Beacon interval and DTIM period into STATUS command
bhagavathi perumal s [Fri, 6 Oct 2017 15:03:25 +0000 (20:33 +0530)] 
hostapd: Add Beacon interval and DTIM period into STATUS command

Signed-off-by: bhagavathi perumal s <bperumal@qti.qualcomm.com>
7 years agohostapd: Add HT/VHT capability info into STATUS command
bhagavathi perumal s [Fri, 6 Oct 2017 15:03:25 +0000 (20:33 +0530)] 
hostapd: Add HT/VHT capability info into STATUS command

Signed-off-by: bhagavathi perumal s <bperumal@qti.qualcomm.com>
7 years agohostapd: Add HT/VHT capability info into STA command
bhagavathi perumal s [Fri, 6 Oct 2017 15:03:25 +0000 (20:33 +0530)] 
hostapd: Add HT/VHT capability info into STA command

Signed-off-by: bhagavathi perumal s <bperumal@qti.qualcomm.com>
7 years agohostapd: Add extended capabilities into STA command
bhagavathi perumal s [Fri, 6 Oct 2017 15:03:25 +0000 (20:33 +0530)] 
hostapd: Add extended capabilities into STA command

Signed-off-by: bhagavathi perumal s <bperumal@qti.qualcomm.com>
7 years agohostapd: Add [HT] flag into STA command
bhagavathi perumal s [Fri, 6 Oct 2017 15:03:25 +0000 (20:33 +0530)] 
hostapd: Add [HT] flag into STA command

Signed-off-by: bhagavathi perumal s <bperumal@qti.qualcomm.com>
7 years agohostapd: Add Min/Max Transmit Power Capability into STA command
bhagavathi perumal s [Fri, 6 Oct 2017 15:03:25 +0000 (20:33 +0530)] 
hostapd: Add Min/Max Transmit Power Capability into STA command

This provides access to the Minimum/Maximum Transmit Power Capabilitie
fileds (the nominal minimum/maximum transmit power with which the STA
is capable of transmitting in the current channel; signed integer in
units of decibels relative to 1 mW).

Signed-off-by: bhagavathi perumal s <bperumal@qti.qualcomm.com>
7 years agoOWE: Add AP mode handling of OWE with drivers that implement SME
Ashok Kumar Ponnaiah [Mon, 30 Oct 2017 21:24:42 +0000 (23:24 +0200)] 
OWE: Add AP mode handling of OWE with drivers that implement SME

Handle OWE DH exchange and key setup when processing the association
event from a driver that implements AP SME.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoCheck hostapd current_mode before dereferencing it in additional places
Ashok Kumar Ponnaiah [Mon, 30 Oct 2017 21:17:05 +0000 (23:17 +0200)] 
Check hostapd current_mode before dereferencing it in additional places

While most places using this should be for cases where the hw_features
functionality is required, there seem to be some paths that are getting
exposed in new OWE related operations where that might not be the case.
Add explicit NULL pointer checks to avoid dereferencing the pointer if
it is not set when operating with driver wrappers that do not provide
sufficient information.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: ap_wpa2_eap_tls_versions to test TLSv1.2 with OpenSSL 1.1
Jouni Malinen [Mon, 30 Oct 2017 10:08:19 +0000 (12:08 +0200)] 
tests: ap_wpa2_eap_tls_versions to test TLSv1.2 with OpenSSL 1.1

Change the test condition from "is OpenSSL 1.0.2" to "is not OpenSSL
1.0.1", so that the TLSv1.2 test step gets executed with OpenSSL 1.0.2
and 1.1 (and newer).

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: WNM Sleep Mode - RSN with PMF and GTK/IGTK workaround
Jouni Malinen [Sun, 29 Oct 2017 15:19:07 +0000 (17:19 +0200)] 
tests: WNM Sleep Mode - RSN with PMF and GTK/IGTK workaround

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoAP-side workaround for WNM-Sleep Mode GTK/IGTK reinstallation issues
Jouni Malinen [Sun, 29 Oct 2017 15:13:54 +0000 (17:13 +0200)] 
AP-side workaround for WNM-Sleep Mode GTK/IGTK reinstallation issues

Normally, WNM-Sleep Mode exit with management frame protection
negotiated would result in the current GTK/IGTK getting added into the
WNM-Sleep Mode Response frame. Some station implementations may have a
vulnerability that results in GTK/IGTK reinstallation based on this
frame being replayed. Add a new hostapd configuration parameter that can
be used to disable that behavior and use EAPOL-Key frames for GTK/IGTK
update instead. This would likely be only used with
wpa_disable_eapol_key_retries=1 that enables a workaround for similar
issues with EAPOL-Key. This is related to station side vulnerabilities
CVE-2017-13087 and CVE-2017-13088. To enable this AP-side workaround,
set wnm_sleep_mode_no_keys=1.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agowpa_auth: Deplete group rekey eloop handler for strict rekeying
Johannes Berg [Wed, 25 Oct 2017 08:06:10 +0000 (10:06 +0200)] 
wpa_auth: Deplete group rekey eloop handler for strict rekeying

When strict group rekeying is in effect, every station that leaves will
cause a rekeying to happen 0.5 s after leaving. However, if a lot of
stations join/leave, the previous code could postpone this rekeying
forever, since it always re-registers the handling with a 0.5 s timeout.

Use eloop_deplete_timeout() to address that, only registering the
timeout from scratch if it wasn't pending.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agotests: WPA2-PSK AP and GTK rekey by AP request
Jouni Malinen [Sun, 29 Oct 2017 15:00:50 +0000 (17:00 +0200)] 
tests: WPA2-PSK AP and GTK rekey by AP request

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoAllow forcing group rekeying for testing purposes
Johannes Berg [Wed, 25 Oct 2017 08:26:10 +0000 (10:26 +0200)] 
Allow forcing group rekeying for testing purposes

In order to test the WoWLAN GTK rekeying KRACK mitigation, add a
REKEY_GTK hostapd control interface command that can be used at certain
points of the test.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agotests: tshark: deal with "wlan_mgt" -> "wlan" rename
Johannes Berg [Tue, 24 Oct 2017 15:11:31 +0000 (17:11 +0200)] 
tests: tshark: deal with "wlan_mgt" -> "wlan" rename

Recent versions of tshark/wireshark renamed these fields, deal
with that in the tshark wrapper code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agotests: DPP authentication exchange with requested different channel
Jouni Malinen [Sun, 29 Oct 2017 14:09:56 +0000 (16:09 +0200)] 
tests: DPP authentication exchange with requested different channel

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Negotiation channel change request from Initiator
Jouni Malinen [Sun, 29 Oct 2017 14:08:02 +0000 (16:08 +0200)] 
DPP: Negotiation channel change request from Initiator

Allow the Initiator to request a different channel to be used for DPP
Authentication and DPP Configuration exchanges. This commit adds support
for this in wpa_supplicant with the optional neg_freq=<freq in MHz>
parameter in DPP_AUTH_INIT.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP network introduction mismatch cases
Jouni Malinen [Sun, 29 Oct 2017 10:44:01 +0000 (12:44 +0200)] 
tests: DPP network introduction mismatch cases

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Allow testing override values to be cleared
Jouni Malinen [Sun, 29 Oct 2017 10:23:34 +0000 (12:23 +0200)] 
DPP: Allow testing override values to be cleared

This allows wpa_supplicant dpp_config_obj_override,
dpp_discovery_override, and dpp_groups_override parameters to be cleared
by setting them to a zero-length value.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Add DPP Status attribute into Peer Discovery Response
Jouni Malinen [Sun, 29 Oct 2017 09:43:41 +0000 (11:43 +0200)] 
DPP: Add DPP Status attribute into Peer Discovery Response

This was added in DPP tech spec v0.2.7 to allow result of network
introduction to be reported.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP protocol testing incorrect I-nonce, R-capab, R-auth, I-auth
Jouni Malinen [Sat, 28 Oct 2017 09:21:00 +0000 (12:21 +0300)] 
tests: DPP protocol testing incorrect I-nonce, R-capab, R-auth, I-auth

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Process Authentication Confirm failure cases
Jouni Malinen [Sat, 28 Oct 2017 14:40:06 +0000 (17:40 +0300)] 
DPP: Process Authentication Confirm failure cases

Process Authentication Confirm with the two failure cases defined in the
spec: STATUS_NOT_COMPATIBLE and STATUS_AUTH_FAILURE. This verifies the
{R-nonce}k2 part and reports more detailed failure reason if the message
is valid.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Send Authentication Confirm failure reports
Jouni Malinen [Sat, 28 Oct 2017 09:06:22 +0000 (12:06 +0300)] 
DPP: Send Authentication Confirm failure reports

If Authentication Response processing fails due to R-capab
incompatibility or R-auth mismatch, send Authentication Confirm with
error status.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Auth Resp/Conf incorrect attribute values for protocol testing
Jouni Malinen [Sat, 28 Oct 2017 08:23:22 +0000 (11:23 +0300)] 
DPP: Auth Resp/Conf incorrect attribute values for protocol testing

This extends the dpp_test mechanism to allow I-nonce, R-capab, R-auth,
and I-auth values in Authentication Response/Confirm to use incorrect
values.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP fallback to non-mutual authentication on Initiator
Jouni Malinen [Mon, 23 Oct 2017 11:20:16 +0000 (14:20 +0300)] 
tests: DPP fallback to non-mutual authentication on Initiator

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Allow Responder to decide not to use mutual authentication
Jouni Malinen [Mon, 23 Oct 2017 11:14:57 +0000 (14:14 +0300)] 
DPP: Allow Responder to decide not to use mutual authentication

Previously, Initiator decided whether to use mutual authentication on
its own based on having own and peer bootstrapping info. This prevented
Responder from selecting not to use mutual authentication in such a
case. Fix this by allowed Initiator to fall back to non-mutual
authentication based on Responder choice if the bootstrapping mechanism
allows this (PKEX does not; it mandates use of mutual authentication).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP protocol testing - Auth Conf attribute omission
Jouni Malinen [Mon, 23 Oct 2017 10:35:03 +0000 (13:35 +0300)] 
tests: DPP protocol testing - Auth Conf attribute omission

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Report Auth Conf failures in control interface
Jouni Malinen [Mon, 23 Oct 2017 10:46:23 +0000 (13:46 +0300)] 
DPP: Report Auth Conf failures in control interface

This is useful for protocol testing purposes and UI needs to display
more detailed information about DPP exchanges.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Omission of Auth Conf attributes for protocol testing
Jouni Malinen [Mon, 23 Oct 2017 10:34:30 +0000 (13:34 +0300)] 
DPP: Omission of Auth Conf attributes for protocol testing

This extends the dpp_test mechanism to allow each of the required
attributes in Authentication Confirm to be omitted.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: DPP protocol testing
Jouni Malinen [Sun, 22 Oct 2017 10:49:57 +0000 (13:49 +0300)] 
tests: DPP protocol testing

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Report invalid messages and failure conditions in control interface
Jouni Malinen [Sun, 22 Oct 2017 14:24:38 +0000 (17:24 +0300)] 
DPP: Report invalid messages and failure conditions in control interface

This is useful for protocol testing purposes and UI needs to display
more detailed information about DPP exchanges.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Omission of Auth Resp attributes for protocol testing
Jouni Malinen [Sun, 22 Oct 2017 19:17:55 +0000 (22:17 +0300)] 
DPP: Omission of Auth Resp attributes for protocol testing

This extends the dpp_test mechanism to allow each of the required
attributes in Authentication Response to be omitted.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Move Authentication Response building into a separate function
Jouni Malinen [Sun, 22 Oct 2017 16:03:23 +0000 (19:03 +0300)] 
DPP: Move Authentication Response building into a separate function

This cleans up old dpp_auth_build_resp() (now dpp_auth_build_resp_ok())
a bit by separating initialization steps for a DPP authentication
session from the code needed to build the frame. This allows
dpp_auth_build_resp_status() to share the helper function instead of
having to maintain a duplicated message construction implementation. In
addition, this makes it easier to remove some of the attributes for
protocol testing purposes.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Omission of Auth Req attributes for protocol testing
Jouni Malinen [Sun, 22 Oct 2017 14:20:24 +0000 (17:20 +0300)] 
DPP: Omission of Auth Req attributes for protocol testing

This extends the dpp_test mechanism to allow each of the required
attributes in Authentication Request to be omitted.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Move Authentication Request building into a separate function
Jouni Malinen [Sun, 22 Oct 2017 14:08:25 +0000 (17:08 +0300)] 
DPP: Move Authentication Request building into a separate function

This cleans up dpp_auth_init() a bit by separating initialization steps
for a DPP authentication session from the code needed to build the
frame. In addition, this makes it easier to remove some of the
attributes for protocol testing purposes.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Explicitly check and reject 0x00 and 0x03 I/R-capab role
Jouni Malinen [Sun, 22 Oct 2017 10:49:01 +0000 (13:49 +0300)] 
DPP: Explicitly check and reject 0x00 and 0x03 I/R-capab role

0x00 and 0x03 are not valid I/R-capabilities role values.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Report transmitted messages as control interface events
Jouni Malinen [Sun, 22 Oct 2017 09:35:06 +0000 (12:35 +0300)] 
DPP: Report transmitted messages as control interface events

This is helpful for testing purposes and also for upper layer components
that may want to show more detailed progress through a DPP exchange.
Both the DPP-TX and DPP-TX-STATUS events are provided.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Report received messages as control interface events
Jouni Malinen [Sun, 22 Oct 2017 09:10:47 +0000 (12:10 +0300)] 
DPP: Report received messages as control interface events

This is helpful for testing purposes and also for upper layer components
that may want to show more detailed progress through a DPP exchange.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Remove unnecessary Wrapped Data checks from callers
Jouni Malinen [Sun, 22 Oct 2017 08:46:12 +0000 (11:46 +0300)] 
DPP: Remove unnecessary Wrapped Data checks from callers

Now that dpp_check_attrs() takes care of verifying that no attributes
are after the Wrapped Data attribute, the duplicated checks in hostapd
and wpa_supplicant side of the implementation can be removed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Verify that Wrapped Data attribute is the last one in the message
Jouni Malinen [Sun, 22 Oct 2017 08:37:56 +0000 (11:37 +0300)] 
DPP: Verify that Wrapped Data attribute is the last one in the message

Do not allow any additional attributes to be included after the Wrapped
Data attribute.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDPP: Protocol testing framework
Jouni Malinen [Sun, 22 Oct 2017 08:15:21 +0000 (11:15 +0300)] 
DPP: Protocol testing framework

Add a generic mechanism for configuring the DPP implementation to behave
in particular different (mostly incorrect) ways for protocol testing
purposes. The new dpp_test parameter can be set to a non-zero integer to
indicate a specific behavior. This is only available in
CONFIG_TESTING_OPTIONS=y builds.

This commit include cases for an extra attribute being added after the
Wrapped Data attribute and Initiator/Responder capabilities having an
unexpected zero capability.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFix a typo in a debug message
Jouni Malinen [Sun, 22 Oct 2017 13:42:58 +0000 (16:42 +0300)] 
Fix a typo in a debug message

This radio_work_free() message was missing the closing parenthesis.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Make sae_invalid_anti_clogging_token_req more robust
Jouni Malinen [Sun, 22 Oct 2017 13:42:33 +0000 (16:42 +0300)] 
tests: Make sae_invalid_anti_clogging_token_req more robust

Beacon more frequently since Probe Request frames are practically ignored
in this test setup (ext_mgmt_frame_handled=1 on hostapd side) and
wpa_supplicant scans may end up getting ignored if no new results are
available due to the missing Probe Response frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoEAP server: Add event messages for more EAP states
Michael Baird [Thu, 28 Sep 2017 05:53:35 +0000 (18:53 +1300)] 
EAP server: Add event messages for more EAP states

While using an external RADIUS server SUCCESS messages were not being
sent (internal was fine). Also add event messages for other states that
others might find useful, and consistency between the two.

Signed-off-by: Michael Baird <Michael.Baird@ecs.vuw.ac.nz>
7 years agotests: Add a script to aid bisecting Linux kernel with hwsim VM
Johannes Berg [Wed, 11 Oct 2017 11:46:17 +0000 (13:46 +0200)] 
tests: Add a script to aid bisecting Linux kernel with hwsim VM

I find myself writing a version of this script every now and
then, but there's little point in that - just add one to the
tree so we can use it again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agoFix a typo in a comment (the variable is ptk, not pkt)
andrekorol [Tue, 17 Oct 2017 11:34:14 +0000 (09:34 -0200)] 
Fix a typo in a comment (the variable is ptk, not pkt)

Signed-off-by: Andre Rossi Korol <anrobits@yahoo.com.br>
7 years agowpa_supplicant: Increase UDP control interface RX buffer
Janusz Dziedzic [Tue, 17 Oct 2017 18:37:29 +0000 (20:37 +0200)] 
wpa_supplicant: Increase UDP control interface RX buffer

Seems like some test cases, e.g., ap_wpa2_psk_ext_retry_msg_3c, require
larger buffer than 256 bytes.

In other case I fail such test cases when run on real HW and using:
CONFIG_CTRL_IFACE=udp-remote

Increase the RX buffer from 256 to 4096 bytes to match the other control
interface cases.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
7 years agotests: WPA2-EAP-FT AP (pull PMK) - wildcard R0KH/R1KH
Jouni Malinen [Sat, 21 Oct 2017 09:00:22 +0000 (12:00 +0300)] 
tests: WPA2-EAP-FT AP (pull PMK) - wildcard R0KH/R1KH

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: hostapd configuration reload modification from file on SIGHUP
Jouni Malinen [Sat, 21 Oct 2017 08:29:45 +0000 (11:29 +0300)] 
tests: hostapd configuration reload modification from file on SIGHUP

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