]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
5 years agotests: D-Bus Get/Set Pmf
Lubomir Rintel [Sun, 7 Oct 2018 14:59:40 +0000 (16:59 +0200)] 
tests: D-Bus Get/Set Pmf

Based on Jouni Malinen's [76055b4c6 "tests: D-Bus Get/Set Pmf"], modified
to use the correct "s" signature for the "Pmf" property.

Removed the negative test cases, because the synthesized property doens't
seem to do error checking upon being set.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
5 years agoRevert "D-Bus: Implement Pmf property"
Lubomir Rintel [Sun, 7 Oct 2018 14:59:39 +0000 (16:59 +0200)] 
Revert "D-Bus: Implement Pmf property"

This reverts commit adf8f45f8af27a9ac9429ecde81776b19b6f9224.

It is basically all wrong. The Pmf property did exist, with a signature of
"s" as documented in doc/dbus.doxygen. It was synthesized from
global_fields[].

The patch added a duplicate one, with a signature of "u", in violation
of D-Bus specification and to bemusement of tools that are careful
enough:

  $ busctl introspect fi.w1.wpa_supplicant1 /fi/w1/wpa_supplicant1/Interfaces/666
  Duplicate property

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
5 years agoRevert "tests: D-Bus Get/Set Pmf"
Lubomir Rintel [Sun, 7 Oct 2018 14:59:38 +0000 (16:59 +0200)] 
Revert "tests: D-Bus Get/Set Pmf"

This is wrong. The Pmf property has a "s" signature.

This reverts commit 76055b4c6115620421313038b6128f3b93d5160e.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
5 years agomesh: Add Category and Action field to maximum buffer length
Jouni Malinen [Sat, 24 Nov 2018 11:36:54 +0000 (13:36 +0200)] 
mesh: Add Category and Action field to maximum buffer length

Make the buf_len calculation match more closely with the following
wpa_buf*() operations. The extra room from the existing elements was
apparently sufficiently large to cover this, but better add the two
octet header explicitly.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agomesh: Fix off-by-one in buf length calculation
Bob Copeland [Fri, 23 Nov 2018 15:15:42 +0000 (10:15 -0500)] 
mesh: Fix off-by-one in buf length calculation

The maximum size of a Mesh Peering Management element in the case
of an AMPE close frame is actually 24 bytes, not 23 bytes, plus the
two bytes of the IE header (IEEE Std 802.11-2016, 9.4.2.102). Found by
inspection.

The other buffer components seem to use large enough extra room in their
allocations to avoid hitting issues with the full buffer size even
without this fix.

Signed-off-by: Bob Copeland <bobcopeland@fb.com>
5 years agoexamples: Fix shellcheck warnings in wps-ap-cli
Davide Caratti [Mon, 10 Sep 2018 11:00:36 +0000 (13:00 +0200)] 
examples: Fix shellcheck warnings in wps-ap-cli

use 'printf' instead of 'echo -n', to suppress the following warning:

In POSIX sh, echo flags are undefined. [SC2039]

Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
5 years agotests: Store the correct PID in hostapd-test.pid file
Andrei Otcheretianski [Tue, 23 Oct 2018 11:07:05 +0000 (14:07 +0300)] 
tests: Store the correct PID in hostapd-test.pid file

The hwsim's start.sh script spawns hostapd process using "sudo".
Since sudo forks a child process, $! holds the pid of sudo itself.
Fix that by storing the PID of the child process instead.
Since in VM "sudo" is replaced with a dummy script, pass an additional
argument to run-all.sh and start.sh scripts to indicate that they are
running inside a VM.

This is needed to fix ap_config_reload and ap_config_reload_file test
cases on some platforms where sudo is apparently not relaying the
signals properly.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
5 years agotests: Fix ap_acl_deny test
Ayala Beker [Tue, 23 Oct 2018 11:23:52 +0000 (14:23 +0300)] 
tests: Fix ap_acl_deny test

In ap_acl_deny test, the AP doesn't send probe responses during scan due
to ACL reject. As the result, dev[0] might miss the AP's Beacon frame
because the dwell time is too short. Make the test more robust and
trigger passive scan, and by that increase the probability of hearing
the AP.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
5 years agonl80211: Use correct u8 size for NL80211_ATTR_SMPS_MODE
Johannes Berg [Fri, 26 Oct 2018 13:50:48 +0000 (15:50 +0200)] 
nl80211: Use correct u8 size for NL80211_ATTR_SMPS_MODE

Back in December 2017, Jouni fixed the output side since that was
causing a kernel message to be printed, but the input side should
also be fixed, otherwise it will not work correctly on big-endian
platforms.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
5 years agoFix dpp_configurator_get_key command name in hostapd_cli
Damodaran, Rohit (Contractor) [Thu, 15 Nov 2018 14:20:32 +0000 (14:20 +0000)] 
Fix dpp_configurator_get_key command name in hostapd_cli

The option to get DPP configurator key in hostapd_cli was named
incorrectly. It was wrongly pointing to dpp_configurator_remove. Fix
this by using the correct name.

Signed-off-by: Rohit Damodaran <Rohit_Damodaran@comcast.com>
5 years agoHS 2.0: Update HS2.0 AP version RADIUS attribute Version field
Jouni Malinen [Fri, 9 Nov 2018 21:38:31 +0000 (23:38 +0200)] 
HS 2.0: Update HS2.0 AP version RADIUS attribute Version field

