]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
7 years agoWPS: Add option for using random UUID
Jouni Malinen [Thu, 13 Apr 2017 10:22:56 +0000 (13:22 +0300)] 
WPS: Add option for using random UUID

If the uuid configuration parameter is not set, wpa_supplicant generates
an UUID automatically to allow WPS operations to proceed. This was
previously always using an UUID generated from the MAC address. This
commit adds an option to use a random UUID instead. The type of the
automatically generated UUID is set with the auto_uuid parameter: 0 =
based on MAC address (default; old behavior), 1 = random UUID.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: GTK rekeying after FILS authentication
Jouni Malinen [Mon, 10 Apr 2017 13:19:26 +0000 (16:19 +0300)] 
tests: GTK rekeying after FILS authentication

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Fix key info in GTK rekey EAPOL-Key msg 2/2
Vidyullatha Kanchanapally [Mon, 10 Apr 2017 10:25:59 +0000 (15:55 +0530)] 
FILS: Fix key info in GTK rekey EAPOL-Key msg 2/2

While responding to EAPOL-Key message 1/2 with EAPOL-Key message 2/2
when using FILS AKM suites the ENCRYPTED bit is not set in key info of
2/2 which causes AP to drop 2/2. Fix this by setting the ENCRYPTED bit
since FILS AKM based connection uses AEAD encryption/decryption.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Fix GTK rekey by accepting EAPOL-Key msg 1/2 with FILS AKM
Vidyullatha Kanchanapally [Mon, 10 Apr 2017 10:25:59 +0000 (15:55 +0530)] 
FILS: Fix GTK rekey by accepting EAPOL-Key msg 1/2 with FILS AKM

GTK rekeying was rejected if a prior 4-way handshake is not done.
Fix this by allowing GTK rekey to happen in case of a FILS connection
since it does not involve a 4-way handshake.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Update cache identifier on association
Vidyullatha Kanchanapally [Wed, 22 Mar 2017 10:40:05 +0000 (16:10 +0530)] 
FILS: Update cache identifier on association

This is needed when offloading FILS shared key to the drivers.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Update PMKSA cache with FILS shared key offload
Vidyullatha Kanchanapally [Wed, 22 Mar 2017 10:40:05 +0000 (16:10 +0530)] 
FILS: Update PMKSA cache with FILS shared key offload

Add a new PMKSA cache entry within wpa_supplicant if a driver event from
offloaded FILS shared key authentication indicates a new PMKSA entry was
created.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Update ERP next sequence number with driver offload
Vidyullatha Kanchanapally [Wed, 22 Mar 2017 10:40:05 +0000 (16:10 +0530)] 
FILS: Update ERP next sequence number with driver offload

This keeps the internal ERP information within wpa_supplicant in sync
with the driver when offloading FILS shared key authentication.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Track completion with FILS shared key authentication offload
Vidyullatha Kanchanapally [Wed, 22 Mar 2017 10:40:05 +0000 (16:10 +0530)] 
FILS: Track completion with FILS shared key authentication offload

Update the internal fils_completed state when offloading FILS shared key
authentication to the driver.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Connect request for offloaded FILS shared key authentication
Vidyullatha Kanchanapally [Wed, 22 Mar 2017 10:40:05 +0000 (16:10 +0530)] 
FILS: Connect request for offloaded FILS shared key authentication

Add FILS/ERP parameters into the driver connect command to support FILS
shared key authentication offload.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Set cache identifier in current PMKSA entry for driver-SME case
Vidyullatha Kanchanapally [Wed, 22 Mar 2017 10:40:05 +0000 (16:10 +0530)] 
FILS: Set cache identifier in current PMKSA entry for driver-SME case

This was already done in sme_send_authentication() for the case where
wpa_supplicant SME is used. Similar change is needed for driver-SME to
allow FILS authentication to be offloaded to the driver.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: Update erp_home_realm function name for erp_home_realm_oom
Jouni Malinen [Fri, 7 Apr 2017 14:05:49 +0000 (17:05 +0300)] 
tests: Update erp_home_realm function name for erp_home_realm_oom

This function got renamed, so need to update the OOM test case to use
the new function name when matching backtrace information.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoERP: External control of ERP key information
Vidyullatha Kanchanapally [Wed, 22 Mar 2017 10:40:05 +0000 (16:10 +0530)] 
ERP: External control of ERP key information

This allows ERP keys to be managed by external entities, e.g., when
offloading FILS shared key authentication to a driver.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Add support for Cache Identifier in add/remove PMKSA
Vidyullatha Kanchanapally [Thu, 30 Mar 2017 13:57:15 +0000 (19:27 +0530)] 
FILS: Add support for Cache Identifier in add/remove PMKSA

Add support for setting and deleting PMKSA cache entries based on FILS Cache
Identifer. Also additionally add support for sending PMK as part of
SET_PMKSA to enable driver to derive keys in case of FILS shared key
offload using PMKSA caching.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agonl80211: Add support for FILS Cache Identifier in add/remove_pmkid()
Vidyullatha Kanchanapally [Thu, 30 Mar 2017 13:57:15 +0000 (19:27 +0530)] 
nl80211: Add support for FILS Cache Identifier in add/remove_pmkid()

