]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
2 years agoPASN: Add wpa_pasn_reset() to eliminate need for struct wpa_supplicant
Vinay Gannevaram [Sat, 17 Sep 2022 09:24:18 +0000 (14:54 +0530)] 
PASN: Add wpa_pasn_reset() to eliminate need for struct wpa_supplicant

Split wpas_pasn_reset() so that the main reset steps can be used without
an instance of struct wpa_supplicant. This is needed to allow PASN
implementation to be used for additional purposes outside the context of
wpa_supplicant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoEnable use of PMKSA caching independent of RSN supplicant state machine
Vinay Gannevaram [Sun, 18 Sep 2022 18:01:51 +0000 (23:31 +0530)] 
Enable use of PMKSA caching independent of RSN supplicant state machine

Allow PMKSA caching functionality to be used even if sm, current_cb, and
free_cb are uninitialized. This makes RSN supplicant state machine
independent PMKSA caching possible for other modules, enabling
functional reuse.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFix the vendor ID assignment for configuring periodic sounding
Jouni Malinen [Thu, 3 Nov 2022 17:22:53 +0000 (19:22 +0200)] 
Fix the vendor ID assignment for configuring periodic sounding

This was supposed to update the requested value to the next available
one, not to duplicate the already assigned value.

Fixes: b17b86da4765 ("QCA vendor attribute to configure periodic sounding")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoQCA vendor attribute to configure periodic sounding
Kiran Kumar Lokere [Thu, 13 Oct 2022 06:34:10 +0000 (23:34 -0700)] 
QCA vendor attribute to configure periodic sounding

Add a new QCA vendor attribute to configure the periodic sounding
for Tx beamformer functionality.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMLD STA: Fix crash caused by NULL wpa_s->current_ssid
Qiwei Cai [Thu, 20 Oct 2022 05:37:38 +0000 (13:37 +0800)] 
MLD STA: Fix crash caused by NULL wpa_s->current_ssid

For wpa_supplicant_get_new_bss(), wpa_s->current_ssid can be NULL in
some cases. Add a NULL check before accessing it to avoid NULL pointer
dereference errors.

Fixes: 7784964cbe88 ("MLD STA: Fetch MLO connection info into core wpa_supplicant")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agonl80211: Fix parsing PASN peer and src addresses from vendor nl attributes
Vinay Gannevaram [Fri, 21 Oct 2022 09:43:44 +0000 (15:13 +0530)] 
nl80211: Fix parsing PASN peer and src addresses from vendor nl attributes

Need to copy the actual data of the attribute, not the beginning of the
data structure pointing to the attribute.

Fixes: de3b91a172e5 ("nl80211: Define vendor interface functions to offload PASN authentication")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMore debug prints for EAPOL-Key message generation (Authenticator)
Jouni Malinen [Thu, 3 Nov 2022 10:38:06 +0000 (12:38 +0200)] 
More debug prints for EAPOL-Key message generation (Authenticator)

AES-WRAP(KEK) protection of the Key Data field did not include all the
details in the log. Extend that to cover the details that were already
present for the AES-SIV case to make the debug log more useful for
analyzing issues in this area. Furthermore, print the full EAPOL-Key
frame in the log.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMLD STA: Fully clear MLO info to avoid use of uninitialized members
Jouni Malinen [Wed, 2 Nov 2022 09:56:46 +0000 (11:56 +0200)] 
MLD STA: Fully clear MLO info to avoid use of uninitialized members

The initial wpa_drv_get_mlo_info() implementation cleared only the
valid_links information within struct driver_sta_mlo_info before trying
to fetch the information from the driver. While this is likely going to
work fine in practice, this can result in static analyzer warnings on
use of uninitialized memory (e.g., mlo.assoc_link_id could have been
read if wpa_s->valid_links was set to a nonzero value). In any case, it
is better to avoid such unnecessary warnings by clearing the full data
structure before using it.

Fixes: 7784964cbe88 ("MLD STA: Fetch MLO connection info into core wpa_supplicant")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMLD STA: Use MLD addresses for sending non-Public Action frames
Veerendranath Jakkam [Wed, 19 Oct 2022 14:14:09 +0000 (19:44 +0530)] 
MLD STA: Use MLD addresses for sending non-Public Action frames

The Linux kernel expects to use the AP MLD address as destination and
BSSID addresses for non-Public Action frames when the current
association is MLO capable. Use the MLD addresses to support this.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Support processing of M1 received before association event
Veerendranath Jakkam [Wed, 19 Oct 2022 14:14:05 +0000 (19:44 +0530)] 
MLD STA: Support processing of M1 received before association event