Use HS20_VERSION macro to determine if R3 should be indicated instead of
R2.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Mark OSU BSS explicitly in sigma_dut_ap_hs20
Jouni Malinen [Fri, 9 Nov 2018 16:10:28 +0000 (18:10 +0200)] 
tests: Mark OSU BSS explicitly in sigma_dut_ap_hs20

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: ap_hs20_osen to test group cipher selection in SME case
Jouni Malinen [Fri, 9 Nov 2018 16:09:34 +0000 (18:09 +0200)] 
tests: ap_hs20_osen to test group cipher selection in SME case

Go through the group cipher selection in both the wpa_supplicant and
driver SME cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Generate AssocReq OSEN IE based on AP advertisement
Jouni Malinen [Fri, 9 Nov 2018 16:07:16 +0000 (18:07 +0200)] 
HS 2.0: Generate AssocReq OSEN IE based on AP advertisement

Parse the OSEN IE from the AP to determine values used in the AssocReq
instead of using hardcoded cipher suites. This is needed to be able to
set the group cipher based on AP advertisement now that two possible
options exists for this (GTK_NOT_USED in separate OSEN BSS; CCMP or
GTK_NOT_USED in shared BSS case). Furthermore, this is a step towards
allowing other ciphers than CCMP to be used with OSEN.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDefine new QCA vendor command for coex priority config
Sachin Ahuja [Mon, 29 Oct 2018 11:31:12 +0000 (17:01 +0530)] 
Define new QCA vendor command for coex priority config

Add QCA_NL80211_VENDOR_SUBCMD_COEX_CONFIG vendor command
to set the priorities among different types of traffic of
WLAN/BT/Zigbee during coex scenarios.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAdd QCA vendor event to indicate throughput changes
vamsi krishna [Wed, 31 Oct 2018 21:50:21 +0000 (03:20 +0530)] 
Add QCA vendor event to indicate throughput changes

Add interface for drivers to report changes in TX/RX throughput
dynamically to user space. This information can be used by userspace
tools to tune kernel's TCP parameters in order to achieve peak
throughput. The driver may optionally provide guidance on which TCP
parameters to be configured for optimal performance along with the
values to be configured.

The TCP parameters that need to be tuned for peak performance are not
interface specific. Based on the guidance from the driver and
considering the other interfaces that may be affected with the new
configurations, a userspace tool has to choose the values to be
configured for these parameters to achieve optimal performance across
interfaces.

The throughput levels informed by the driver with this event are only
for providing guidance on TCP parameter tuning from userspace. The
driver may change the thresholds used to decide low or medium or high
throughput levels based on several parameters based on the PHY layer
capacity in the current connection, the number of packets being
dispatched per second, or the number of packets pending in queues, etc.
The throughput levels may not be consistent with the actual throughput
of the link.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Use more correct OSU_METHOD value in sigma_dut_ap_hs20
Jouni Malinen [Tue, 6 Nov 2018 00:04:09 +0000 (02:04 +0200)] 
tests: Use more correct OSU_METHOD value in sigma_dut_ap_hs20

The OSU Providers List includes two providers, so there should be two
OSU_METHOD values listed just like there was two OSU_SERVER_URI URLs.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Use bridge in sigma_dut_ap_eap_osen
Jouni Malinen [Mon, 5 Nov 2018 22:46:23 +0000 (00:46 +0200)] 
tests: Use bridge in sigma_dut_ap_eap_osen

This is needed to allow sigma_dut to enable ap_isolate=1. In addition,
verify that the two associated STAs with RSN(EAP) and OSEN cannot
exchange frames between them.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAdd test config QCA vendor attribute for action frame Tx in TB PPDU
Kiran Kumar Lokere [Wed, 26 Sep 2018 00:45:28 +0000 (17:45 -0700)] 
Add test config QCA vendor attribute for action frame Tx in TB PPDU

Add a new wifi test config QCA vendor attribute to configure action
frame transmission in HE trigger based PPDU.
This is used for testbed configuration.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDefine test config QCA vendor attribute for HE SU PPDU Tx config
Kiran Kumar Lokere [Wed, 26 Sep 2018 00:24:38 +0000 (17:24 -0700)] 
Define test config QCA vendor attribute for HE SU PPDU Tx config

Add a new wifi test config QCA vendor attribute to configure HE
single user PPDU transmission.
This is used for testbed configuration.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDefine test config QCA vendor attribute for HE OM control config
Kiran Kumar Lokere [Fri, 21 Sep 2018 00:39:23 +0000 (17:39 -0700)] 
Define test config QCA vendor attribute for HE OM control config

Add a new wifi test config QCA vendor attributes to configure HE
operating mode control field bandwidth, number of spatial streams, and
UL MU disable configuration. Define a new attribute to clear the
previously set HE OM control field configuration. This is used for
testbed configuration.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: sigma_dut AP configuration for Hotspot 2.0
Jouni Malinen [Thu, 1 Nov 2018 15:10:40 +0000 (17:10 +0200)] 
tests: sigma_dut AP configuration for Hotspot 2.0

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Fix Terms and Conditions URL handling
Jouni Malinen [Tue, 30 Oct 2018 17:15:11 +0000 (19:15 +0200)] 
HS 2.0: Fix Terms and Conditions URL handling

Do not try to determine the length of the T&C Server URL before checking
that the URL is available. This got broken in a change to move the
handling to the AS. hostapd could potentially have hit a NULL pointer
dereference if the authentication server sent an unconsistent set of T&C
information.

Fixes: d4e39c51f8bb ("HS 2.0: Move Terms and Conditions Server URL generation from AP to AS")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOCE: Move OCE checks to IE formation from hostapd initialization
Ankita Bajaj [Tue, 16 Oct 2018 14:32:19 +0000 (20:02 +0530)] 
OCE: Move OCE checks to IE formation from hostapd initialization