This is needed for configuring PMKSA cache entries to the driver with
the FILS Cache Identifier and SSID.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agodriver: Move add_pmkid() and remove_pmkid() arguments into a struct
Vidyullatha Kanchanapally [Thu, 30 Mar 2017 13:57:15 +0000 (19:27 +0530)] 
driver: Move add_pmkid() and remove_pmkid() arguments into a struct

This makes it easier to add more arguments to these wpa_driver_ops
functions.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agonl80211: Add support for FILS shared key offload
Vidyullatha Kanchanapally [Wed, 22 Mar 2017 10:40:05 +0000 (16:10 +0530)] 
nl80211: Add support for FILS shared key offload

Add support for FILS shared key offload for drivers which advertize
FILS shared key support using NL80211_CMD_CONNECT.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Add support to write FILS key_mgmt values in network blocks
vamsi krishna [Thu, 6 Apr 2017 16:19:34 +0000 (21:49 +0530)] 
FILS: Add support to write FILS key_mgmt values in network blocks

Add support to write FILS related key_mgmt values also while saving a
network block.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoQCA vendor commands and attributes for spectral scan
Peng Xu [Tue, 21 Mar 2017 00:12:40 +0000 (17:12 -0700)] 
QCA vendor commands and attributes for spectral scan

Add new vendor commands for starting and stoppping spectral scan. Add
vendor attributes for configuring spectral scan parameters as part of
the start command.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Add FTE into FILS Authentication frame from AP when using FILS+FT
Jouni Malinen [Sun, 2 Apr 2017 19:38:48 +0000 (22:38 +0300)] 
FILS: Add FTE into FILS Authentication frame from AP when using FILS+FT

MDE was already added with RSNE, but FTE needed to be added to the FILS
Authentication frame for the FT initial mobility domain association
using FILS authentication case.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFILS: Add MDE into Authentication frame for FILS+FT
Jouni Malinen [Sun, 2 Apr 2017 10:22:52 +0000 (13:22 +0300)] 
FILS: Add MDE into Authentication frame for FILS+FT

When using FILS for FT initial mobility domain association, add MDE to
the Authentication frame from the STA to indicate this special case for
FILS authentication.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFT: Add selection of FT+FILS AKMs
Jouni Malinen [Sun, 2 Apr 2017 09:57:32 +0000 (12:57 +0300)] 
FT: Add selection of FT+FILS AKMs

This is needed to enable use of FILS for the FT initial mobility domain
association.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoHide *PMKSA_ADD parameters from debug log
Jouni Malinen [Sun, 2 Apr 2017 09:37:33 +0000 (12:37 +0300)] 
Hide *PMKSA_ADD parameters from debug log

PMKSA_ADD and MESH_PMKSA_ADD command arguments include keying material,
so show it in debug log only if requested to do with the command line -K
argument.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agogitignore: tests/remote/logs
Jouni Malinen [Sat, 1 Apr 2017 14:03:59 +0000 (17:03 +0300)] 
gitignore: tests/remote/logs

This directory is created automatically when running hwsim test cases
remotely.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoP2P: Do not use wait_time for SD Response TX for last fragmentation
Jouni Malinen [Sat, 1 Apr 2017 11:25:26 +0000 (14:25 +0300)] 
P2P: Do not use wait_time for SD Response TX for last fragmentation

The last SD Response frame fragment is not going to be followed by
another Action frame from the peer, so remove the 200 ms wait time from
the offchannel TX command in that case. This avoids leaving a 200 ms
lock on the radio to remain on the channel unnecessarily.

This is similar to commit 7655bd7388f82e67a2d0461ccab0ae037bb8cd77
('P2P: Do not use wait_time for SD Response TX without fragmentation').

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Fix regdom clearing in wnm_bss_tm_scan_needed_e4
Jouni Malinen [Sat, 1 Apr 2017 11:10:32 +0000 (14:10 +0300)] 
tests: Fix regdom clearing in wnm_bss_tm_scan_needed_e4

It was possible for the cfg80211 regulatory code to get confused if the
disconnection and user hint to set country code to 00 happened
immediately after the BTM-initiated roam. The country IE update seemed
to be performed just before the 00 user hint and that resulted in
cfg80211 intersecting the regulatory domains instead of clearing to 00.
This resulted in the following test cases being unable to set the
country code.

This happened with the following test case sequence:
wnm_bss_tm_scan_needed_e4 wnm_bss_tm_scan_not_needed

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFT: Schedule wpa_ft_rrb_rx() through eloop in intra-process communication
Michael Braun [Thu, 23 Mar 2017 11:57:18 +0000 (12:57 +0100)] 
FT: Schedule wpa_ft_rrb_rx() through eloop in intra-process communication

With AP-AP communication, when hapd0 sends a packet, hapd1 can receive
it immediately and send a response. But hapd0 will only read and process
the response after it has returned from the sending context, that is
entered eloop again. So one does not need to consider the RX function of
the reply to run for the request sending hapd before the send calling
function has returned.

Previously, with intra-process communication, the packet is not
scheduled through eloop. Thus the RX handler of the reply might be run
while the sending context of the original request has not returned.
This might become problematic, e.g., when deferring a management frame
processing until an RRB response is received and then have the request
restarted and finished before the original request handling has been
stopped.