EAPOL-Key msg 1/4 indication can be received before association
indication from the driver. For MLO connection, the source address check
of such frames should be against the AP MLD address instead of the
associated link BSSID.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoEHT: Definitions for STA Control fields of Basic Multi-Link element
Veerendranath Jakkam [Wed, 19 Oct 2022 14:13:54 +0000 (19:43 +0530)] 
EHT: Definitions for STA Control fields of Basic Multi-Link element

Define subelement IDs and Per-STA Profile STA control fields of Basic
Multi-Link element as described in IEEE P802.11be/D2.2. Also add define
for Multi-Link Control field length.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoEHT: Multi-Link element defragmentation
Veerendranath Jakkam [Wed, 19 Oct 2022 14:13:53 +0000 (19:43 +0530)] 
EHT: Multi-Link element defragmentation

Add support for element defragmentation of different types of Multi-Link
elements.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agocommon: Refactor element defragmentation
Veerendranath Jakkam [Wed, 19 Oct 2022 14:13:52 +0000 (19:43 +0530)] 
common: Refactor element defragmentation

Instead of saving the pointers to the fragment elements during parsing
of the frame, append all fragments found right after the element to the
element length. Defragmentation of the element can be done by parsing
appended fragment elements. This approach removes the limit on the
maximum number of fragmented elements supported in a frame.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoEHT: Parse Multi-Link elements
Veerendranath Jakkam [Wed, 19 Oct 2022 14:13:51 +0000 (19:43 +0530)] 
EHT: Parse Multi-Link elements

Parse and store pointers to different types of Multi-Link elements
received in Management frames.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Fetch MLO association Link ID info to core wpa_supplicant
Veerendranath Jakkam [Wed, 19 Oct 2022 14:13:50 +0000 (19:43 +0530)] 
MLD STA: Fetch MLO association Link ID info to core wpa_supplicant

Fetch the MLO association Link ID info from the driver to the
wpa_supplicant instance of the corresponding MLD STA interface. This
info is needed when setting the MLO connection info to wpa_sm.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agonl80211: Check MLO link status info in NL80211_CMD_CONNECT
Veerendranath Jakkam [Wed, 19 Oct 2022 14:13:49 +0000 (19:43 +0530)] 
nl80211: Check MLO link status info in NL80211_CMD_CONNECT

NL80211_CMD_CONNECT event indicates MLO links status info with kernel
commit 53ad07e9823b ("wifi: cfg80211: support reporting failed links").
Consider MLO links as valid links only if the status is success (or was
not indicated).

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoRADIUS: Add Filter-Id attribute
Morten Brørup [Tue, 25 Oct 2022 11:17:57 +0000 (13:17 +0200)] 
RADIUS: Add Filter-Id attribute

Add Filter-Id to the list of RADIUS attributes.

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
2 years agoAdd QCA vendor attributes for EHT support in external ACS
Jhalak Naik [Fri, 7 Oct 2022 10:10:07 +0000 (15:40 +0530)] 
Add QCA vendor attributes for EHT support in external ACS

Add support for new vendor sub-command attributes for 320 MHz
channel width and puncturing information as part of the
external ACS.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoVendor attribute to configure QoS/AC upgrade for UDP frames
Amarnath Hullur Subramanyam [Thu, 13 Oct 2022 05:28:01 +0000 (22:28 -0700)] 
Vendor attribute to configure QoS/AC upgrade for UDP frames

Introduce a new attribute to configure access category
override for UDP frames of BE/BK category. Unlike, the
earlier attribute QCA_WLAN_VENDOR_ATTR_CONFIG_UDP_QOS_UPGRADE
which will override for all UDP frames, this attribute is
for overriding only for BE/BK based UDP frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoEHT: Allow EHT to be disabled using disable_eht=1 in wpa_supplicant
Jouni Malinen [Mon, 17 Oct 2022 08:12:17 +0000 (11:12 +0300)] 
EHT: Allow EHT to be disabled using disable_eht=1 in wpa_supplicant

This is similar to the previously added disable_ht/vht/he parameters.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoSAE: Accept FT and -EXT-KEY AKMs for external auth
Jouni Malinen [Sun, 16 Oct 2022 15:35:51 +0000 (18:35 +0300)] 
SAE: Accept FT and -EXT-KEY AKMs for external auth

Use a full list of AKM suite selectors that can use SAE authentication
when checking for authentication trigger from the driver.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Get cached scan results on iface creation to avoid scan
Matthew Wang [Wed, 12 Oct 2022 04:02:02 +0000 (21:02 -0700)] 
P2P: Get cached scan results on iface creation to avoid scan

This allows the P2P client to fast associate if the GO is already in the
scan cache without doing a full scan.

Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
2 years agoSAE: Fix AKM suite selector check for external authentication
Jouni Malinen [Sun, 16 Oct 2022 15:25:11 +0000 (18:25 +0300)] 
SAE: Fix AKM suite selector check for external authentication