Earlier, the OCE flags were checked during hostapd initialization. This
doesn't address few cases like for example when the interface is added
from control interface. Move the OCE flag checks to the functions that
are forming the MBO/OCE IEs to cover all the different paths for
enabling a BSS. Also use macros as appropriate for readability.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Do not require devinfo.xml for all hs20-osu-client operations
Jouni Malinen [Tue, 30 Oct 2018 13:29:12 +0000 (15:29 +0200)] 
HS 2.0: Do not require devinfo.xml for all hs20-osu-client operations

hs20-osu-client refused to do anything if it could not find devinfo.xml
from the current working directory. This is a bit excessive since that
file was used in init_ctx() only to fill in ctx->devid which is used
when constructing OMA DM messages.

Move the check for ctx->devid into OMA DM specific code so that other
hs20-osu-client functionality can be used without the devinfo.xml file.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: WNM Collocated Interference Reporting
Jouni Malinen [Tue, 30 Oct 2018 11:59:31 +0000 (13:59 +0200)] 
tests: WNM Collocated Interference Reporting

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoWNM: Collocated Interference Reporting
Jouni Malinen [Tue, 30 Oct 2018 12:00:00 +0000 (14:00 +0200)] 
WNM: Collocated Interference Reporting

Add support for negotiating WNM Collocated Interference Reporting. This
allows hostapd to request associated STAs to report their collocated
interference information and wpa_supplicant to process such request and
reporting. The actual values (Collocated Interference Report Elements)
are out of scope of hostapd and wpa_supplicant, i.e., external
components are expected to generated and process these.

For hostapd/AP, this mechanism is enabled by setting
coloc_intf_reporting=1 in configuration. STAs are requested to perform
reporting with "COLOC_INTF_REQ <addr> <Automatic Report Enabled> <Report
Timeout>" control interface command. The received reports are indicated
as control interface events "COLOC-INTF-REPORT <addr> <dialog token>
<hexdump of report elements>".

For wpa_supplicant/STA, this mechanism is enabled by setting
coloc_intf_reporting=1 in configuration and setting Collocated
Interference Report Elements as a hexdump with "SET coloc_intf_elems
<hexdump>" control interface command. The hexdump can contain one or
more Collocated Interference Report Elements (each including the
information element header). For additional testing purposes, received
requests are reported with "COLOC-INTF-REQ <dialog token> <automatic
report enabled> <report timeout>" control interface events and
unsolicited reports can be sent with "COLOC_INTF_REPORT <hexdump>".

This commit adds support for reporting changes in the collocated
interference (Automatic Report Enabled == 1 and partial 3), but not for
periodic reports (2 and other part of 3).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agonl80211: Read reg-domain information from a specific wiphy
Peng Xu [Thu, 18 Oct 2018 19:03:25 +0000 (12:03 -0700)] 
nl80211: Read reg-domain information from a specific wiphy

If driver supports self-managed regulatory domain, read reg-domain
information for that specific wiphy interface instead the global
information which may be different which such drivers. This fixes issues
where a regulatory update with a self-managed regulatory domain driver
ended up building incorrect list of supported channels for upper layer
hostapd/wpa_supplicant operations.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agonl80211: Add support for self-managed regulatory device
Peng Xu [Thu, 18 Oct 2018 18:17:05 +0000 (11:17 -0700)] 
nl80211: Add support for self-managed regulatory device

Add a flag indicating if the device has the self-managed regulatory
support. Set the flag if NL80211_ATTR_WIPHY_SELF_MANAGED_REG attribute
is set when reading wiphy info.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoEnable the close-on-exec flag for the debug log file descriptor
Karol Babioch [Sun, 14 Oct 2018 19:58:58 +0000 (21:58 +0200)] 
Enable the close-on-exec flag for the debug log file descriptor

On Linux this flag will make sure that no file descriptor is
accidentally leaked into potential child processes. While this is not a
problem right now, it is considered to be good practice these days when
dealing with file descriptors on Linux.

Signed-off-by: Karol Babioch <karol@babioch.de>
5 years agoCreate debug log file with more sane file permissions
Karol Babioch [Tue, 16 Oct 2018 15:50:12 +0000 (17:50 +0200)] 
Create debug log file with more sane file permissions

Previously the file permissions for the debug log file were not
explicitly set. Instead it was implicitly relying on a secure umask,
which in most cases would result in a file that is world-readable. This
is a violation of good practices, since not every user should have
access to sensitive information that might be contained in the debug log
file.

Explicitly set sane default file permissions in case the file is newly
created.

Unfortunately the fopen(3) function does not provide such a facility, so
the approach needs to be changed in the following way:

1) The file descriptor needs to be created manually using the open(3)
function with the correct flags and the desired mode set.

2) fdopen(3) can then be used on the file descriptor to associate a file
stream with it.

Note: This modification will not change the file permissions of any
already existing debug log files, and only applies to newly created
ones.

Signed-off-by: Karol Babioch <karol@babioch.de>
5 years agotests: Make autogo_interworking test more robust
Andrei Otcheretianski [Wed, 22 Aug 2018 17:31:44 +0000 (20:31 +0300)] 
tests: Make autogo_interworking test more robust

P2P related configuration should be done on a global control interface.
This way this test can be reused also when a dedicated P2P device
interface is used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
5 years agoAP: Place the WPA IE in the correct order
Ilan Peer [Thu, 23 Aug 2018 13:52:33 +0000 (16:52 +0300)] 
AP: Place the WPA IE in the correct order

In case the protocol used for the BSS is WPA, the WPA vendor IE should
be placed after all the non vendor IEs. Fix this for Beacon and Probe
Response frames.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
5 years agoSME: Fix order of WPA IE in association request
Ilan Peer [Thu, 23 Aug 2018 13:52:32 +0000 (16:52 +0300)] 
SME: Fix order of WPA IE in association request