I'm not aware of any concrete bug this is currently triggering but came
across it while thinking of FT RRB AP-AP sequence numbering.

I think the non-eloop scheduling approach might be error-prone and thus
propose to model it more closely to the way the message would be
received from a socket. Additionally, this ensures that the tests model
AP-AP communication more closely to real world.

Solution: queue these packets through eloop.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
7 years agoSync with mac80211-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Fri, 31 Mar 2017 10:14:20 +0000 (13:14 +0300)] 
Sync with mac80211-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2017-03-31.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Add more details to DFS event failure reports
Jouni Malinen [Fri, 31 Mar 2017 10:13:12 +0000 (13:13 +0300)] 
tests: Add more details to DFS event failure reports

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agohostapd: Fix crash on consecutive channel switch failures
Mohammed Shafi Shajakhan [Wed, 22 Mar 2017 11:42:38 +0000 (17:12 +0530)] 
hostapd: Fix crash on consecutive channel switch failures

With multiple interface like AP and station which is already
associated to some other AP, when we try to do channel switch
for the AP mode (different from the operation channel support of
station) and if the AP channel switch fails continously (including
the fallback channel switch), results in a crash due to NULL pointer
dereference. This is because hostapd_deinit_driver() assigns the
driver context (drv_priv) to NULL as we are not able to bring up
the interface with a new channel

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
7 years agowpa_supplicant: Avoid associating to temp disabled SSID in ap_scan=2
Shaul Triebitz [Tue, 28 Mar 2017 12:26:38 +0000 (15:26 +0300)] 
wpa_supplicant: Avoid associating to temp disabled SSID in ap_scan=2

In ap_scan=2 mode, wpa_supplicant_assoc_try() did not check whether the
SSID is temporarily disabled before trying to associate and this may
result in an infinite connect/disconnect loop. If the association
succeeds while the SSID is temporarily disabled, wpa_supplicant will
request to deauthenticate and that in turn will cause the SSID to be
temporarily disabled again. Fix that by postponing the association until
the SSID is no longer temporarily disabled.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
7 years agotests: Document rfkill workaround for systemd for hwsim tests
Michael Braun [Thu, 23 Mar 2017 11:57:17 +0000 (12:57 +0100)] 
tests: Document rfkill workaround for systemd for hwsim tests

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
7 years agotests: Add a test of mesh RANN
Masashi Honma [Tue, 28 Mar 2017 01:30:10 +0000 (10:30 +0900)] 
tests: Add a test of mesh RANN

This is a test for a RANN functionality defined in IEEE Std 802.11-2016
14.10.12 Root announcement (RANN) mechanism.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agotests: Add a test of mesh path request TTL
Masashi Honma [Tue, 21 Mar 2017 01:50:33 +0000 (10:50 +0900)] 
tests: Add a test of mesh path request TTL

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agotests: Use error probability model instead of SNR model
Masashi Honma [Tue, 21 Mar 2017 01:50:32 +0000 (10:50 +0900)] 
tests: Use error probability model instead of SNR model

If wmediumd changes its SNR model, these tests need to be modified (ex.
previously SNR = 0 means disconnection, on the new model, SNR should be
-10 for disconnection). So use error probability model not to be
influenced by SNR model change.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agotests: Check wmediumd version
Masashi Honma [Tue, 21 Mar 2017 01:50:31 +0000 (10:50 +0900)] 
tests: Check wmediumd version

Some wmediumd test cases requires new wmediumd features (mdified SNR
table, location-based config, and log levels). The wmediumd 0.2 does not
have these features, so skip such test cases with versions below 0.3.1.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agotests: Extend test_connectivity to check disconnection
Masashi Honma [Tue, 21 Mar 2017 01:50:30 +0000 (10:50 +0900)] 
tests: Extend test_connectivity to check disconnection

Add success_expected argument to test_connectivity because the function
is expected to fail in some test cases.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agoP2P: Suppress warning on non-P2P config
Masashi Honma [Thu, 16 Mar 2017 01:59:40 +0000 (10:59 +0900)] 
P2P: Suppress warning on non-P2P config

Without CONFIG_P2P config, the following warning occurs if CONFIG_AP is
enabled for the build:

ap.c: In function ‘wpas_conf_ap_vht’:
ap.c:54:5: warning: unused variable ‘channel’ [-Wunused-variable]
  u8 channel = conf->channel;
     ^
ap.c:53:5: warning: unused variable ‘center_chan’ [-Wunused-variable]
  u8 center_chan = 0;
     ^

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agoQCA vendor command: Add TA max duration attribute for OCB configure
Zhaoyang Liu [Sun, 19 Mar 2017 06:40:00 +0000 (14:40 +0800)] 
QCA vendor command: Add TA max duration attribute for OCB configure

Add attribute for TA max duration after last TA received. So that local
time is synchromous to other communicating OCB STAs. If the duration
expires, OCB STA without UTC time source is not in sync to other STAs
and stop scheduling DSRC channel switch after max duration.