AKM suite selector check was initially implemented with incorrect byte
swapping of the value from the driver (nl80211). Fix this and leave a
workaround option for any potentially deployed device where the driver
might be using the swapped byte order.

Fixes: 5ff39c1380d9 ("SAE: Support external authentication offload for driver-SME cases")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
tests: FT-SAE-EXT-KEY

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Cover variable length KCK in function documentation
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Cover variable length KCK in function documentation

FT can use different KCK length based on the AKM and PMK-R0 length.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Reassociation Response frame validation for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Reassociation Response frame validation for FT-SAE-EXT-KEY

Cover the variable length MIC field when validating the Reassociation
Response frame.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Response processing for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Response processing for FT-SAE-EXT-KEY

Cover the variable length MIC field when processing the response from an
AP.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Supplicant side FTE generation for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Supplicant side FTE generation for FT-SAE-EXT-KEY

Add the SHA512-based variant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Authentication request frame processing for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Authentication request frame processing for FT-SAE-EXT-KEY

Figure out the correct hash algorithm based on which MIC field length
assumption results in successful parsing. This is needed since the key
length is not yet known at this point on the AP when using the new
FT-SAE-EXT-KEY AKM.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Reassociation Request frame parsing for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Reassociation Request frame parsing for FT-SAE-EXT-KEY

Handle the new MIC field length option for the SHA512-based variant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Association Response frame FTE generation for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Association Response frame FTE generation for FT-SAE-EXT-KEY

Add the SHA512-based variant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Extend PMK-R0 derivation for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Extend PMK-R0 derivation for FT-SAE-EXT-KEY

Provide AKM to the helper function to cover the SHA512-based derivation
case.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Extend PTK derivation for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Extend PTK derivation for FT-SAE-EXT-KEY

Cover the SHA512-based derivation case.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Extend PMK-R1 derivation for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Extend PMK-R1 derivation for FT-SAE-EXT-KEY

Cover the SHA512-based derivation case.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Debug print FTE subelements during parsing
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Debug print FTE subelements during parsing

This can be helpful in trying to figure out issues with determination of
the MIC field length.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Extend FTE parsing for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Extend FTE parsing for FT-SAE-EXT-KEY

Provide AKM, key length, and information about needed subelements to the
parser function so that the variable length MIC field cases can be
recognized for FT-SAE-EXT-KEY. Knowledge about R0KH-ID/R1KH-ID being
needed is required to be able to iterate over possible MIC field lengths
for the case where the AP does not yet know the correct key length at
the beginning of FT protocol.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Extend MIC derivation for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Extend MIC derivation for FT-SAE-EXT-KEY

Provide AKM to the helper function so that the new SHA256 and SHA512
options can be covered for FT-SAE-EXT-KEY.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Extend PMKR1Name derivation for FT-SAE-EXT-KEY
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Extend PMKR1Name derivation for FT-SAE-EXT-KEY

Provide key length instead of SHA384/SHA256 selection to the helper
function so that the new SHA512 option can be covered for
FT-SAE-EXT-KEY.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Support longer SAE PMK for FT in INITPSK AP
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Support longer SAE PMK for FT in INITPSK AP

This is needed for the new FT-SAE-EXT-KEY AKM that uses variable length
PMK.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: AP mode FTE writing to support FT-SAE-KEY-EXT
Jouni Malinen [Sun, 16 Oct 2022 13:51:12 +0000 (16:51 +0300)] 
FT: AP mode FTE writing to support FT-SAE-KEY-EXT

Provide enough information to allow the FTE to be built using the
correct MIC field length based on the used AKM and key length.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Accept 512-bit PMK-R1 from RRB
Jouni Malinen [Sun, 16 Oct 2022 13:38:27 +0000 (16:38 +0300)] 
FT: Accept 512-bit PMK-R1 from RRB

This will be needed for FT-SAE-KEY-EXT.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd service class id attribute in SCS rule config vendor subcommand
Harsh Kumar Bijlani [Mon, 10 Oct 2022 06:54:20 +0000 (12:24 +0530)] 
Add service class id attribute in SCS rule config vendor subcommand

Add service class id attribute
QCA_WLAN_VENDOR_ATTR_SCS_RULE_CONFIG_SERVICE_CLASS_ID in SCS rule
configuration vendor subcommand
QCA_NL80211_VENDOR_SUBCMD_SCS_RULE_CONFIG.

Signed-off-by: Harsh Kumar Bijlani<quic_hbijlani@quicinc.com>
2 years agoWNM: Print unsupported neighbor report subelements in debug log
Chaoli Zhou [Tue, 11 Oct 2022 10:57:44 +0000 (18:57 +0800)] 
WNM: Print unsupported neighbor report subelements in debug log

