aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow last (Re)Association Request frame to be replayed for testingJouni Malinen2017-10-165-0/+63
| | | | | | | | | | | The new wpa_supplicant RESEND_ASSOC command can be used to request the last (Re)Association Request frame to be sent to the AP to test FT protocol behavior. This functionality is for testing purposes and included only in builds with CONFIG_TESTING_OPTIONS=y. Signed-off-by: Jouni Malinen <j@w1.fi>
* Allow EAPOL-Key Request to be sent through control interfaceJouni Malinen2017-10-161-0/+18
| | | | | | | | | | The new wpa_supplicant "KEY_REQUEST <error=0/1> <pairwise=0/1>" command can be used to request an EAPOL-Key Request frame to be sent to the AP. This functionality is for testing purposes and included only in builds with CONFIG_TESTING_OPTIONS=y. Signed-off-by: Jouni Malinen <j@w1.fi>
* Make last received ANonce available through control interfaceJouni Malinen2017-10-161-0/+6
| | | | | | | This makes it easier to debug 4-way handshake implementation issues without having to use a sniffer. Signed-off-by: Jouni Malinen <j@w1.fi>
* Add testing functionality for resetting PN/IPN for configured keysJouni Malinen2017-10-164-0/+47
| | | | | | | | | | | | | This can be used to test replay protection. The "RESET_PN" command in wpa_supplicant and "RESET_PN <addr>" command in hostapd resets the local counters to zero for the last configured key. For hostapd, the address parameter specifies which STA this operation is for or selects GTK ("ff:ff:ff:ff:ff:ff") or IGTK ("ff:ff:ff:ff:ff:ff IGTK"). This functionality is for testing purposes and included only in builds with CONFIG_TESTING_OPTIONS=y. Signed-off-by: Jouni Malinen <j@w1.fi>
* Remove all PeerKey functionalityJouni Malinen2017-10-1515-113/+20
| | | | | | | | | | | | | | | | | | | | | | | | This was originally added to allow the IEEE 802.11 protocol to be tested, but there are no known fully functional implementations based on this nor any known deployments of PeerKey functionality. Furthermore, PeerKey design in the IEEE Std 802.11-2016 standard has already been marked as obsolete for DLS and it is being considered for complete removal in REVmd. This implementation did not really work, so it could not have been used in practice. For example, key configuration was using incorrect algorithm values (WPA_CIPHER_* instead of WPA_ALG_*) which resulted in mapping to an invalid WPA_ALG_* value for the actual driver operation. As such, the derived key could not have been successfully set for the link. Since there are bugs in this implementation and there does not seem to be any future for the PeerKey design with DLS (TDLS being the future for DLS), the best approach is to simply delete all this code to simplify the EAPOL-Key handling design and to get rid of any potential issues if these code paths were accidentially reachable. Signed-off-by: Jouni Malinen <j@w1.fi>
* WNM: Ignore WNM-Sleep Mode Response without pending requestJouni Malinen2017-10-151-1/+3
| | | | | | | | | | | Commit 03ed0a52393710be6bdae657d1b36efa146520e5 ('WNM: Ignore WNM-Sleep Mode Response if WNM-Sleep Mode has not been used') started ignoring the response when no WNM-Sleep Mode Request had been used during the association. This can be made tighter by clearing the used flag when successfully processing a response. This adds an additional layer of protection against unexpected retransmissions of the response frame. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Allow SAE password to be configured separately (STA)Jouni Malinen2017-10-118-6/+39
| | | | | | | | | The new sae_password network profile parameter can now be used to set the SAE password instead of the previously used psk parameter. This allows shorter than 8 characters and longer than 63 characters long passwords to be used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Do not mark DFS channel as invalid if DFS is offloaded to driverSunil Dutt2017-10-111-2/+6
| | | | | | | | While considering the movement of P2P GO from its current operating channel, do not mark a DFS channel as invalid if DFS is offloaded to the driver. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Prefer 5/60 GHz band over 2.4 GHz during GO configurationSunil Dutt2017-10-111-24/+24
| | | | | | | | | | | | | | | | | | Previously, wpas_p2p_select_go_freq_no_pref() ended up selecting a 2.4 GHz band channel first before even considering 5 or 60 GHz channels. This was likely done more or less by accident rather than by design when the 5 GHz and 60 GHz band extensions were added. It seems reasonable to enhance this by reordering the code to start with 5 and 60 GHz operating classes and move to 2.4 GHz band only if no channel was available in 5 or 60 GHz bands for P2P GO use. This does have some potential interop issues with 2.4 GHz only peer devices when starting up an autonomous GO (i.e., without there being prior knowledge of channels that the peers support). Upper layers are expected to enforce 2.4 GHz selection if that is needed for some use cases. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* OWE: Allow DH Parameters element to be overridden for testing purposesJouni Malinen2017-10-101-0/+6
| | | | | | | | | This allows CONFIG_TESTING_OPTIONS=y builds of wpa_supplicant to override the OWE DH Parameters element in (Re)Association Request frames with arbitrary data specified with the "VENDOR_ELEM_ADD 13 <IE>" command. This is only for testing purposes. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Add the crypto suite field to the framesJouni Malinen2017-10-091-6/+12
| | | | | | | This additional field was added to DPP Public Action frames in DPP tech spec v0.2.3 to support cryptographic agility in the future. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Remove C-sign-key expiryJouni Malinen2017-10-094-38/+3
| | | | | | This was removed in DPP tech spec v0.2.3. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* OWE: Support station SME-in-driver caseJouni Malinen2017-10-091-1/+20
| | | | | | | | Previously, only the SME-in-wpa_supplicant case was supported. This extends that to cover the drivers that implement SME internally (e.g., through the cfg80211 Connect command). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* OWE: PMKSA caching in station modeJouni Malinen2017-10-091-3/+4
| | | | | | | This extends OWE support in wpa_supplicant to allow PMKSA caching to be used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* OWE: Support DH groups 20 (NIST P-384) and 21 (NIST P-521) in stationJouni Malinen2017-10-086-1/+27
| | | | | | | | This extends OWE support in wpa_supplicant to allow DH groups 20 and 21 to be used in addition to the mandatory group 19 (NIST P-256). The group is configured using the new network profile parameter owe_group. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* OWE: Support DH groups 20 (NIST P-384) and 21 (NIST P-521) in AP modeJouni Malinen2017-10-082-2/+9
| | | | | | | This extends OWE support in hostapd to allow DH groups 20 and 21 to be used in addition to the mandatory group 19 (NIST P-256). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* OWE: Transition mode support on station sideJouni Malinen2017-10-083-6/+147
| | | | | | | Add support for using the OWE Transition Mode element to determine the hidden SSID for an OWE BSS that is used in transition mode. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* OWE: Set PMK length properly on supplicant sideJouni Malinen2017-10-081-0/+6
| | | | | | | | | | | sm->pmk_len was not set when deriving the PMK as part of OWE key generation. This depending on wpa_sm_set_pmk_from_pmksa() call resetting the value to the default. While this worked for many cases, this is not correct and can have issues with network profile selection based on association information. For example, the OWE transition mode cases would hit an issue here. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Allow GO to advertise Interworking elementSunil Dutt2017-10-057-0/+101
| | | | | | | | | This adds new wpa_supplicant configuration parameters (go_interworking, go_access_network_type, go_internet, go_venue_group, go_venue_type) to add a possibility of configuring the P2P GO to advertise Interworking element. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* OCE: Update default scan IEs when OCE is enabled/disabledvamsi krishna2017-10-011-0/+1
| | | | | | | | Update the default scan IEs when OCE is enabled/disabled to the driver/firmware, so that the correct IEs will be sent out by the driver/firmware in Probe Request frames. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add group_mgmt network parameter for PMF cipher selectionJouni Malinen2017-09-267-4/+101
| | | | | | | | | | The new wpa_supplicant network parameter group_mgmt can be used to specify which group management ciphers (AES-128-CMAC, BIP-GMAC-128, BIP-GMAC-256, BIP-CMAC-256) are allowed for the network. If not specified, the current behavior is maintained (i.e., follow what the AP advertises). The parameter can list multiple space separate ciphers. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Suite B: Add tls_suiteb=1 parameter for RSA 3k key caseJouni Malinen2017-09-161-0/+3
| | | | | | | | This adds phase1 parameter tls_suiteb=1 into wpa_supplicant configuration to allow TLS library (only OpenSSL supported for now) to use Suite B 192-bit level rules with RSA when using >= 3k (3072) keys. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Allow raw hex PSK to be used for legacy configurationJouni Malinen2017-09-151-6/+24
| | | | | | | The new psk=<hexdump> can be used as an alternative to pass=<passphrase> when configuring the DPP Configurator with a legacy network parameters. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wpa_supplicant: Support dynamic update of wowlan_triggersLior David2017-09-133-1/+12
| | | | | | | Previously, wowlan_triggers were updated in kernel only during startup. Also update it whenever it is set from the control interface. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* mesh: Move writing of mesh_rssi_threshold inside CONFIG_MESHLior David2017-09-121-1/+1
| | | | | | | | | | | | | | | Previously, the code that writes mesh_rssi_threshold to a network block always executes, but the code that reads it from network block and the code that initializes it to a default value in a new network block are inside #ifdef CONFIG_MESH. As a result when writing a config file it will write mesh_rssi_threshold (since it has a non-default value) and later fail to read the network block. Fix this by moving the write code under #ifdef CONFIG_MESH as well. Note, network blocks which already have mesh_rssi_threshold because of the bug will still fail to read after the fix. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* Fix RSN pre-authentication regression with pre-connection scan resultsJouni Malinen2017-09-121-0/+9
| | | | | | | | | | | | | | | | | | | | | The introduction of radio works and a delayed callback to complete association/connection requests ended up breaking RSN pre-authentication candidate list generation for the case of pre-connection scan results. Previously, wpa_supplicant_associate() set the RSN state machine configuration before returning and the calls to wpa_supplicant_rsn_preauth_scan_results() immediately after this function call were working fine. However, with the radio work callback, the RSN state machine configuration started to happen only in that callback which would be called soon after this code path has completed. This resulted in the RSN state machine not knowing the selected SSID and as such, rejecting all pre-authentication candidates. Fix this by setting the RSN state machine configuration from wpa_supplicant_associate() so that the existing callers of wpa_supplicant_rsn_preauth_scan_results() can be used as-is to add candidates for pre-authentication. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* mka: Add error handling for secy_init_macsec() callsSabrina Dubroca2017-09-101-3/+2
| | | | | | | | | | | | | secy_init_macsec() can fail (if ->macsec_init fails), and ieee802_1x_kay_init() should handle this and not let MKA run any further, because nothing is going to work anyway. On failure, ieee802_1x_kay_init() must deinit its kay, which will free kay->ctx, so ieee802_1x_kay_init callers (only ieee802_1x_alloc_kay_sm) must not do it. Before this patch there is a double-free of the ctx argument when ieee802_1x_kay_deinit() was called. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
* wpa_supplicant: Check length when building ext_capability in assoc_cbAdiel Aloni2017-09-101-1/+2
| | | | | | | When building wpa_ie in wpas_start_assoc_cb() with ext_capab, make sure that assignment does not exceed max_wpa_ie_len. Signed-off-by: Adiel Aloni <adiel.aloni@intel.com>
* dbus: Add new interface property to get mesh groupSaurav Babu2017-09-093-0/+39
| | | | Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add new interface property to get connected mesh peersSaurav Babu2017-09-093-0/+77
| | | | Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add MeshPeerDisconnected signalSaurav Babu2017-09-095-0/+64
| | | | | | This is similar to the control interface event MESH-PEER-DISCONNECTED. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add MeshPeerConnected signalSaurav Babu2017-09-095-0/+62
| | | | | | This is similar to the control interface event MESH-PEER-CONNECTED. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add MeshGroupRemoved signalSaurav Babu2017-09-095-0/+79
| | | | | | This is similar to the control interface event MESH-GROUP-REMOVED. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add MeshGroupStarted signalSaurav Babu2017-09-095-0/+68
| | | | | | | This introduces a new interface for mesh and adds a signal that is similar to the control interface event MESH-GROUP-STARTED. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* SAE: Allow commit fields to be overridden for testing purposes (STA)Jouni Malinen2017-09-043-0/+22
| | | | | | | | | The new "SET sae_commit_override <hexdump>" control interface command can be used to force wpa_supplicant to override SAE commit message fields for testing purposes. This is included only in CONFIG_TESTING_OPTIONS=y builds. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Add base64 dependency in makefilesJouni Malinen2017-09-042-0/+2
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Use Transaction ID in Peer Discovery Request/Response framesJouni Malinen2017-08-231-33/+26
| | | | | | | | | DPP tech spec changed the contents of these frames by replacing the public key hash attributes with a Transaction ID attribute that gets copied from the request to the response to identify the transaction in a simpler manner. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DPP: Remove devices object from the connectorJouni Malinen2017-08-223-9/+0
| | | | | | | This was removed from the draft DPP tech spec, so remove it from the implementation as well. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* WNM: Differentiate between WNM for station and for AP in buildAvraham Stern2017-07-182-2/+4
| | | | | | | | | | | | | | Previously, CONFIG_WNM enabled build that supports WNM for both station mode and AP mode. However, in most wpa_supplicant cases only station mode WNM is required and there is no need for AP mode WNM. Add support to differentiate between station mode WNM and AP mode WNM in wpa_supplicant builds by adding CONFIG_WNM_AP that should be used when AP mode WNM support is required in addition to station mode WNM. This allows binary size to be reduced for builds that require only the station side WNM functionality. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* RRM: Remove duplicate frequencies from beacon report scan requestAvraham Stern2017-07-171-0/+1
| | | | | | | | | | | When setting the frequencies for beacon report request scan, it is possible that a frequency is added twice (e.g., when the same channel appears both in the channel field and in the AP channel report subelement). This may cause the scan request to fail. Make sure the frequencies array contains no duplications before requesting the scan. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* RRM: Send response when Beacon report request is not supported/refusedAvraham Stern2017-07-171-3/+15
| | | | | | | | | | | | | Send Radio Measurement response with measurement mode set to reject in the following cases: 1. Reporting conditions is not supported. 2. No valid channels found for the measurement Sending a response with an incapable indication will stop the AP from sending other measurement requests of the same type as specified in IEEE Std 802.11-2016, 11.11.6. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* RRM: Send Radio Measurement response when beacon report scan failsAvraham Stern2017-07-173-2/+8
| | | | | | | | | When failing to trigger scan for beacon report (e.g., when the requested duration is not supported by the driver), send a Radio Measurement response with the mode set to refused and don't retry the scan. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* RRM: Send reject/refuse response only to unicast measurement requestAvraham Stern2017-07-173-12/+22
| | | | | | | | | | IEEE Std 802.11-2016, 11.11.6 specifies that a station that is unable to make a requested measurement or refuses to make a measurement shall respond only if the measurement request was received within an individually addressed radio measurement request frame, but shall not respond if such a request was received in a group addressed frame. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* wpa_cli: Fix global control interface for STA-FIRST/STA-NEXTDmitry Shmidt2017-07-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | If global control interface is used and wlan doesn't support P2P, wpa_s->global->p2p == NULL, and log shows: wpa_supplicant: Failed to create interface p2p-dev-wlan0: -5 (I/O error) wpa_supplicant: nl80211: Failed to create a P2P Device interface p2p-dev-wlan0 wpa_supplicant: P2P: Failed to enable P2P Device interface Then STA-FIRST/STA-NEXT is not going to redirect to any interface, making update_stations(ctrl_conn) is stuck in never-ending loop: sendto(3, "STA-FIRST", 9, 0, NULL, 0) = 9 pselect6(4, [3], NULL, NULL, {10, 0}, NULL) = 1 (in [3], left {9, 999995000}) recvfrom(3, "UNKNOWN COMMAND\n", 4095, 0, NULL, NULL) = 16 sendto(3, "STA-NEXT UNKNOWN COMMAND", 24, 0, NULL, 0) = 24 pselect6(4, [3], NULL, NULL, {10, 0}, NULL) = 1 (in [3], left {9, 999995833}) recvfrom(3, "UNKNOWN COMMAND\n", 4095, 0, NULL, NULL) = 16 sendto(3, "STA-NEXT UNKNOWN COMMAND", 24, 0, NULL, 0) = 24 pselect6(4, [3], NULL, NULL, {10, 0}, NULL) = 1 (in [3], left {9, 999995000}) recvfrom(3, "UNKNOWN COMMAND\n", 4095, 0, NULL, NULL) = 16 sendto(3, "STA-NEXT UNKNOWN COMMAND", 24, 0, NULL, 0) = 24 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* OpenSSL: Add build option to select default ciphersBeniamino Galvani2017-07-175-2/+18
| | | | | | | | | | | | | | Add a build option to select different default ciphers for OpenSSL instead of the hardcoded default "DEFAULT:!EXP:!LOW". This new option is useful on distributions where the security level should be consistent for all applications, as in Fedora [1]. In such cases the new configuration option would be set to "" or "PROFILE=SYSTEM" to select the global crypto policy by default. [1] https://fedoraproject.org/wiki/Changes/CryptoPolicy Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
* STA: Add OCE capability indication attributeAshwini Patil2017-07-149-7/+80
| | | | | | | Add OCE capability indication attribute in Probe Request and (Re)Association Request frames. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* FILS: Fix issuing FILS connect to a non-FILS AP in driver-FILS caseVidyullatha Kanchanapally2017-07-141-46/+43
| | | | | | | | | | | If an AP is not FILS capable and wpa_supplicant has a saved network block for the network with FILS key management and a saved erp info, wpa_supplicant might end up issuing a FILS connection to a non-FILS AP. Fix this by looking for the presence of FILS AKMs in wpa_s->key_mgmt, i.e., after deciding on the AKM suites to use for the current connection. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* MBO: Fix possible memory leak in anqp_send_req()Ilan Peer2017-07-081-0/+1
| | | | | | | In case that an mbo object is allocated, but there is a failure to resize the wpabuf, need to free the mbo object. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* RRM: Filter scan results by parent TSF only if driver supports itAvraham Stern2017-07-081-7/+7
| | | | | | | | | | | | | Scan results with parent TSF older than the scan start TSF are not added to the beacon report since they are considered as scan results from previous scans. However, for drivers that report the scan start TSF but not the parent TSF of each scan result, the parent TSF will be zero so valid scan results will be dropped. Fix this by filtering scan results by the parent TSF only if the driver supports reporting the parent TSF for each scan result. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* P2P: Clear get_pref_freq_list_override on P2P DeviceAndrei Otcheretianski2017-07-081-0/+6
| | | | | | | Clear the get_pref_freq_list_override in p2p_ctrl_flush(). This fixes the case when a dedicated P2P device interface is used. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>