Signed-off-by: Zhaoyang Liu <zhaoyang@codeaurora.org>
Signed-off-by: Ferry Zhou <tianguiz@codeaurora.org>
7 years agoDefine attributes for QCA vendor OCB commands
Zhaoyang Liu [Sun, 19 Mar 2017 06:38:15 +0000 (14:38 +0800)] 
Define attributes for QCA vendor OCB commands

Document QCA vendor OCB commands about IEEE Std 802.11 communication
outside the context of a basic service set. Also define all attributes
for the specific OCB commands.

Signed-off-by: Zhaoyang Liu <zhaoyang@codeaurora.org>
Signed-off-by: Ferry Zhou <tianguiz@codeaurora.org>
7 years agoMBO: Fix reject reason codes
Vidyullatha Kanchanapally [Thu, 23 Mar 2017 10:41:22 +0000 (16:11 +0530)] 
MBO: Fix reject reason codes

This change fixes the following compilation warnings:

wnm_sta.c:1007:4: warning: implicit conversion from enumeration type
 'enum mbo_transition_reason' to different enumeration type
 'enum mbo_transition_reject_reason' [-Wenum-conversion]

The actual value of both MBO_TRANSITION_REASON_UNSPECIFIED and
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED is 0, so this does not result
in any change in the contents of the frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Fix wpa_supplicant compilation errors
Vidyullatha Kanchanapally [Thu, 23 Mar 2017 10:41:22 +0000 (16:11 +0530)] 
FILS: Fix wpa_supplicant compilation errors

This change fixes the following compilation error:

wpa.c:2465: error: undefined reference to 'crypto_ecdh_deinit'

in builds where CONFIG_ECC does not get defined.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFILS: Fix fils_cache_id check
Vidyullatha Kanchanapally [Thu, 23 Mar 2017 10:41:22 +0000 (16:11 +0530)] 
FILS: Fix fils_cache_id check

This fixes the following compiler warning:
wpa_auth.c:4249:34: error: address of array 'a->conf.fils_cache_id'
 will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agowlantest: Fix pcapng writer to include decrypted EAPOL-Key Key Data
Jouni Malinen [Sun, 26 Mar 2017 09:49:59 +0000 (12:49 +0300)] 
wlantest: Fix pcapng writer to include decrypted EAPOL-Key Key Data

This was only written to pcapng files if both pcap and pcapng writing
was requested. Fix this for the case where only a pcapng file is being
written.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agowpa_helpers: Ignore link-local IPv4 address while waiting for DHCP
Jouni Malinen [Sun, 26 Mar 2017 09:41:36 +0000 (12:41 +0300)] 
wpa_helpers: Ignore link-local IPv4 address while waiting for DHCP

Do not accept a link-local IPv4 address when waiting for a valid DHCP
address. This helps with hs20-osu-client use cases where DHCP response
has not yet been received.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoxml: Add Value node in TNDS node conversion for empty value case
Jouni Malinen [Sun, 26 Mar 2017 09:39:34 +0000 (12:39 +0300)] 
xml: Add Value node in TNDS node conversion for empty value case

Previously, the Value node was not added if value of a node could not be
fetched. This can cause interoperability issues, so address that in the
same way as an empty length value, i.e., by adding a Value node with
zero-length contents.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoGAS: Handle no-ACK TX status for GAS request frames
Jouni Malinen [Sun, 26 Mar 2017 09:34:06 +0000 (12:34 +0300)] 
GAS: Handle no-ACK TX status for GAS request frames

Previously, only the success and failure (to TX) cases were handled. It
is also possible for the driver to transmit the frame, but not receive
an ACK from the recipient. Address that by waiting for a short period of
time for a response. This fixes cases where OSU provider icon fetching
could get stuck if no ACK frame is received.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: WPA2-PSK-FT AP with non-FT AKMs enabled
Jouni Malinen [Sun, 26 Mar 2017 09:28:40 +0000 (12:28 +0300)] 
tests: WPA2-PSK-FT AP with non-FT AKMs enabled

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agomacsec_linux: Fix NULL pointer dereference on error cases
Davide Caratti [Fri, 24 Mar 2017 09:25:24 +0000 (10:25 +0100)] 
macsec_linux: Fix NULL pointer dereference on error cases

In case wpa_supplicant is using driver_macsec_linux, but macsec module
is not (yet) loaded in the kernel, nl_socket_alloc() fails and drv->sk
is NULL. In this case, don't call libnl functions rntl_link_add() or
rtnl_link_change() using such NULL pointer, to prevent program from
getting segmentation faults like:

 Program received signal SIGSEGV, Segmentation fault.
 nl_socket_get_local_port (sk=sk@entry=0x0) at socket.c:365
 365             if (sk->s_local.nl_pid == 0) {
 (gdb) p sk
 $1 = (const struct nl_sock *) 0x0
 (gdb) bt
 #0  nl_socket_get_local_port (sk=sk@entry=0x0) at socket.c:365
 #1  0x00007ffff79c56a0 in nl_complete_msg (sk=sk@entry=0x0,
  msg=msg@entry=0x55555595a1f0) at nl.c:491
 #2  0x00007ffff79c56d1 in nl_send_auto (sk=sk@entry=0x0,
  msg=msg@entry=0x55555595a1f0) at nl.c:522
 #3  0x00007ffff79c652f in nl_send_sync (sk=sk@entry=0x0,
  msg=0x55555595a1f0) at nl.c:556
 #4  0x00007ffff755faf5 in rtnl_link_add (sk=0x0,
  link=link@entry=0x55555595b0f0, flags=flags@entry=1024) at route/link.c:1548
 #5  0x000055555567a298 in macsec_drv_create_transmit_sc (priv=0x55555593b130,
  sc=0x55555593b320, conf_offset=<optimized out>) at ../src/drivers/driver_macsec_linux.c:998

Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
7 years agomka: Fix use-after-free when transmit secure channels are deleted
Davide Caratti [Thu, 16 Mar 2017 13:01:55 +0000 (14:01 +0100)] 
mka: Fix use-after-free when transmit secure channels are deleted