This can be helpful in trying to figure out what might need to be added
in the future.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
2 years agoInterworking: Print unsupported inner EAP-TTLS method in debug log
Chaoli Zhou [Tue, 11 Oct 2022 10:57:44 +0000 (18:57 +0800)] 
Interworking: Print unsupported inner EAP-TTLS method in debug log

This can be helpful in trying to figure out unexpected behavior even
though we do not currently really do anything with the inner method
type.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
2 years agoMove default action from after switch to within
Chaoli Zhou [Tue, 11 Oct 2022 10:57:44 +0000 (18:57 +0800)] 
Move default action from after switch to within

Move from this type of constructions:

switch (val) {
case 1:
something;
break;
}
default-action;

into following:

switch (val) {
case 1:
something;
break;
default:
default-action;
break
}

for cases where the switch statement is not expected to contain a full
set of enum values and as such, does not lose value from not having the
default target.

This makes the intent of default behavior clearer for static analyzers like
gcc with -Wswitch-default.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
2 years agoACS: Filter out 6 GHz channels if HE or EHT is not enabled
Vishal Miskin [Tue, 13 Sep 2022 13:15:53 +0000 (18:45 +0530)] 
ACS: Filter out 6 GHz channels if HE or EHT is not enabled

Do not include 6 GHz channels in the ACS possible channel list if
neither HE (ieee80211ax=1) nor EHT (ieee80211be=1) is enabled since
those channels cannot be used in such combination.

Signed-off-by: Vishal Miskin <quic_vmiskin@quicinc.com>
2 years agoAndroid: Delay QCA roam+auth event until NL80211_CMD_ROAM is received
Swarn Singh [Wed, 28 Sep 2022 18:10:52 +0000 (23:40 +0530)] 
Android: Delay QCA roam+auth event until NL80211_CMD_ROAM is received

Information from both NL80211_CMD_ROAM and
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH events is required for
processing the roam events correctly, especially to get the newly
connected BSS details. Indicate the roam event to private libraries only
after NL80211_CMD_ROAM and QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH
events are received.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Key derivation for SAE-EXT-KEY
Jouni Malinen [Wed, 12 Oct 2022 19:33:27 +0000 (22:33 +0300)] 
wlantest: Key derivation for SAE-EXT-KEY

Extend wlantest capabilities to cover the new SAE-EXT-KEY AKM and
variable length MIC field and key lengths for it based on the used SAE
group.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: wpa_supplicant AP mode with pmf=1/2
Jouni Malinen [Mon, 10 Oct 2022 09:34:04 +0000 (12:34 +0300)] 
tests: wpa_supplicant AP mode with pmf=1/2

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoOverride ieee80211w from pmf for AP mode in wpa_supplicant
Chaoli Zhou [Thu, 8 Sep 2022 09:43:32 +0000 (17:43 +0800)] 
Override ieee80211w from pmf for AP mode in wpa_supplicant

Since NetworkManager doesn't support setting ieee80211w to
wpa_supplicant and only support pmf, so override ieee80211w from pmf for
AP mode if ieee80211w not configurated. Do not change behavior for the
P2P GO cases.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
2 years agotests: Clear sae_groups when SAE could be used
Jouni Malinen [Fri, 7 Oct 2022 17:59:34 +0000 (20:59 +0300)] 
tests: Clear sae_groups when SAE could be used

This makes sigma_dut_ap_dpp_qr* test cases with SAE more robust by
avoiding unexpected behavior. This was found with the following test
sequence:
mesh_sae_anti_clogging sigma_dut_ap_dpp_qr_sae

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoDPP: Require PMF when profile is for SAE without PSK
Jouni Malinen [Fri, 7 Oct 2022 16:54:30 +0000 (19:54 +0300)] 
DPP: Require PMF when profile is for SAE without PSK

While the IEEE 802.11 standard does not require MFPR=1, WPA3-Personal
requires PMF to be used with SAE. Use the stronger MFPR=1 configuration
for SAE-without-PSK case, i.e., interpret that as "WPA3-Personal only"
configuration.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: sigma_dut DPP reconfiguration using SAE (Enrollee)
Jouni Malinen [Fri, 7 Oct 2022 16:44:48 +0000 (19:44 +0300)] 
tests: sigma_dut DPP reconfiguration using SAE (Enrollee)

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Clear vendor elements at the end of wpas_ap_vendor_elems
Jouni Malinen [Tue, 4 Oct 2022 21:21:12 +0000 (00:21 +0300)] 
tests: Clear vendor elements at the end of wpas_ap_vendor_elems