In case that the protocol used for association is WPA the WPA IE was
inserted before other (non vendor specific) IEs. This is not in
accordance to the standard that states that vendor IEs should be placed
after all the non vendor IEs are placed. In addition, this would cause
the low layers to fail to properly order information elements.

To fix this, if the protocol used is WPA, store the WPA IE and reinsert
it after all the non vendor specific IEs were placed.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
5 years agotests: AP Channel Switch and DISABLE command before completion
Jouni Malinen [Fri, 19 Oct 2018 17:55:18 +0000 (20:55 +0300)] 
tests: AP Channel Switch and DISABLE command before completion

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agohostapd: Reset channel switch parameters on interface disable
Sriram R [Fri, 14 Sep 2018 11:06:06 +0000 (16:36 +0530)] 
hostapd: Reset channel switch parameters on interface disable

Previously, when an AP interface was disabled through a control
interface DISABLE command during a channel switch window, the interface
could not be reenabled due to beacon setup failure (which validates if
CSA is in progress).

Fix this by clearing channel switch parameters while disabling the
hostapd interface.

Signed-off-by: Sriram R <srirrama@codeaurora.org>
5 years agoDefine vendor specific NDP attribute for peer NDPE support
Peng Xu [Mon, 15 Oct 2018 21:08:35 +0000 (14:08 -0700)] 
Define vendor specific NDP attribute for peer NDPE support

Add NAN NDP attribute QCA_WLAN_VENDOR_ATTR_PEER_NDPE_SUPPORT which
indicates if NDP remote peer supports NDPE attribute or not.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Record policy update into users table
Jouni Malinen [Fri, 19 Oct 2018 16:00:37 +0000 (19:00 +0300)] 
HS 2.0: Record policy update into users table

This makes it easier to track whether a policy update has been
successfully completed.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Rename PPS/Credential1 node to Cred01
Jouni Malinen [Fri, 19 Oct 2018 15:07:37 +0000 (18:07 +0300)] 
HS 2.0: Rename PPS/Credential1 node to Cred01

This makes it a bit easier to use existing hardcoded PPS MO files for
testing purposes when the subscription remediation and policy update
operations target the same path.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Fix SubscriptionUpdate UpdateMethod value in OSU server
Jouni Malinen [Fri, 19 Oct 2018 15:00:02 +0000 (18:00 +0300)] 
HS 2.0: Fix SubscriptionUpdate UpdateMethod value in OSU server

This node was modified long time ago to include "SPP-" prefix. Fix the
OSU server implementation to use the correct value.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: OSU server test functionality for incorrect behavior (policy)
Jouni Malinen [Fri, 19 Oct 2018 14:57:39 +0000 (17:57 +0300)] 
HS 2.0: OSU server test functionality for incorrect behavior (policy)

Extend test=<value> special incorrect behavior testing capabilities in
the OSU server to include the fingerprint of the policy update trust
root: test=corrupt_polupd_hash.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: OSU server test functionality for incorrect behavior
Jouni Malinen [Wed, 17 Oct 2018 16:08:12 +0000 (19:08 +0300)] 
HS 2.0: OSU server test functionality for incorrect behavior

Add a mechanism to allow special incorrect behavior to be requested from
OSU server by adding an optional parameter test=<value> to the initial
signup URL. This is for protocol testing purposes for the OSU client.

This commit adds two special behavior cases: corrupt_aaa_hash and
corrupt_subrem_hash. These can be used to generate PPS MO with invalid
CertSHA256Fingerprint values for AAAServerTrustRoot and
SubscriptionUpdate nodes.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Reject PPS MO if polupd or AAA trust root is invalid
Jouni Malinen [Wed, 17 Oct 2018 16:03:18 +0000 (19:03 +0300)] 
HS 2.0: Reject PPS MO if polupd or AAA trust root is invalid

Previously, this was done only for the subscription remediation/update
trust root. The other downloaded files were also verified, but the OSU
server was not notified if the files were found to be invalid.

Modify hs20-osu-client behavior to explicitly notify the OSU server if
any of the three trust root types cannot be successfully downloaded.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Work around tshark bug in wpas_mesh_max_peering
Jouni Malinen [Wed, 17 Oct 2018 09:33:11 +0000 (12:33 +0300)] 
tests: Work around tshark bug in wpas_mesh_max_peering

It looks like tshark parser was broken at some point for
wlan.mesh.config.cap which is now (tshark 2.6.3) pointing to incorrect
field (same as wlan.mesh.config.ps_protocol). This used to work with
tshark 2.2.6.

For now, assume the capability field ends up being the last octet of the
frame.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Update tshark wlan_mgmt compatibility code for new version
Jouni Malinen [Tue, 16 Oct 2018 15:21:07 +0000 (18:21 +0300)] 
tests: Update tshark wlan_mgmt compatibility code for new version

It looks like at least tshark 2.6.3 uses a different error message for
unknown display filter fields:
tshark: Neither "wlan_mgt.fixed.category_code" nor "4" are field or protocol names.
and a different status exit code (2 instead of 1).

Add a new handler for this combination to allow automatic wlan_mgt to
wlan conversion to happen.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoAP: Warn about VLAN interface name truncations
Andrei Otcheretianski [Wed, 22 Aug 2018 17:47:32 +0000 (20:47 +0300)] 
AP: Warn about VLAN interface name truncations

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
5 years agonl80211: Warn about interface name truncations
Andrei Otcheretianski [Wed, 22 Aug 2018 17:47:31 +0000 (20:47 +0300)] 
nl80211: Warn about interface name truncations