ieee802_1x_kay_deinit_transmit_sc() frees the transmit secure channel
data, but secy_delete_transmit_sc() still needs it. Since this functions
are called sequentially, secy_delete_transmit_sc() can be called from
ieee802_1x_kay_deinit_transmit_sc() before txsc is freed.

Fixes: 128f6a98b3d4 ("mka: Fix the order of operations in secure channel deletion")
Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
7 years agomka: Fix use-after-free when receive secure channels are deleted
Davide Caratti [Thu, 16 Mar 2017 13:01:54 +0000 (14:01 +0100)] 
mka: Fix use-after-free when receive secure channels are deleted

ieee802_1x_kay_deinit_receive_sc() frees the receive secure channel data,
but secy_delete_receive_sc() still needs it. Since these two functions
are always called sequentially, secy_delete_receive_sc() can be called
from ieee802_1x_kay_deinit_receive_sc() before rxsc is freed.

Fixes: 128f6a98b3d4 ("mka: Fix the order of operations in secure channel deletion")
Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
7 years agowlantest: Fix EAPOL-Key Key Data padding removal
Jouni Malinen [Fri, 24 Mar 2017 21:34:19 +0000 (23:34 +0200)] 
wlantest: Fix EAPOL-Key Key Data padding removal

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agowlantest: Add initial support for FT-EAP decryption
Jouni Malinen [Fri, 24 Mar 2017 18:54:47 +0000 (20:54 +0200)] 
wlantest: Add initial support for FT-EAP decryption

Add second half of MSK as XXKey for FT-EAP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agowlantest: Fix EAPOL buffer length with variable MIC length
Jouni Malinen [Fri, 24 Mar 2017 18:53:54 +0000 (20:53 +0200)] 
wlantest: Fix EAPOL buffer length with variable MIC length

struct wpa_eapol_key does not include the MIC field anymore, so need to
add it explicitly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoQCA vendor attributes to extend antenna diversity functionality
lifeng [Fri, 10 Mar 2017 10:51:56 +0000 (18:51 +0800)] 
QCA vendor attributes to extend antenna diversity functionality

1. Add new attribute to report corresponding antenna information to the
chain RSSI which is used in subcmd
QCA_NL80211_VENDOR_SUBCMD_GET_CHAIN_RSSI.

2. Add a series of attr to support the new wmi interface
WMI_PDEV_PARAM_ANT_DIV_USRCFG which export parameters setting of antenna
diversity algorithm to userspace.

Signed-off-by: Li Feng <lifeng@qti.qualcomm.com>
7 years agoAdd vendor attribute to config propagation delay's absolute value
Zhang Qian [Fri, 10 Mar 2017 13:12:49 +0000 (21:12 +0800)] 
Add vendor attribute to config propagation delay's absolute value

QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_ABS_DELAY is added to set
propagation delay's absolute value. This is a more detailed version of
QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY.

Signed-off-by: Zhang Qian <zhangq@qti.qualcomm.com>
7 years agoFix QCA_ATTR_NUD_STATS_IS_DAD value
Dmitry Shmidt [Tue, 14 Mar 2017 17:33:50 +0000 (17:33 +0000)] 
Fix QCA_ATTR_NUD_STATS_IS_DAD value

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
7 years agotests: P2P device discovery and p2p_find restart
Jouni Malinen [Mon, 13 Mar 2017 15:08:22 +0000 (17:08 +0200)] 
tests: P2P device discovery and p2p_find restart

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoP2P: Run full P2P_FIND scan after pending scan completes
Jouni Malinen [Mon, 13 Mar 2017 15:05:55 +0000 (17:05 +0200)] 
P2P: Run full P2P_FIND scan after pending scan completes

If a P2P_FIND command is issued for running the initial full scan and
the attempt to start that full scan fails, the previous behavior was to
wait for the ongoing scan to complete and then continue p2p_find scan
iterations. However, this continued with the social channels scan
instead of the initial full scan. This could end up missing the full
scan completely.

Fix this by marking the full scan pending if the new scan cannot be
started immediately. Then start the initial full scan after the ongoing
scan completes before moving to social channel only scan iterations.
This applies both for the P2P_FIND_START_WITH_FULL (no specific
frequency set) and P2P_FIND_PROGRESSIVE cases since both of them start
with a single full scan round.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: Additional coverage for P2P_FIND freq argument
Jouni Malinen [Mon, 13 Mar 2017 10:52:44 +0000 (12:52 +0200)] 
tests: Additional coverage for P2P_FIND freq argument