This is needed to avoid surprises in the following test cases. This was
found with a failure in the following test sequence:
wpas_ap_vendor_elems p2p_ext_discovery_go

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Make sigma_dut_dpp_qr_mutual_resp_enrollee_connector_privacy more robust
Jouni Malinen [Tue, 4 Oct 2022 21:17:52 +0000 (00:17 +0300)] 
tests: Make sigma_dut_dpp_qr_mutual_resp_enrollee_connector_privacy more robust

Clear the dpp_connector_privacy_default parameter value that sigma_dut
set in wpa_supplicant at the end of the test case to avoid surprising
behavior for the following test cases. This was found with a failure in
the following test sequence:
sigma_dut_dpp_qr_mutual_resp_enrollee_connector_privacy
sigma_dut_dpp_proto_peer_disc_req

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Fix CONFIG_PASN=y build without CONFIG_IEEE80211R=y
Jouni Malinen [Fri, 30 Sep 2022 14:05:47 +0000 (17:05 +0300)] 
PASN: Fix CONFIG_PASN=y build without CONFIG_IEEE80211R=y

Do not try to use variables that are not defined without
CONFIG_IEEE80211R=y and add the forgotten "inline" for the function
wrapper.

Fixes: 5c65ad6c0b08 ("PASN: Support PASN with FT key derivation")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: sigma_dut and DPP AP provisioning with SAE
Jouni Malinen [Mon, 3 Oct 2022 16:20:21 +0000 (19:20 +0300)] 
tests: sigma_dut and DPP AP provisioning with SAE

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: DPP AP configuration for SAE-only
Jouni Malinen [Mon, 3 Oct 2022 09:34:16 +0000 (12:34 +0300)] 
tests: DPP AP configuration for SAE-only

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agonl80211: Parsing of MLO connection info from roam+auth event
Veerendranath Jakkam [Fri, 23 Sep 2022 12:06:06 +0000 (17:36 +0530)] 
nl80211: Parsing of MLO connection info from roam+auth event

Add support to parse MLO connection information from
QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_MLO_LINKS for
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agowlantest: Learn group keys for other MLO affiliated links
Jouni Malinen [Thu, 29 Sep 2022 10:13:19 +0000 (13:13 +0300)] 
wlantest: Learn group keys for other MLO affiliated links

Update bss entries for all affiliated links whenever learning
GTK/IGTK/BIGTK from EAPOL-Key msg 3/4 or group msg 1/2.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Find a STA entry based on MLO affiliated link addresses
Jouni Malinen [Thu, 29 Sep 2022 10:08:37 +0000 (13:08 +0300)] 
wlantest: Find a STA entry based on MLO affiliated link addresses

Allow a single STA entry to be found for a non-AP MLD regardless of
which link MAC address was used to transmit/receive it.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Recognize SAE case for moving from State 1 to 2
Jouni Malinen [Thu, 29 Sep 2022 08:59:54 +0000 (11:59 +0300)] 
wlantest: Recognize SAE case for moving from State 1 to 2

Update STA state tracking for SAE authentication as well as the previous
covered Open System algorithm.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Use RSNE from MLO Link KDE, if present, for validation
Jouni Malinen [Thu, 29 Sep 2022 08:50:28 +0000 (11:50 +0300)] 
wlantest: Use RSNE from MLO Link KDE, if present, for validation

Check the Beacon/Probe Response frame RSNE against the RSNE within the
MLO Link KDE for the current affiliated link instead of RSNE when
processing the EAPOL-Key msg 3/4 Key Data field.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Print the TA of a Beacon frame for which there is no BIGTK
Jouni Malinen [Wed, 28 Sep 2022 21:03:27 +0000 (00:03 +0300)] 
wlantest: Print the TA of a Beacon frame for which there is no BIGTK

This makes the debug message more useful for determining whether an
expected BIGTK has been derived.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Learn GTK/IGTK/BIGTK for the current link in MLO case
Jouni Malinen [Wed, 28 Sep 2022 21:00:45 +0000 (00:00 +0300)] 
wlantest: Learn GTK/IGTK/BIGTK for the current link in MLO case

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMLD STA: Add support for parsing MLO KDEs
Rohan Dutta [Thu, 15 Sep 2022 09:53:45 +0000 (15:23 +0530)] 
MLD STA: Add support for parsing MLO KDEs

Add support for parsing MLO KDEs as defined in Table 12-10 (KDE
selectors) in IEEE P802.11be/D2.0.

Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Co-authored-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agowlantest: Use wpa_parse_kde_ies() directly
Jouni Malinen [Wed, 28 Sep 2022 20:07:08 +0000 (23:07 +0300)] 
wlantest: Use wpa_parse_kde_ies() directly