This is something useful to know and also eliminates format truncation
warnings.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
5 years agotests: Make ap_reconnect_auth_timeout test more robust
Andrei Otcheretianski [Wed, 22 Aug 2018 17:31:45 +0000 (20:31 +0300)] 
tests: Make ap_reconnect_auth_timeout test more robust

This test starts two identical APs and assumes a connection to the first
one, though it is not necessary true. Fix that by starting the second AP
only after the connection is established.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
5 years agotests: ap_vht_csa_vht40 to check for unexpected disconnection
Jouni Malinen [Tue, 16 Oct 2018 09:44:48 +0000 (12:44 +0300)] 
tests: ap_vht_csa_vht40 to check for unexpected disconnection

This test case had an error that hit an unexpected disconnection. Add an
explicit check to verify that this does not happen anymore.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: Fix ap_vht_csa_vht40 test
Andrei Otcheretianski [Wed, 22 Aug 2018 17:11:17 +0000 (20:11 +0300)] 
tests: Fix ap_vht_csa_vht40 test

The channel configuration in CHAN_SWITCH command was incorrect. This
resulted in switching to HT40+ channel, while announcing HT40- in the
secondary channel IE. This caused a disconnection after the channel
switch. Fix that.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
5 years agoRSN: Use COMPACT_MACSTR to match MAC2STR
Johannes Berg [Wed, 22 Aug 2018 16:49:03 +0000 (19:49 +0300)] 
RSN: Use COMPACT_MACSTR to match MAC2STR

We shouldn't open-code the %02x... when we have COMPACT_MACSTR.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
5 years agotests: WMM advertisement parameter change
Jouni Malinen [Tue, 16 Oct 2018 09:30:57 +0000 (12:30 +0300)] 
tests: WMM advertisement parameter change

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoWMM: Update WMM parameter advertisement on the fly
Beni Lev [Wed, 22 Aug 2018 16:49:02 +0000 (19:49 +0300)] 
WMM: Update WMM parameter advertisement on the fly

Update the Beacon frame template once WMM parameters have been changed
and the AP is already up.

Signed-off-by: Beni Lev <beni.lev@intel.com>
5 years agotests: EAP-pwd local error case in eap_pwd_perform_confirm_exchange()
Jouni Malinen [Tue, 16 Oct 2018 09:13:31 +0000 (12:13 +0300)] 
tests: EAP-pwd local error case in eap_pwd_perform_confirm_exchange()

This is a regression test case for a memory leak on these error paths.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoEAP-pwd peer: Fix memory leak in eap_pwd_perform_confirm_exchange()
Nishant Chaprana [Tue, 21 Aug 2018 11:37:51 +0000 (17:07 +0530)] 
EAP-pwd peer: Fix memory leak in eap_pwd_perform_confirm_exchange()

hash variable is allocated memory using eap_pwd_h_init(), but there are
couple of error case code paths which skips deallocation of hash. The
memory of hash is deallocated using eap_pwd_h_final(). Fix this by
calling eap_pwd_h_final() at the end of the function if execution got
there through one of those error cases.

Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agotests: VHT with 80 MHz channel width reconfigured to 2.4 GHz HT
Jouni Malinen [Mon, 15 Oct 2018 21:51:21 +0000 (00:51 +0300)] 
tests: VHT with 80 MHz channel width reconfigured to 2.4 GHz HT

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFix 5 GHz to 2.4 GHz channel switch with hostapd through DISABLE/ENABLE
Sathishkumar Muruganandam [Mon, 15 Oct 2018 15:07:49 +0000 (20:37 +0530)] 
Fix 5 GHz to 2.4 GHz channel switch with hostapd through DISABLE/ENABLE

When moving a 5 GHz VHT AP to 2.4 GHz band with VHT disabled through the
hostapd control interface DISABLE/reconfig/ENABLE commands, enabling of
the AP on 2.4 GHz failed due to the previously configured VHT capability
being compared with hardware VHT capability on 2.4 GHz band:

hw vht capab: 0x0, conf vht capab: 0x33800132
Configured VHT capability [VHT_CAP_MAX_MPDU_LENGTH_MASK] exceeds max value supported by the driver (2 > 0)
ap: interface state DISABLED->DISABLED

Since VHT (ieee80211ac) config is already disabled for the 2.4 GHz band,
add fix this by validating vht_capab only when VHT is enabled.

Fixes: c781eb842852 ("hostapd: Verify VHT capabilities are supported by driver")
Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
5 years agotests: OWE group negotiation with PMF
Jouni Malinen [Mon, 15 Oct 2018 21:20:57 +0000 (00:20 +0300)] 
tests: OWE group negotiation with PMF

Verify that PMF does not end up reporting unexpected status code 30
(temporary rejection; SA Query).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoPMF: Do not start SA Query procedure if there is no association
Ashok Kumar [Fri, 12 Oct 2018 04:06:05 +0000 (09:36 +0530)] 
PMF: Do not start SA Query procedure if there is no association

Previous implementation ended up triggering PMF check for previous
association and SA Query procedure incorrectly in cases where there is a
STA entry in hostapd, but that STA is not in associated state. This
resulted in undesired temporary rejection of the association with status
code 30.

This ended up breaking OWE group negotiation when PMF is in use since
the check for the OWE group would have happened only after this earlier
PMF check and rejection (i.e., the station got status code 30 instead of
the expected 77).

For example, when the AP is configured with OWE group 21 and a station
tries groups 19, 20, and 21 (in this sequence), the first two
Association Request frames should be rejected with status code 77.
However, only the first one got that status code while the second one
got status code 30 due to that issue with PMF existing association
check.