This test case verifies that the specified channel is included in the
consecutive p2p_find scan iterations.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoP2P: Continue scanning specified channel with P2P_FIND freq argument
Jouni Malinen [Mon, 13 Mar 2017 10:50:50 +0000 (12:50 +0200)] 
P2P: Continue scanning specified channel with P2P_FIND freq argument

This makes the "P2P_FIND freq=<MHz>" operation more robust by continuing
to include the specified frequency in the consecutive scan rounds
instead of including it only once in the first scan. In other words, the
first scan is only for the specified frequency just like the previous
behavior, but the following scans include all the social channels and
the specified frequency instead of just the previously used social
channels.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: Skip FILS SK PFS test cases if PFS functionality not in the build
Jouni Malinen [Mon, 13 Mar 2017 09:46:59 +0000 (11:46 +0200)] 
tests: Skip FILS SK PFS test cases if PFS functionality not in the build

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFILS: Add FILS-SK-PFS capability into "GET_CAPABILITY fils" command
Jouni Malinen [Mon, 13 Mar 2017 09:46:30 +0000 (11:46 +0200)] 
FILS: Add FILS-SK-PFS capability into "GET_CAPABILITY fils" command

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: FILS SK authentication type mismatch (PFS not supported)
Jouni Malinen [Sun, 12 Mar 2017 21:04:24 +0000 (23:04 +0200)] 
tests: FILS SK authentication type mismatch (PFS not supported)

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFILS: Check FILS Indication element against local network profile
Jouni Malinen [Sun, 12 Mar 2017 20:59:52 +0000 (22:59 +0200)] 
FILS: Check FILS Indication element against local network profile

Do not try to use FILS authentication unless the AP indicates support
for the type the local network profile enforces.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: FILS SK with PFS
Jouni Malinen [Sun, 12 Mar 2017 20:46:50 +0000 (22:46 +0200)] 
tests: FILS SK with PFS

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFILS: Add FILS SK auth PFS support in STA mode
Jouni Malinen [Sun, 12 Mar 2017 20:45:35 +0000 (22:45 +0200)] 
FILS: Add FILS SK auth PFS support in STA mode

This adds an option to configure wpa_supplicant to use the perfect
forward secrecy option in FILS shared key authentication. A new build
option CONFIG_FILS_SK_PFS=y can be used to include this functionality. A
new runtime network profile parameter fils_dh_group is used to enable
this by specifying which DH group to use. For example, fils_dh_group=19
would use FILS SK PFS with a 256-bit random ECP group.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFILS: Add FILS SK auth PFS support in AP mode
Jouni Malinen [Sun, 12 Mar 2017 20:40:56 +0000 (22:40 +0200)] 
FILS: Add FILS SK auth PFS support in AP mode

This adds an option to configure hostapd to enable use of perfect
forward secrecy option in FILS shared key authentication. A new build
option CONFIG_FILS_SK_PFS=y can be used to include this functionality. A
new runtime configuration parameter fils_dh_group is used to enable this
by specifying which DH group to use. For example, fils_dh_group=19 would
allow FILS SK PFS to be used with a 256-bit random ECP group.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFILS: Define authentication algorithm for FILS SK auth with PFS
Jouni Malinen [Sun, 12 Mar 2017 20:39:38 +0000 (22:39 +0200)] 
FILS: Define authentication algorithm for FILS SK auth with PFS

This is needed to add PFS support into hostapd and wpa_supplicant FILS
shared key authentication.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Opportunistic Wireless Encryption (OWE)
Jouni Malinen [Sat, 11 Mar 2017 22:48:19 +0000 (00:48 +0200)] 
tests: Opportunistic Wireless Encryption (OWE)

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoOWE: Add CONFIG_OWE=y build option
Jouni Malinen [Sat, 11 Mar 2017 22:38:24 +0000 (00:38 +0200)] 
OWE: Add CONFIG_OWE=y build option

This can be used to enable OWE support in hostapd and wpa_supplicant
builds.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoOWE: Use AKM 00-0F-AC:11 style parameters for EAPOL-Key frames
Jouni Malinen [Sun, 12 Mar 2017 18:40:43 +0000 (20:40 +0200)] 
OWE: Use AKM 00-0F-AC:11 style parameters for EAPOL-Key frames

draft-harkins-owe-07.txt does not specify these parameters, so need to
pick something sensible to use for the experimental implementation. The
Suite B 128-bit level AKM 00-0F-AC:11 has reasonable parameters for the
DH group 19 case (i.e., SHA256 hash), so use it for now. This can be
updated if the OWE RFC becomes clearer on the appropriate parameters
(KEK/KCK/MIC length, PRF/KDF algorithm, and key-wrap algorithm).

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoPrint the algorithms used for EAPOL-Key professing in log
Jouni Malinen [Sun, 12 Mar 2017 17:43:39 +0000 (19:43 +0200)] 
Print the algorithms used for EAPOL-Key professing in log