Make this easier to understand by using the appropriately named function
to parse KDEs/IEs in the Key Data field of EAPOL-Key frames instead of
using the wrapper function that is there just to provide the old
function name for wpa_supplicant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Verify Beacon frame MME even after Probe Response reception
Jouni Malinen [Wed, 28 Sep 2022 20:02:31 +0000 (23:02 +0300)] 
wlantest: Verify Beacon frame MME even after Probe Response reception

rx_mgmt_beacon() was skipping all steps after a Probe Response frame
from the AP had been processed. This is expected for the parts that were
updating the bss entry information, but the checks for beacon protection
should not be skipped in this manner.

Skip onlu the updating parts while checking that beacon protection is
used correctly to make this more useful.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd QCA vendor interface support for Spatial Reuse (SR) feature
Rachit Kankane [Tue, 30 Aug 2022 12:25:18 +0000 (17:55 +0530)] 
Add QCA vendor interface support for Spatial Reuse (SR) feature

Add a new vendor sub-command to implement Spatial Reuse feature.
Userspace enables SR feature with specific configuration parameters. The
driver/firmware upon receiving the command, enables the SR feature if it
is supported by the currently connected AP. The driver may reject the
command if it cannot enable the SR with the configured parameters. The
driver sends events to userspace to indicate when SR feature is enabled
or disabled internally. Userspace can also query SR feature related
parameters and statistics from the driver/firmware as needed.

Signed-off-by: Rachit Kankane <quic_rkankane@quicinc.com>
Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agoFix compiler warning on shift overflow in QCA vendor definitions
Chaoli Zhou [Wed, 21 Sep 2022 08:25:45 +0000 (16:25 +0800)] 
Fix compiler warning on shift overflow in QCA vendor definitions

Fix the following compiler error:
qca-vendor.h:5892:54: error: result of ‘1 << 31’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=]
 5892 |  QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HE40INTOL     = 1 << 31,

This "1" needs to be marked unsigned for this case of MSB=1.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
2 years agoFix compilation error due to use of bitwise '&' with boolean operands
Sunil Ravi [Fri, 16 Sep 2022 19:22:02 +0000 (12:22 -0700)] 
Fix compilation error due to use of bitwise '&' with boolean operands

Compiler throws a warning for using bitwise operation in
wpa_s_setup_sae_pt() function instead of logical AND operation on two
boolean values.

Fixes: e81ec0962d02 ("SAE: Use H2E unconditionally with the new AKM suites")
Signed-off-by: Sunil Ravi <sunilravi@google.com>
2 years agoP2P: Allow P2P CSA from 5 GHz to 2.4 GHz band
Sunil [Tue, 19 Jul 2022 22:04:39 +0000 (22:04 +0000)] 
P2P: Allow P2P CSA from 5 GHz to 2.4 GHz band

IEEE Std 802.11-2020, 11.8.8 (Selecting and advertising a new channel)
doesn't restrict switching to a channel which is not in the same band as
the current band. But at the same time, there are some issues in
switching between the 2.4/5 GHz bands and the 6 GHz band. So limit the
check to consider the critical use case of switching from a 5 GHz channel
to a 2.4 GHz channel.

Signed-off-by: Sunil Ravi <sunilravi@google.com>
2 years agotests: Automatic channel selection and 2.4 GHz channel 14
Jouni Malinen [Thu, 22 Sep 2022 21:25:24 +0000 (00:25 +0300)] 
tests: Automatic channel selection and 2.4 GHz channel 14

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoUpdate hw mode after ACS selects the channel
Sunil Ravi [Wed, 10 Aug 2022 22:56:55 +0000 (22:56 +0000)] 
Update hw mode after ACS selects the channel

hostapd based automatic channel selection doesn't update the hardware
mode after the channel is selected. This change specifically helps
channel 14 which can operate only in IEEE 802.11b mode.

Signed-off-by: Sunil Ravi <sunilravi@google.com>
2 years agotests: P2P and avoid frequencies preventing 80 MHz on channel 149"
Jouni Malinen [Thu, 22 Sep 2022 21:12:33 +0000 (00:12 +0300)] 
tests: P2P and avoid frequencies preventing 80 MHz on channel 149"

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Set operating class along with operating channel width
Sunil [Tue, 19 Jul 2022 00:04:20 +0000 (00:04 +0000)] 
P2P: Set operating class along with operating channel width

While setting up the P2P GO interface, wpa_supplicant sets the operating
channel width to CHANWIDTH_USE_HT in cases where it fails to set 80 MHz
bandwidth. In the same flow, update the operating class, too, according
to the channel width. This is to avoid setting up the operational
channel width back to 80 MHz from hostapd interface setup.