Furthermore, hostapd was continuing with SA Query procedure with
unencrypted Action frames in this type of case even though there was no
existing association (and obviously, not an encryption key either).

Fix this by checking that the STA entry is in associated state before
initiating SA Query procedure based on the PMF rules.

Signed-off-by: Ashok Kumar <aponnaia@codeaurora.org>
5 years agotests: Maximum number of cred roaming_consortiums
Jouni Malinen [Sun, 14 Oct 2018 17:48:32 +0000 (20:48 +0300)] 
tests: Maximum number of cred roaming_consortiums

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agowpa_supplicant: Fix buffer overflow in roaming_consortiums
Andrei Otcheretianski [Sun, 16 Sep 2018 18:19:16 +0000 (21:19 +0300)] 
wpa_supplicant: Fix buffer overflow in roaming_consortiums

When configuring more than 36 roaming consortiums with SET_CRED, the
stack is smashed. Fix that by correctly verifying the
num_roaming_consortiums.

Fixes: 909a948b ("HS 2.0: Add a new cred block parameter roaming_consortiums")
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
5 years agonl80211: Implement netlink extended ACK support
Johannes Berg [Thu, 11 Oct 2018 13:55:49 +0000 (15:55 +0200)] 
nl80211: Implement netlink extended ACK support

Implement netlink extended ACK support to print out the error
message (if any).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
5 years agotests: SAE and MFP enabled without sae_require_mfp
Jouni Malinen [Sun, 14 Oct 2018 17:14:30 +0000 (20:14 +0300)] 
tests: SAE and MFP enabled without sae_require_mfp

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoSAE: Do not ignore option sae_require_mfp
Hauke Mehrtens [Wed, 10 Oct 2018 21:43:07 +0000 (23:43 +0200)] 
SAE: Do not ignore option sae_require_mfp

Without this patch sae_require_mfp is always activate, when ieee80211w
is set to optional all stations negotiating SAEs are being rejected when
they do not support PMF. With this patch hostapd only rejects these
stations in case sae_require_mfp is set to some value and not null.

Fixes ba3d435fe43 ("SAE: Add option to require MFP for SAE associations")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agoDrop logging priority for handle_auth_cb no-STA-match messages
Jouni Malinen [Sun, 14 Oct 2018 17:03:55 +0000 (20:03 +0300)] 
Drop logging priority for handle_auth_cb no-STA-match messages

This message was printed and MSG_INFO level which would be more
reasonable for error cases where hostapd has accepted authentication.
However, this is not really an error case for the cases where
authentication was rejected (e.g., due to MAC ACL). Drop this to use
MSG_DEBUG level.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoReduce undesired logging of ACL rejection events from AP mode
Jouni Malinen [Sun, 14 Oct 2018 16:57:22 +0000 (19:57 +0300)] 
Reduce undesired logging of ACL rejection events from AP mode