This makes it easier to debug crypto algorithm selection for 4-way
handshake related functions.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoReturn success/failure result from sha384_prf()
Jouni Malinen [Sun, 12 Mar 2017 17:40:29 +0000 (19:40 +0200)] 
Return success/failure result from sha384_prf()

This makes the function more consistent with sha256_prf().

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoOWE: Process Diffie-Hellman Parameter element in STA mode
Jouni Malinen [Sun, 12 Mar 2017 09:53:21 +0000 (11:53 +0200)] 
OWE: Process Diffie-Hellman Parameter element in STA mode

This adds STA side addition of OWE Diffie-Hellman Parameter element into
(Re)Association Request frame and processing it in (Re)Association
Response frame.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoOWE: Process Diffie-Hellman Parameter element in AP mode
Jouni Malinen [Sat, 11 Mar 2017 23:26:43 +0000 (01:26 +0200)] 
OWE: Process Diffie-Hellman Parameter element in AP mode

This adds AP side processing for OWE Diffie-Hellman Parameter element in
(Re)Association Request frame and adding it in (Re)Association Response
frame.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoOWE: Add driver capability flag for OWE AKM
Jouni Malinen [Sat, 11 Mar 2017 22:38:04 +0000 (00:38 +0200)] 
OWE: Add driver capability flag for OWE AKM

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoOWE: Define and parse OWE AKM selector
Jouni Malinen [Sat, 11 Mar 2017 22:32:23 +0000 (00:32 +0200)] 
OWE: Define and parse OWE AKM selector

This adds a new RSN AKM "OWE".

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoOWE: Define and parse Diffie-Hellman Parameter element
Jouni Malinen [Sat, 11 Mar 2017 22:23:36 +0000 (00:23 +0200)] 
OWE: Define and parse Diffie-Hellman Parameter element

Add WLAN_EID_EXT_OWE_DH_PARAM definition and extend
ieee802_11_parse_elems() to recognize this element.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Extract-and-Expand HKDF (RFC 5869)
Jouni Malinen [Sat, 11 Mar 2017 20:40:31 +0000 (22:40 +0200)] 
tests: Extract-and-Expand HKDF (RFC 5869)

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoExtend hmac_sha256_kdf() to support HKDF-Expand() as defined in RFC 5869
Jouni Malinen [Sat, 11 Mar 2017 20:38:47 +0000 (22:38 +0200)] 
Extend hmac_sha256_kdf() to support HKDF-Expand() as defined in RFC 5869

The KDF define in RFC 5295 is very similar to HKDF-Expand() defined in
RFC 5869. Allow a NULL label to be used to select the RFC 5869 version
with arbitrary seed (info in RFC 5869) material without forcing the
label and NULL termination to be included. HKDF-Expand() will be needed
for OWE.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoOpenSSL: Add wrapper functions for ECDH
Jouni Malinen [Sat, 11 Mar 2017 16:54:33 +0000 (18:54 +0200)] 
OpenSSL: Add wrapper functions for ECDH

These allow ECDH to be used with compressed public key encoding (only
x-coordinate). This is needed for FILS PFS and OWE.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: wpa_supplicant AP mode - HT disabled
Jouni Malinen [Sat, 11 Mar 2017 09:20:17 +0000 (11:20 +0200)] 
tests: wpa_supplicant AP mode - HT disabled

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agowpa_supplicant: Allow disabling HT in AP mode without HT overrides
Johannes Berg [Tue, 7 Mar 2017 16:20:59 +0000 (18:20 +0200)] 
wpa_supplicant: Allow disabling HT in AP mode without HT overrides

Since VHT can be toggled explicitly, also expose being able to disable
HT explicitly, without requiring HT overrides. Continue making it
default to enabled though.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agotests: add wpa_supplicant 80 MHz VHT network test
Johannes Berg [Tue, 7 Mar 2017 16:20:58 +0000 (18:20 +0200)] 
tests: add wpa_supplicant 80 MHz VHT network test

Add a test for the configuration knobs exposed in the previous
patch; more precisely, add a test that creates an 80 MHz VHT
network through wpa_supplicant (without P2P).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agowpa_supplicant: Allow explicit wide channel configuration for AP mode
Johannes Berg [Tue, 7 Mar 2017 16:20:57 +0000 (18:20 +0200)] 
wpa_supplicant: Allow explicit wide channel configuration for AP mode

Instead of deducing the wide (HT, VHT) channel configuration only
automatically in P2P mode, allow it to be configured in the network
in non-P2P mode.

Also allow all of these parameters to be configured through the control
interface or the configuration file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agowpa_cli: Execute action file in case of WPS_EVENT_TIMEOUT
Jörg Krause [Thu, 9 Mar 2017 09:59:50 +0000 (10:59 +0100)] 
wpa_cli: Execute action file in case of WPS_EVENT_TIMEOUT

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
7 years agowpa_cli: Execute action file in case of WPS_EVENT_ACTIVE
Jörg Krause [Thu, 9 Mar 2017 09:59:49 +0000 (10:59 +0100)] 
wpa_cli: Execute action file in case of WPS_EVENT_ACTIVE

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
7 years agoWPS: Notify about WPS PBC event in Enrollee mode
Jörg Krause [Thu, 9 Mar 2017 09:59:48 +0000 (10:59 +0100)] 
WPS: Notify about WPS PBC event in Enrollee mode