Signed-off-by: Sunil <sunilravi@google.com>
2 years agoP2P: Fix the issue in setting optimized listen channel
Sunil Ravi [Wed, 7 Sep 2022 20:23:05 +0000 (20:23 +0000)] 
P2P: Fix the issue in setting optimized listen channel

wpas_p2p_optimize_listen_channel() checks for the state and current ssid
of the interface calling this function. This check prevents the function
from setting the optimized listen channel. Since the listen channel is
stored in global P2P configuration data, do not check the state and
current interface of the caller.

Signed-off-by: Sunil Ravi <sunilravi@google.com>
2 years agoFix RNR BSSID setting for own interfaces
Shay Bar [Thu, 26 May 2022 07:13:22 +0000 (10:13 +0300)] 
Fix RNR BSSID setting for own interfaces

bss->conf->bssid may be kept unset and will cause an empty BSSID field
in RNR. Fix this to use own_addr instead.

Signed-off-by: Shay Bar <shay.bar@celeno.com>
Signed-off-by: moran.daori <moran.daori@celeno.com>
2 years agodbus: Omit FT key mgmt capabilities without CONFIG_IEEE80211R
Clemens Famulla-Conrad [Sat, 25 Jun 2022 21:33:50 +0000 (23:33 +0200)] 
dbus: Omit FT key mgmt capabilities without CONFIG_IEEE80211R

If wpa_supplicant was build without CONFIG_IEEE80211R, the
exposed key-management capabilities should not include one of the
FT protocols. If someone would use a FT protocol in such situation,
it would fail anyway.

Signed-off-by: Clemens Famulla-Conrad <cfamullaconrad@suse.de>
2 years agodbus: Fix property DebugShowKeys and DebugTimestamp
Clemens Famulla-Conrad [Tue, 5 Jul 2022 11:11:28 +0000 (13:11 +0200)] 
dbus: Fix property DebugShowKeys and DebugTimestamp

It is possible to specify -t or -K multiple times. With this the
value isn't boolean anymore and we hit a assert in libdbus
function `dbus_message_iter_append_basic()`, which expect 0 or 1
for DBUS_TYPE_BOOLEAN.

Signed-off-by: Clemens Famulla-Conrad <cfamullaconrad@suse.de>
2 years agoAdd usage print for -q flag
Orr Mazor [Thu, 12 May 2022 08:50:16 +0000 (10:50 +0200)] 
Add usage print for -q flag

Signed-off-by: Orr Mazor <o.mazor@genexis.eu>
2 years agoACS: Include frequency in info messages
stijn@linux-ipv6.be [Tue, 30 Aug 2022 11:45:11 +0000 (14:45 +0300)] 
ACS: Include frequency in info messages

The ACS info messages frequently appear for multiple channels. Without
the actual frequency in the messages, they are not very informative.
Add the frequency to them to improve this.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agoUse a less generic name for IEEE802.11 CRC-32 routine
Sergey Matyukevich [Mon, 5 Sep 2022 20:18:23 +0000 (23:18 +0300)] 
Use a less generic name for IEEE802.11 CRC-32 routine

Hostapd uses 'crc32' name for IEEE802.11 CRC-32 routine. This name is
too generic. Buildroot autobuilder detected build configuration that
failed to build due to the naming conflict: static linking with openssl
using zlib-ng as a zlib provider, e.g. see:
- http://autobuild.buildroot.net/results/9901df820d3afa4cde78e8ad6d62cb8ce7e69fdb/
- http://autobuild.buildroot.net/results/ac19975f0bf77f4a8ca574c374092ba81cd5a332/

Use a less generic name ieee80211_crc32 for IEEE802.11 CRC-32 routine
to avoid such naming conflicts.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
2 years agotests: hwsim: Search for UBSAN in kernel messages
Johannes Berg [Wed, 17 Aug 2022 07:17:31 +0000 (09:17 +0200)] 
tests: hwsim: Search for UBSAN in kernel messages

If UBSAN is enabled, flag errors from it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2 years agotests: vm: Simplify parameter passing
Johannes Berg [Tue, 12 Jul 2022 21:44:19 +0000 (23:44 +0200)] 
tests: vm: Simplify parameter passing

Since the kernel  actually passes the command-line parameters
as environment variables to the init script, there's no need
to parse them out of /proc/cmdline.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2 years agotests: hwsim: Allow configuring MODULEDIR
Johannes Berg [Mon, 13 Jun 2022 09:07:07 +0000 (11:07 +0200)] 
tests: hwsim: Allow configuring MODULEDIR

It can be useful to configure a different module directory, so you don't
need to install the kernel modules in the host /lib/modules/ location.
Allow configuring it in the config file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2 years agotests: Reload correct regdb if possible/needed
Johannes Berg [Wed, 11 May 2022 13:09:06 +0000 (15:09 +0200)] 
tests: Reload correct regdb if possible/needed

