aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests: sigma_dut controlled AP with EAP+OSENHEADpendingmasterJouni Malinen43 hours1-0/+29
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* HS 2.0: Allow Hotspot 2.0 version number to be overridden for buildJouni Malinen48 hours1-0/+2
| | | | | | This can be used for testing and development purposes. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: P2P and avoid frequencies driver event on 5 GHzJouni Malinen48 hours2-2/+64
| | | | | | | | This test case verifies that wpa_supplicant is able to perform CSA to a VHT80 channel when having to move the GO due to an avoid-frequencies driver event. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* P2P: Use more compact debug print of common group frequenciesJouni Malinen5 days1-5/+14
| | | | | | | Print the list of frequencies on a single line instead of one line per frequency. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* P2P: Improve common group channel selection if GO needs to be movedJouni Malinen5 days1-0/+87
| | | | | | | | | | | | Prefer channels that support VHT80 (and secondarily, HT40 on the same band) over other common group channels. If no such channel is found, prefer any channel that uses the same band so that CSA can be used. This improves the case where a P2P GO needs to move to another channel and there is no other reason (e.g., preferred channel from the driver or an already used channel from a virtual interface sharing the same radio) to pick a specific channel. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* P2P/AP: More detailed debug prints on HT/VHT parameter selectionJouni Malinen5 days1-3/+45
| | | | | | | This makes it easier to debug why wpa_supplicant selects particular HT/VHT parameters for AP/P2P GO mode. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* nl80211: Add more command/event names to debug printsJouni Malinen5 days1-0/+3
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: Associated STA indicating 40 MHz intolerant and hostapd deinitJouni Malinen8 days1-0/+19
| | | | | | | This is a regression test for a forgotten ap_ht2040_timeout() eloop timer callback on AP interface removal. Signed-off-by: Jouni Malinen <j@w1.fi>
* AP: Fix HT 20/40 co-ex transition timer cancellation on iface removalMartin Willi8 days1-6/+7
| | | | | | | | | | | | | | | When removing an interface, hostapd_bss_deinit() frees all associated STAs. If any of the stations is 40MHz intolerant, the cleanup invokes ht40_intolerant_remove(), that in turn registers a 20->40MHz transition timer for the last station (ap_ht2040_timeout() function). That timer is never canceled; once it executes, the interface is gone, most likely resulting in a segfault when referencing it. While hostapd_interface_deinit() cancels the transition timer, it does so before cleaning up STAs. Move the cancellation after STA cleanup to cancel any timer that was registered during that operation. Signed-off-by: Martin Willi <martin@strongswan.org>
* nl80211: Handle NL80211_CMD_WIPHY_REG_CHANGE eventPeng Xu14 days1-0/+1
| | | | | | | | | | Handle NL80211_CMD_WIPHY_REG_CHANGE the same way as the NL80211_CMD_REG_CHANGE event. The wiphy-specific event is generated by the cfg80211 reg_process_self_managed_hints() function, e.g., when going through regulatory_set_wiphy_regd_sync_rtnl(). Previously, such events were ignored completely in hostapd/wpa_supplicant. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* FT: Derive PMKR0Name/PMKR1Name using SHA-384 with AKM 00-0F-AC:13Jouni Malinen14 days4-12/+21
| | | | | | | | | | | | | | The AKM 00-0F-AC:13 is supposed to use cryptographic algorithms consistently, but the current IEEE 802.11 standard is not doing so for the key names: PMKID (uses SHA-1), PMKR0Name/PMKR1Name (uses SHA-256). The PMKID case was already implemented with SHA-384 and this commit replaces use of SHA-256 with SHA-384 for PMKR0Name/PMKR1Name derivation to be consistent in SHA-384. While this is not compliant with the current IEEE 802.11 standard, this is clearly needed to meet CNSA Suite requirements. Matching change is being proposed in REVmd to get the IEEE 802.11 standard to meet the use case requirements. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: SAE reauthenticationJouni Malinen14 days1-0/+22
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* SAE: Do not drop STA entry on reauthentication in infrastructure BSSJouni Malinen2018-06-051-1/+13
| | | | | | | | | | | | | | | | | | | | | A new SAE Commit message should not be allowed to drop an existing STA entry since the sender of that Commit message cannot be authenticated before receiving the Confirm message. This is important in particular when PMF is used since this would provide a potential new path for forcing a connection to be dropped. Fix this by allowing a new SAE Authentication instance to be started when the old instance is in Accepted state and the new Commit message does not use the same peer-scalar value (checked in sae_parse_commit_scalar()). When PMF is used, the AP will use SA Query procedure when receiving the (Re)Association Request frame. In theory, that step could be skipped in case of SAE Authentication since the non-AP STA is demonstrating knowledge of the password. Anyway, there is no allowance for that exception in the IEEE 802.11 standard, so at least for now, leave this using SA Query procedure just like any other PMF case. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: FT with different BIP algorithmsJouni Malinen2018-06-051-2/+73
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Support BIP-CMAC-256, BIP-GMAC-128, BIP-GMAC-256 in STA caseJouni Malinen2018-06-051-11/+36
| | | | | | | | wpa_supplicant was hardcoded to use BIP-CMAC-128 in FT protocol if PMF was enabled. Extend that to allow the other BIP algorithms to be used as well. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Support 256-bit IGTK in AP caseJouni Malinen2018-06-051-3/+6
| | | | | | | | hostapd was hardcoded to use 128-bit IGTK in FT protocol (IGTK subelement in FTE). Extend that to allow 256-bit IGTK (i.e., BIP-CMAC-256 and BIP-GMAC-256) to be used as well. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: FILS+FT with SHA384Jouni Malinen2018-06-051-0/+8
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Handle AssocResp generation failures as fatal errorsJouni Malinen2018-06-053-9/+22
| | | | | | | | Instead of sending out a partially completed frame, abort the association process if something unexpected happens and remove the STA entry. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Split ap_ft_ap_oom7 into separate test casesJouni Malinen2018-06-051-2/+62
| | | | | | | | | | The implementation changes in hostapd FT error path handling in the follow commit would result in ap_ft_ap_oom7 test case failing. This is triggered partially by PMF protections and SA Query attempts, so it looks like it is easier to split each failure case into a separate test case. Signed-off-by: Jouni Malinen <j@w1.fi>
* FILS: Fix KEK2 use in FT-FILS use casesJouni Malinen2018-06-052-7/+57
| | | | | | | | | | | | When support for KCK2 and KEK2 was added, both keys were derived for FT-FILS cases, but only KCK2 was actually used. Add similar changes to use KEK2 to protect GTK/IGTK in FTE with using FT-FILS AKMs. This fixes AES key wrapping to use the correct key. The change is not backwards compatible. Fixes: 2f37387812a5 ("FILS: Add more complete support for FT-FILS use cases") Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Fix potential NULL pointer dereference in MDE additionJouni Malinen2018-06-051-1/+1
| | | | | | | | The bss variable in this function might be NULL, so make the FT MDE addition case conditional on a BSS entry being available. Fixes: 3dc3afe298f0 ("FT: Add MDE to assoc request IEs in connect params") Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Fix RRB error path handlingJouni Malinen2018-06-051-0/+1
| | | | | | | | When building an RRB message, a failure in wpa_ft_rrb_lin() calls could have resulted in trying to free an uninitialized pointer. Fix this by initializing *packet to NULL before going through the initial steps. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Debug print of IE parsing element detailsJouni Malinen2018-06-051-0/+24
| | | | | | This makes it easier to debug issues in processing FT frames. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: FT-EAP-SHA384Jouni Malinen2018-06-051-2/+46
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Add key management value FT-EAP-SHA384 for wpa_supplicantJouni Malinen2018-06-052-1/+19
| | | | | | | This allows wpa_supplicant to be configuted to use the SHA384-based FT AKM. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Add key management value FT-EAP-SHA384 for hostapdJouni Malinen2018-06-052-2/+14
| | | | | | This allows hostapd to be configuted to use the SHA384-based FT AKM. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Add support for variable length PMK-R1 receiving in RRBJouni Malinen2018-06-051-3/+9
| | | | | | | | SHA384-based FT AKM uses longer keys, so the RRB receive processing for push and pull response messages needs to be able to accept variable length PMK-R1. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: FTE generation for SHA384-based AKM on APJouni Malinen2018-06-055-28/+65
| | | | | | | The MIC field is now a variable length field, so make FTE generation in hostapd aware of the two different field lengths. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: FTE generation for SHA384-based AKM on STAJouni Malinen2018-06-051-11/+26
| | | | | | | The MIC field is now a variable length field, so make FTE generation in wpa_supplicant aware of the two different field lengths. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: FTE parsing for SHA384-based AKMJouni Malinen2018-06-056-60/+190
| | | | | | | The MIC field is now a variable length field, so make the FTE parser aware of the two different field lengths. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Connection settings for SHA384-based AKMJouni Malinen2018-06-051-1/+14
| | | | | | | Extend wpa_supplicant to allow SHA384-based FT AKM to be selected for a connection. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: PMK-R0 derivation using SHA384-based AKMJouni Malinen2018-06-057-23/+72
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: PMKID derivation using SHA384-based AKMJouni Malinen2018-06-051-3/+3
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: PTK derivation using SHA384-based AKMJouni Malinen2018-06-051-3/+34
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: PMK-R1 derivation using SHA384-based AKMJouni Malinen2018-06-051-2/+20
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: FTE MIC calculation using SHA384-based AKMJouni Malinen2018-06-051-8/+27
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: EAPOL-Key MIC calculation using SHA384-based AKMJouni Malinen2018-06-051-0/+9
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: XXKey derivation for SHA384-based AKMJouni Malinen2018-06-052-5/+17
| | | | | | XXKey is the first 384 bits of MSK when using the SHA384-based FT AKM. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Support variable length keysJouni Malinen2018-06-058-66/+106
| | | | | | This is a step in adding support for SHA384-based FT AKM. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: SHA384-based AKM in RSNE processingJouni Malinen2018-06-047-9/+51
| | | | | | | This defines key lengths for SHA384-based FT AKM and handles writing and parsing for RSNE AKMs with the new value. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-TLS: Derive Session-Id using TLS-Exporter when TLS v1.3 is usedJouni Malinen2018-06-012-0/+14
| | | | | | | This updates Session-Id derivation with TLS v1.3 per draft-ietf-emu-eap-tls13-00. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: ERP enabled on RADIUS server and peer using EAP-TLS v1.3Jouni Malinen2018-06-011-1/+24
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-TLS server: Fix EMSK derivation with TLS v1.3Jouni Malinen2018-06-011-1/+5
| | | | | | | | The new label string for TLS-Exporter was taken into use for MSK derivation, but it was missed from EMSK deriation in the server side implementation. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-TLS: Update key derivation label per draft-ietf-emu-eap-tls13-00Jouni Malinen2018-06-012-2/+2
| | | | | | | The label strings used for deriving Key_Material with TLS v1.3 were changed, so update the implementation to match the new values. Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Fix parsing of max_oper_chwidthSven Eckelmann2018-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The max_oper_chwidth is parsed in wpa_config_set as INT_RANGE (see ssid_fields). The actual parsing for INT_RANGE is done by wpa_config_parse_int which can only store the result as full integer. max_oper_chwidth is stored as u8 (a single byte) in wpa_ssid. This means that on little endian systems, the least significant byte of the parsed value are really stored in the max_oper_chwidth. But on big endian system, the only most significant byte is stored as max_oper_chwidth. This means that 0 is always stored because the provided range doesn't allow any other value for systems with multi-byte-wide integers. This also means that for common systems with 4-byte-wide integers, the remaining 3 bytes were written after the actual member of the struct. This should not have influenced the behavior of succeeding members because these bytes would have been part of the padding between the members on most systems. Increasing its size to a full int fixes the write operations outside of the member and allows to use the max_oper_chwidth setting on big endian systems. Fixes: 0f29bc68d18e ("IBSS/mesh: Add support for VHT80P80 configuration") Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
* tests: Update mesh_oom to match implementation changeJouni Malinen2018-05-311-2/+2
| | | | | | | The initial direct allocation within wpa_supplicant_mesh_init() was removed. Signed-off-by: Jouni Malinen <j@w1.fi>
* mesh: Fix crash with CONFIG_TAXONOMY enabledFelix Fietkau2018-05-311-1/+1
| | | | | | | | | wpa_s->ifmsh needs to be allocated using hostapd_alloc_iface() instead of a direct call to os_zalloc(), otherwise the linked list for station taxonomy items remains uninitialized, leading to a crash on the first attempt to traverse that list Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Add some missing driver flags stringsMikael Kanstrup2018-05-311-0/+13
| | | | | | | | New WPA_DRIVER_FLAGS have been added but corresponding lookup strings for driver_flags command were never added. Add the missing strings. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sony.com>
* tests: WNM Time Advertisement without time zone configurationJouni Malinen2018-05-311-0/+8
| | | | | | This is a regression test for a segfault in hostapd. Signed-off-by: Jouni Malinen <j@w1.fi>
* WNM: Fix time_zone advertisement without time_zone configurationMarkus Theil2018-05-311-1/+1
| | | | | | | | | | If time_advertisement=2 is included in hostapd configuration, but time_zone is unset, the previous implementation tried to write the Time Zone element into management frames. This resulted in segmentation fault when trying to dereference a NULL pointer. Fix that by skipping addition of this element when time_zone parameter is not set. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>