Previously, the event "WPS-PBC-ACTIVE" was only generated when
wpa_supplicant is operating as WPS Registrar whereas "WPS-SUCCESS" or
"WPS-TIMEOUT" are generated for both, the Registrar and the Enrollee
roles.

Also generate the event when wpa_supplicant is operating as WPS Enrollee
to allow monitoring the begin and the end of a WPS PBC process.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
7 years agowpa_supplicant: events: Don't bounce timeout reason through a buffer
Johannes Berg [Wed, 8 Mar 2017 20:41:17 +0000 (21:41 +0100)] 
wpa_supplicant: events: Don't bounce timeout reason through a buffer

There's no point in making the code use a stack buffer and first copying
the string there, only to copy it again to the output. Make the output
directly use the reason string.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agotests: BSS transition management query with unknown candidates
Avraham Stern [Wed, 8 Mar 2017 12:37:42 +0000 (14:37 +0200)] 
tests: BSS transition management query with unknown candidates

Verify that the AP responds to a BSS transition management query that
includes candidates unknown to the AP.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agowpa_cli: Update wnm_bss_query auto complete message
Avraham Stern [Wed, 8 Mar 2017 12:37:41 +0000 (14:37 +0200)] 
wpa_cli: Update wnm_bss_query auto complete message

It is now possible to add neighbor configuration to wnm_bss_query.
Update the auto complete message to reflect that.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agoWNM: Add option to configure candidates for BTM query candidate list
Avraham Stern [Wed, 8 Mar 2017 12:37:40 +0000 (14:37 +0200)] 
WNM: Add option to configure candidates for BTM query candidate list

Add a mechanism to configure the candidates for BTM query candidate list
manually. This can be used to verify AP behavior for various candidates
preferences.

usage:
wnm_bss_query <reason> [neighbor=<BSSID>,<BSSID information>,
                <operating class>,<channel number>,
<PHY type>[,<hexdump of optional subelements>]]

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agocommon: Add candidate list parsing helper function
Avraham Stern [Wed, 8 Mar 2017 12:37:39 +0000 (14:37 +0200)] 
common: Add candidate list parsing helper function

Add a helper function that parses candidate list from command line
arguments.

This function will be used (in the following commits) to add
a candidate list to BSS transition management query.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agoWNM: Use a dynamically allocated buffer for BTM query and response
Avraham Stern [Wed, 8 Mar 2017 12:37:38 +0000 (14:37 +0200)] 
WNM: Use a dynamically allocated buffer for BTM query and response

BSS transition management query and response use a large static buffer
for the frame because the candidate list may require a lot of space.
However, in most cases the actually used space will be much less than
the buffer (since the candidate list is short or completely missing).

Use a dynamically allocated buffer instead and allocate it according
to the actual space needed.

While at it, remove unneeded filling of the MAC header in the Action
frames, since this gets ignored and wpa_drv_send_action() adds the MAC
header anyway.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
7 years agotests: MBO ANQP
Jouni Malinen [Fri, 10 Mar 2017 16:59:12 +0000 (18:59 +0200)] 
tests: MBO ANQP

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoMBO: Parse MBO ANQP-element on STA
Jouni Malinen [Fri, 10 Mar 2017 16:57:12 +0000 (18:57 +0200)] 
MBO: Parse MBO ANQP-element on STA

This extends the GAS/ANQP parser in wpa_supplicant to process MBO
ANQP-elements and indicate received Cellular Data Connection Preference
values over the control interface.

When a valid MBO ANQP-element is received, the following control
interface message is sent:

RX-MBO-ANQP <BSSID> cell_conn_pref=<value>

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoMBO: Add MBO ANQP-element processing on AP
Jouni Malinen [Fri, 10 Mar 2017 16:33:51 +0000 (18:33 +0200)] 
MBO: Add MBO ANQP-element processing on AP

This extends the GAS server to process MBO ANQP-elements and reply to a
query for the Cellular Data Connection Preference (if configured). The
new configuration parameter mbo_cell_data_conn_pref can be used to set
the value (0, 1, or 255) for the preference to indicate.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: Extend ANQP_GET coverage for new functionality
Jouni Malinen [Fri, 10 Mar 2017 15:03:55 +0000 (17:03 +0200)] 
tests: Extend ANQP_GET coverage for new functionality

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoANQP: Extend ANQP_GET command to request without IEEE 802.11 elements
Jouni Malinen [Fri, 10 Mar 2017 15:02:22 +0000 (17:02 +0200)] 
ANQP: Extend ANQP_GET command to request without IEEE 802.11 elements

Previously, ANQP_GET required at least one IEEE 802.11 ANQP-element to
be requested. This is not really necessary, so allow a case where
num_ids == 0 as long as the request includes at least one Hotspot 2.0 or
MBO ANQP-element.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: Fix MBO ANQP cellular data preference query
Avraham Stern [Mon, 6 Mar 2017 12:59:55 +0000 (14:59 +0200)] 
tests: Fix MBO ANQP cellular data preference query

The cellular data preference ANQP element subtype is now 2, so
fix the command to query the MBO cellular data preference.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>