If cfg80211 is built into the kernel, then it may/will have
loaded the regdb before we mount our own /lib/firmware. This
may result in using the wrong regulatory data. Fix this by
using iw to reload the regdb after mounting it.

Fixes: a29c2399a77a ("tests: Add regulatory database to VMs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2 years agoACS: Don't select indoor channel on outdoor operation
David Bauer [Sun, 11 Sep 2022 16:41:12 +0000 (18:41 +0200)] 
ACS: Don't select indoor channel on outdoor operation

Don't select channels designated for exclusive indoor use when the
country string is set for outdoor operation (country3=0x4f, i.e., the
third character of the country string is 'O').

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agowpa_supplicant man page missing -I flag
Robert Hernandez [Tue, 13 Sep 2022 14:52:01 +0000 (14:52 +0000)] 
wpa_supplicant man page missing -I flag

wpa_supplicant: Missing manpage -I entry

Signed-off-by: Robert James Hernandez <rob@sarcasticadmin.com>
2 years agoAdd a new QCA vendor attribute to support flexible TWT
nakul kachhwaha [Tue, 9 Aug 2022 12:09:51 +0000 (17:39 +0530)] 
Add a new QCA vendor attribute to support flexible TWT

Add a new attribute QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_SP_START_OFFSET to
configure offset to shift start of the service period. This attribute
will be used when device supports flexible TWT. If provided, this
attribute will override QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME.

Signed-off-by: nakul kachhwaha <quic_nkachhwa@quicinc.com>
2 years agoMLD STA: Indicate per link channel switch
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:22 +0000 (20:14 +0530)] 
MLD STA: Indicate per link channel switch

Parse link id info from channel switch events and indicate the info to
control interface using new per link channel switch events. If channel
switch happens on the link which used during association both legacy
and new per-link channel switch events will be reported.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Add per-link MLO signal poll
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:21 +0000 (20:14 +0530)] 
MLD STA: Add per-link MLO signal poll

Add support to fetch and indicate per-link MLO signal poll information
via a new control interface command MLO_SIGNAL_POLL.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Add MLO_STATUS control interface command
Shivani Baranwal [Thu, 8 Sep 2022 14:44:20 +0000 (20:14 +0530)] 
MLD STA: Add MLO_STATUS control interface command

Add support for MLO_STATUS control interface command to indicate
per-link information.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agonl80211: Send bssid info as parameter to nl80211_get_link_signal()
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:19 +0000 (20:14 +0530)] 
nl80211: Send bssid info as parameter to nl80211_get_link_signal()

Add bssid as parameter to nl80211_get_link_signal() instead of using
bssid from driver structure. This is useful for calling the function
per-MLO link.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Indicate AP MLD address in STATUS command
Aleti Nageshwar Reddy [Thu, 8 Sep 2022 14:44:18 +0000 (20:14 +0530)] 
MLD STA: Indicate AP MLD address in STATUS command

Append AP MLD address info into the STATUS control interface command.

Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agoMLD STA: Indicate AP MLD address in CTRL-EVENT-CONNECTED
Aleti Nageshwar Reddy [Thu, 8 Sep 2022 14:44:17 +0000 (20:14 +0530)] 
MLD STA: Indicate AP MLD address in CTRL-EVENT-CONNECTED

Append the AP MLD address to CTRL-EVENT-CONNECTED when the current
connection uses MLO.

Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agoAdd AP MLD address into BSS command output
Aleti Nageshwar Reddy [Thu, 8 Sep 2022 14:44:16 +0000 (20:14 +0530)] 
Add AP MLD address into BSS command output

Indicate AP MLD address in the response to the BSS control interface
command.

Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agobss: Parse and store MLD address of the AP from Multi-Link element
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:15 +0000 (20:14 +0530)] 
bss: Parse and store MLD address of the AP from Multi-Link element

Parse Multi-Link element received in scan result to get AP MLD address
and cache it in the wpa_bss structure.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoHelper function to get MLD address from Basic Multi-Link element
Shivani Baranwal [Thu, 8 Sep 2022 14:44:14 +0000 (20:14 +0530)] 
Helper function to get MLD address from Basic Multi-Link element

Add a utility function to fetch Multi-Link Device (MLD) address from a
Basic Multi-Link element.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoscan: Helper function to get ML IE of specified type from scan result IEs
Shivani Baranwal [Thu, 8 Sep 2022 14:44:13 +0000 (20:14 +0530)] 
scan: Helper function to get ML IE of specified type from scan result IEs

Add a helper function to get Multi-Link element of a specified type from
scan result Probe Response frame or Beacon frame elements.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>