When Probe Request frame handling was extended to use MAC ACL through
ieee802_11_allowed_address(), the MSG_INFO level log print ("Station
<addr> not allowed to authenticate") from that function ended up getting
printed even for Probe Request frames. That was not by design and it can
result in excessive logging and MSG_INFO level if MAC ACL is used.

Fix this by printing this log entry only for authentication and
association frames. In addition, drop the priority of that log entry to
MSG_DEBUG since this is not really an unexpected behavior in most MAC
ACL use cases.

Fixes: 92eb00aec2a0 ("Extend ACL check for Probe Request frames")
Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: OWE transition mode and need for multiple scans
Jouni Malinen [Fri, 12 Oct 2018 16:20:33 +0000 (19:20 +0300)] 
tests: OWE transition mode and need for multiple scans

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOWE: Improve discovery of OWE transition mode AP
Ilan Peer [Wed, 22 Aug 2018 16:49:04 +0000 (19:49 +0300)] 
OWE: Improve discovery of OWE transition mode AP

An OWE AP device that supports transition mode does not transmit the
SSID of the OWE AP in its Beacon frames and in addition the OWE AP does
not reply to broadcast Probe Request frames. Thus, the scan results
matching relies only on Beacon frames from the OWE open AP which can be
missed in case the AP's frequency is actively scanned.

To improve the discovery of transition mode APs, include their SSID in
the scan command to perform an active scan for the SSIDs learned from
the open mode BSSs.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
5 years agoOWE: Use shorter scan interval during transition mode search
Jouni Malinen [Fri, 12 Oct 2018 16:33:51 +0000 (19:33 +0300)] 
OWE: Use shorter scan interval during transition mode search

Start scans more quickly if an open BSS advertising OWE transition mode
is found, but the matching OWE BSS has not yet been seen.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOWE: Attempt more scans for OWE transition SSID if expected BSS not seen
Sunil Dutt [Thu, 6 Sep 2018 17:27:29 +0000 (22:57 +0530)] 
OWE: Attempt more scans for OWE transition SSID if expected BSS not seen

This commit introduces a threshold for OWE transition BSS selection,
which signifies the maximum number of selection attempts (scans) done
for finding OWE BSS.

This aims to do more scan attempts for OWE BSS and eventually select the
open BSS if the selection/scan attempts for OWE BSS exceed the
configured threshold.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Use execve() with custom env PATH to launch browser using 'am'
Purushottam Kushwaha [Fri, 12 Oct 2018 10:07:34 +0000 (15:37 +0530)] 
HS 2.0: Use execve() with custom env PATH to launch browser using 'am'

With new restriction in Android, if PATH env variable doesn't have
correct path of 'am' binary, execv() fails to launch wpadebug browser
(am starts, but something seems to fail within its internal processing).

This commit is a workaround to use execve() with custom environment PATH
which includes "/system/bin;/vendor/bin" to handle the cases where
hs20-osu-client fails to launch wpadebug browser through /system/bin/am.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoQCA vendor subcommand and attributes to configure capture of CFR data
Visweswara Tanuku [Thu, 4 Oct 2018 06:45:12 +0000 (12:15 +0530)] 
QCA vendor subcommand and attributes to configure capture of CFR data

Add a subcommand for Channel Frequency Response (CFG) Capture
Configuration and define attributes for configuring CFR capture
parameters per peer and enabling/disabling CFR capture.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: SSID with 32 octets with nul at the end
Jouni Malinen [Wed, 10 Oct 2018 21:10:54 +0000 (00:10 +0300)] 
tests: SSID with 32 octets with nul at the end

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Subscription remediation with user selected new password
Jouni Malinen [Mon, 8 Oct 2018 15:07:00 +0000 (18:07 +0300)] 
HS 2.0 server: Subscription remediation with user selected new password

Add support for user remediation to request a new password from the user
for username/password credentials that have been configured not use use
machine managed password.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Show whether credential is machine managed
Jouni Malinen [Mon, 8 Oct 2018 12:31:55 +0000 (15:31 +0300)] 
HS 2.0 server: Show whether credential is machine managed

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Make user list more readable
Jouni Malinen [Mon, 8 Oct 2018 12:18:27 +0000 (15:18 +0300)] 
HS 2.0 server: Make user list more readable

Order the rows based on identity and use a bit smaller font for some of
the fields to make the table fit on the screen more easily.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Clarify signup page options
Jouni Malinen [Mon, 8 Oct 2018 12:08:58 +0000 (15:08 +0300)] 
HS 2.0 server: Clarify signup page options

Make it clearer that there are three different types of credentials that
can be provisioned.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Do not perform subrem if not requested to
Jouni Malinen [Mon, 8 Oct 2018 10:15:59 +0000 (13:15 +0300)] 
HS 2.0 server: Do not perform subrem if not requested to

Instead of defaulting to machine remediation, reject a request to do
subscription remediation if that has not been configured to be required.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoRADIUS: Support last_msk with EAP-TLS
Jouni Malinen [Sun, 7 Oct 2018 13:50:08 +0000 (16:50 +0300)] 
RADIUS: Support last_msk with EAP-TLS

This extends the last_msk testing functionality in the RADIUS server to
work with EAP-TLS based on "cert-<serial_num>" form user names in the
database.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoEAP server: Add eap_get_serial_num()
Jouni Malinen [Sun, 7 Oct 2018 13:49:26 +0000 (16:49 +0300)] 
EAP server: Add eap_get_serial_num()

This can be used to fetch the serial number of the peer certificate
during TLS-based EAP session.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoTLS: Add tls_connection_peer_serial_num()
Jouni Malinen [Sun, 7 Oct 2018 13:47:25 +0000 (16:47 +0300)] 
TLS: Add tls_connection_peer_serial_num()

This can be used to fetch the serial number of the peer certificate in
the EAP server. For now, this is implemented only with OpenSSL.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAS: Add an event_cb() callback handler
Jouni Malinen [Sun, 7 Oct 2018 13:01:30 +0000 (16:01 +0300)] 
AS: Add an event_cb() callback handler

This provides debug log information on TLS events on the server side.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOpenSSL: Make serial number of peer certificate available in event_cb
Jouni Malinen [Sun, 7 Oct 2018 13:00:28 +0000 (16:00 +0300)] 
OpenSSL: Make serial number of peer certificate available in event_cb

Add serial number to the event_cb() information for the peer certificate
chain.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0 server: Add last_msk into users table setup
Jouni Malinen [Sun, 7 Oct 2018 09:47:21 +0000 (12:47 +0300)] 
HS 2.0 server: Add last_msk into users table setup

This field is used for debugging purposes.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Reject OSU connection for Single SSID case without OSU_NAI
Jouni Malinen [Fri, 5 Oct 2018 18:02:29 +0000 (21:02 +0300)] 
HS 2.0: Reject OSU connection for Single SSID case without OSU_NAI

The Single SSID case can only use OSEN, so reject the case where OSU_NAI
is not set and open OSU connection would be used since that connection
cannot succeed.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: OSU Providers NAI List ANQP-element
Jouni Malinen [Fri, 5 Oct 2018 17:54:40 +0000 (20:54 +0300)] 
tests: OSU Providers NAI List ANQP-element

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Use alternative OSU_NAI information in hs20-osu-client
Jouni Malinen [Fri, 5 Oct 2018 17:53:31 +0000 (20:53 +0300)] 
HS 2.0: Use alternative OSU_NAI information in hs20-osu-client

Extend hs20-osu-client to support the new osu_nai2 value for OSU
connection with the shared BSS (Single SSID) case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Request and process OSU Providers NAI List ANQP-element
Jouni Malinen [Fri, 5 Oct 2018 17:51:51 +0000 (20:51 +0300)] 
HS 2.0: Request and process OSU Providers NAI List ANQP-element

Extend wpa_supplicant to use a separate OSU_NAI information from OSU
Providers NAI List ANQP-element instead of the OSU_NAI information from
OSU Providers list ANQP-element when connecting to the shared BSS
(Single SSID) for OSU.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: OSU Provider NAI List advertisement
Jouni Malinen [Fri, 5 Oct 2018 17:49:42 +0000 (20:49 +0300)] 
HS 2.0: OSU Provider NAI List advertisement

Extend hostapd to allow the new OSU Provider NAI List ANQP-element to be
advertised in addition to the previously used OSU Providers list
ANQP-element. The new osu_nai2 configurator parameter option is used to
specify the OSU_NAI value for the shared BSS (Single SSID) case while
osu_nai remains to be used for the separate OSU BSS.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Update server and user certificates (2018)
Jouni Malinen [Wed, 3 Oct 2018 22:16:55 +0000 (01:16 +0300)] 
tests: Update server and user certificates (2018)

The previous versions expired, so need to re-sign these to fix number of
the EAP test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: Test connectivity within each step of FILS+FT
Jouni Malinen [Wed, 3 Oct 2018 10:17:15 +0000 (13:17 +0300)] 
tests: Test connectivity within each step of FILS+FT

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAdd QCA vendor event to report roam scan events
vamsi krishna [Mon, 17 Sep 2018 12:52:44 +0000 (18:22 +0530)] 
Add QCA vendor event to report roam scan events

Driver/firmware does roam scan when it finds the need to roam to a
different BSS. Add a QCA vendor event to indicate such roam scan events
from driver/firmware to user space.

Please note that some drivers may not send these events in few cases,
e.g., if the host processor is sleeping when this event is generated in
firmware to avoid undesired wakeups.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoOWE: Do not try to enable PMF for non-RSN associations
Purushottam Kushwaha [Tue, 18 Sep 2018 11:04:09 +0000 (16:34 +0530)] 
OWE: Do not try to enable PMF for non-RSN associations

Explicitly set the PMF configuration to 0 (NO_MGMT_FRAME_PROTECTION) for
non-RSN associations. This specifically helps with OWE transition mode
when the network block is configured with PMF set to required, but the
BSS selected is in open mode. There is no point to try to enable PMF for
such an association.

This fixes issues with drivers that use the NL80211_ATTR_USE_MFP
attribute to set expectations for PMF use. The combination of non-RSN
connection with claimed requirement for PMF (NL80211_MFP_REQUIRED) could
cause such drivers to reject the connection in OWE transition mode.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Suite B and PMKSA caching multiple times
Jouni Malinen [Thu, 27 Sep 2018 08:43:58 +0000 (11:43 +0300)] 
tests: Suite B and PMKSA caching multiple times

This verifies that wpa_supplicant and hostapd behave consistently with
PMKSA caching when Suite B AKMs end up deriving a new PMKID from each
4-way handshake.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoRSN: Do not replace existing Suite B PMKSA on 4-way handshake
Jouni Malinen [Thu, 27 Sep 2018 08:37:19 +0000 (11:37 +0300)] 
RSN: Do not replace existing Suite B PMKSA on 4-way handshake

PMKID derivation with the Suite B AKMs is a special case compared to
other AKMs since that derivation uses KCK instead of PMK as an input.
This means that the PMKSA cache entry can be added only after KCK has
been derived during 4-way handshake. This also means that PMKID would
change every time 4-way handshake is repeated even when maintaining the
same PMK (i.e., during PTK rekeying and new associations even if they
use PMKSA caching).

wpa_supplicant was previously replacing the PMKSA cache entry whenever a
new PMKID was derived. This did not match hostapd expectations on the AP
side since hostapd did not update the PMKSA cache entry after it was
created. Consequently, PMKSA caching could be used only once (assuming
no PTK rekeying happened before that). Fix this by making wpa_supplicant
behave consistently with hostapd, i.e., by adding the Suite B PMKSA
cache entries with the PMKID from the very first 4-way handshake
following PMK derivation and then not updating the PMKID.

IEEE Std 802.11-2016 is somewhat vague in this area and it seems to
allow both cases to be used (initial PMKID or any consecutive PMKID
derived from the same PMK). While both cases could be supported that
would result in significantly more complex implementation and need to
store multiple PMKID values. It looks better to clarify the standard to
explicitly note that only the first PMKID derived after PMK derivation
is used (i.e., match the existing hostapd implementation).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHS 2.0: Remove hs20-osu-client debug file Cert/est-resp.raw
Jouni Malinen [Wed, 26 Sep 2018 09:59:41 +0000 (12:59 +0300)] 
HS 2.0: Remove hs20-osu-client debug file Cert/est-resp.raw

This was used during initial EST development time testing, but the same
information is available in the debug log and since this separate file
is deleted automatically, just remove its generation completely to
simplify implementation.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: DPP_CONFIGURATOR_ADD error path
Jouni Malinen [Fri, 21 Sep 2018 18:39:34 +0000 (21:39 +0300)] 
tests: DPP_CONFIGURATOR_ADD error path

This is a regression test case for a memory leak on DPP_CONFIGURATOR_ADD
error path in dpp_keygen_configurator() when an unsupported curve is
specified.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoeap_proxy: Fix memory leaks when using eap_peer_erp_init()
Srikanth Marepalli [Thu, 20 Sep 2018 07:56:07 +0000 (13:26 +0530)] 
eap_proxy: Fix memory leaks when using eap_peer_erp_init()

The external session_id and emsk from eap_proxy_get_eap_session_id() and
eap_proxy_get_emsk() need to be freed consistently in all code paths
within eap_peer_erp_init() and outside it in the case ERP is not
initialized.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Fix a memory leak on Configurator keygen error path
Ankita Bajaj [Mon, 27 Aug 2018 07:31:13 +0000 (13:01 +0530)] 
DPP: Fix a memory leak on Configurator keygen error path

The allocated configuration structure needs to be freed if the specified
curve is not supported.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoDPP: Fix a memory leak in L derivation
Ankita Bajaj [Mon, 27 Aug 2018 07:31:13 +0000 (13:01 +0530)] 
DPP: Fix a memory leak in L derivation

The temporary EC_POINT 'sum' needs to be freed at the end of the
function with the other OpenSSL allocations.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>