]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
6 years agowlantest: Do not ignore RSN/WPA/OSEN element before full BSS info
Jouni Malinen [Tue, 14 Nov 2017 10:55:48 +0000 (12:55 +0200)] 
wlantest: Do not ignore RSN/WPA/OSEN element before full BSS info

wlantest used to ignore RSN/WPA/OSEN element in (Re)Association Request
frame if no Beacon frame had been seen from the AP before the
association exchange. This could result in not being able to derive keys
properly. Work around this by skipping that step if the BSS entry is not
yet complete.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agowlantest: Remove unnecessary duplication of tk_len from STA entries
Jouni Malinen [Tue, 14 Nov 2017 10:54:45 +0000 (12:54 +0200)] 
wlantest: Remove unnecessary duplication of tk_len from STA entries

The length of the TK is available within struct wpa_ptk, so there is no
need to try to maintain it separately in wlantest.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoReject PMK-to-PTK derivation with unsupported cipher
Jouni Malinen [Tue, 14 Nov 2017 10:50:30 +0000 (12:50 +0200)] 
Reject PMK-to-PTK derivation with unsupported cipher

There should be no wpa_pmk_to_ptk() calls with the cipher argument
indicating a cipher that is not allowed as a pairwise cipher. However,
it looks like that was possible to happen with wlantest. Check for this
corner case explicitly to avoid generating confusing debug logs.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: sigma_dut DPP/QR (mutual) responder (response pending sequence)
Jouni Malinen [Mon, 13 Nov 2017 17:16:35 +0000 (19:16 +0200)] 
tests: sigma_dut DPP/QR (mutual) responder (response pending sequence)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: sigma_dut DPP/QR responder (channel list override)
Jouni Malinen [Mon, 13 Nov 2017 16:44:24 +0000 (18:44 +0200)] 
tests: sigma_dut DPP/QR responder (channel list override)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP protocol testing - Auth Conf replaced by Res
Jouni Malinen [Mon, 13 Nov 2017 10:55:34 +0000 (12:55 +0200)] 
tests: DPP protocol testing - Auth Conf replaced by Res

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Testing capability to send unexpected Authentication Response
Jouni Malinen [Mon, 13 Nov 2017 10:47:30 +0000 (12:47 +0200)] 
DPP: Testing capability to send unexpected Authentication Response

This is for protocol testing to check what happens if the Responser
receives an unexpected Authentication Response instead of Authentication
Confirm.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Reject unexpected Req/Resp message based on Auth/PKEX role
Jouni Malinen [Mon, 13 Nov 2017 10:54:20 +0000 (12:54 +0200)] 
DPP: Reject unexpected Req/Resp message based on Auth/PKEX role

This prevents issues where an unexpected message in the DPP
Authentication exchange or PKEX could result in undefined behavior.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP Authentication Response retries
Jouni Malinen [Mon, 13 Nov 2017 10:33:45 +0000 (12:33 +0200)] 
tests: DPP Authentication Response retries

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Retransmit DPP Authentication Response frame if it is not ACKed
Jouni Malinen [Mon, 13 Nov 2017 10:34:17 +0000 (12:34 +0200)] 
DPP: Retransmit DPP Authentication Response frame if it is not ACKed

This extends wpa_supplicant DPP implementation to retransmit DPP
Authentication Response frame every 10 seconds up to 5 times if the peer
does not reply with DPP Authentication Confirm frame.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Stop authentication exchange of DPP_STOP_LISTEN
Jouni Malinen [Mon, 13 Nov 2017 10:12:08 +0000 (12:12 +0200)] 
DPP: Stop authentication exchange of DPP_STOP_LISTEN

Previously, this command stopped listen operation immediately, but if
there was an ongoing authentication exchange, a new listen operation was
started. This is not really expected behavior, so stop the
authentication exchange first with this command to avoid restarting
listen operation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP with Initiator in either role
Jouni Malinen [Mon, 13 Nov 2017 09:29:21 +0000 (11:29 +0200)] 
tests: DPP with Initiator in either role

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Allowed initiator to indicate either role
Jouni Malinen [Mon, 13 Nov 2017 09:29:45 +0000 (11:29 +0200)] 
DPP: Allowed initiator to indicate either role

The new role=either parameter can now be used with DPP_AUTH_INIT to
indicate that the initiator can take either the Configurator or Enrollee
role.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP bootstrapping info channel list
Jouni Malinen [Sun, 12 Nov 2017 10:17:32 +0000 (12:17 +0200)] 
tests: DPP bootstrapping info channel list

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Support multiple channels for initiating DPP Authentication
Jouni Malinen [Sun, 12 Nov 2017 10:17:54 +0000 (12:17 +0200)] 
DPP: Support multiple channels for initiating DPP Authentication

This extends wpa_supplicant to iterate over all available channels from
the intersection of what the peer indicates and the local device
supports when initiating DPP Authentication. In addition, retry DPP
Authentication Request frame up to five times if no response is
received.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agoDPP: Share a helper function for PKEX final steps
Jouni Malinen [Sun, 12 Nov 2017 07:43:13 +0000 (09:43 +0200)] 
DPP: Share a helper function for PKEX final steps

Generate the PKEX bootstrapping information and release the PKEX session
in a helper function that both the initiator and responder can use
instead of maintaining this functionality separately in two places.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: sigma_dut DPP protocol testing - Peer Discovery Request
Jouni Malinen [Mon, 6 Nov 2017 10:59:12 +0000 (12:59 +0200)] 
tests: sigma_dut DPP protocol testing - Peer Discovery Request

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 years agotests: DPP protocol testing - network introduction
Jouni Malinen [Mon, 6 Nov 2017 10:40:47 +0000 (12:40 +0200)] 
tests: DPP protocol testing - network introduction

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>