]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
23 months agoFT: FTE MIC calculation for MLO Reassociation Request frame
Jouni Malinen [Thu, 24 Aug 2023 14:58:25 +0000 (17:58 +0300)] 
FT: FTE MIC calculation for MLO Reassociation Request frame

Extend wpa_ft_mic() to take in an array of link addresses to allow the
FTE MIC to be calculated for Reassociation Request frame as described in
IEEE P802.11be/D4.0, 13.8.4. This commit does not change actual
behavior, i.e., this is just preparing wpa_ft_mic() and the existing
callers with a new argument.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoIncrement hmac_sha*_vector() maximum num_elem value to 25
Jouni Malinen [Thu, 24 Aug 2023 14:56:23 +0000 (17:56 +0300)] 
Increment hmac_sha*_vector() maximum num_elem value to 25

This is needed for FTE MIC calculation for Reassociation Request frmae
when using MLO which could add 15 link addresses into the input data.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Learn link address for assoc link from (Re)Association Request
Jouni Malinen [Thu, 24 Aug 2023 14:34:37 +0000 (17:34 +0300)] 
wlantest: Learn link address for assoc link from (Re)Association Request

Store the non-AP MLD link address of the link that is used for
association when processing (Re)Association Request frames. This is
needed to get the full set of link addresses when 4-way handshake is not
used (e.g., for FT protocol).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Learn the Link ID for AP MLD affiliated BSSs
Jouni Malinen [Thu, 24 Aug 2023 14:28:33 +0000 (17:28 +0300)] 
wlantest: Learn the Link ID for AP MLD affiliated BSSs

This allows the Link ID to be determined based on the BSS entry when
processing a frame.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Search SPA using MLO aware find for FT Request/Response frame
Jouni Malinen [Thu, 24 Aug 2023 13:57:40 +0000 (16:57 +0300)] 
wlantest: Search SPA using MLO aware find for FT Request/Response frame

This is needed to be able to find a previously added STA entry when
roaming using FT over-the-DS back to an AP MLD that was used previously.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Fix FT over-the-DS decryption
Veerendranath Jakkam [Mon, 14 Aug 2023 15:25:08 +0000 (20:55 +0530)] 
wlantest: Fix FT over-the-DS decryption

Use STA address indicated in FT Request/Response frames instead of
transmit or receive addresses for creating/finding STA instance.

For MLO to MLO roaming:
1. STA may use different link compared to FT Action frames negotiated
   links.
2. STA may reassociate with target AP MLD with different set of
   links compared to links connected to current AP MLD.

So create STA with MLD MAC address and attach to one of the BSS
affiliated with target AP MLD. Update link address of the STA and BSS
during processing of the Reassociation Request frame.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
23 months agowlantest: Derive PMK-R1 and PTK using AA/SPA for MLO FT over-the-DS
Veerendranath Jakkam [Mon, 14 Aug 2023 15:25:08 +0000 (20:55 +0530)] 
wlantest: Derive PMK-R1 and PTK using AA/SPA for MLO FT over-the-DS

Use AP and STA addresses indicated in FT Request/Response frames for
PMK-R1 and PTK derivation instead of the addresses in the BSS and STA
entries. This is needed for MLO to use the MLD MAC address instead of
one of the link addresses.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
23 months agowlantest: Use local variables for AA/SPA in FT Request/Response processing
Veerendranath Jakkam [Mon, 14 Aug 2023 15:25:08 +0000 (20:55 +0530)] 
wlantest: Use local variables for AA/SPA in FT Request/Response processing

This makes the code more readable by getting rid of the multiple
instances of references to the specifiec fields within the FT Action
frame.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
23 months agoAdd a QCA vendor sub command for transmit latency statistics
Yu Wang [Fri, 11 Aug 2023 03:45:50 +0000 (20:45 -0700)] 
Add a QCA vendor sub command for transmit latency statistics

Add a new QCA vendor sub command QCA_NL80211_VENDOR_SUBCMD_TX_LATENCY to
configure, retrieve, and report per-link transmit latency statistics.

When used as a command, userspace configures transmit latency monitoring
and get the corresponding statistics of the last period. When used as a
command response, driver replies the get action from userspace with the
statistics of the last period. When used as an event, driver reports the
statistics periodically.

Signed-off-by: Yu Wang <quic_yyuwang@quicinc.com>
23 months agoUpdate iface->current_mode when fetching new hw_features
Nijun Gong [Tue, 11 Jul 2023 13:21:21 +0000 (21:21 +0800)] 
Update iface->current_mode when fetching new hw_features

When a CHANNEL_LIST_CHANGED event is received, memory of
iface->hw_features is freed and allocated again with
hostapd_get_hw_features(), but iface->current_mode still refer to the
original memory address, which is not correct since that memory has been
freed. This could happen in cases where the driver provides channel list
updates during the lifetime of the started BSS.

Fix this by updated iface->current_mode to point to the new array of hw
features.

Fixes: 0837863fbc62 ("AP: Handle 6 GHz AP state machine with NO_IR flags")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agotests: Make sae_proto_hostapd_status_* more robust
Jouni Malinen [Tue, 22 Aug 2023 16:46:44 +0000 (19:46 +0300)] 
tests: Make sae_proto_hostapd_status_* more robust

The first MGMT-TX-STATUS event might be for the initial broadcast
Deauthentication frame instead of the SAE Authentication frame. Skip the
first event and try to process TX status for the first Authentication
frame instead.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agotests: Update RSA 3k certificates
Jouni Malinen [Tue, 22 Aug 2023 14:00:37 +0000 (17:00 +0300)] 
tests: Update RSA 3k certificates

The previous ones expired and caused test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
23 months agotests: Beacon rate configuration for 54 Mbps
Jouni Malinen [Fri, 18 Aug 2023 18:16:04 +0000 (21:16 +0300)] 
tests: Beacon rate configuration for 54 Mbps

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agonl80211: Fix beacon rate configuration for legacy rates 36, 48, 54 Mbps
Prasanna JS [Fri, 18 Aug 2023 12:31:47 +0000 (05:31 -0700)] 
nl80211: Fix beacon rate configuration for legacy rates 36, 48, 54 Mbps

Typecasting takes precedence over division here, so the legacy rates
larger than 255 * 100 kbps (i.e., 36, 48, 54 Mbps) ended up getting
truncated to invalid values.

Fix this by typecasting the value after the division.

Fixes: d4f3003c56f8 ("nl80211: Configure Beacon frame TX rate if driver advertises support")
Signed-off-by: Prasanna JS <quic_pjs@quicinc.com>
23 months agoFix hostapd interface cleanup with multiple interfaces
Jouni Malinen [Fri, 18 Aug 2023 18:00:45 +0000 (21:00 +0300)] 
Fix hostapd interface cleanup with multiple interfaces

interfaces.iface[i] might be NULL when going through the cleanup of all
remaining interfaces at the end of the process termination. The changes
for clearing drv_priv in AP MLD cause that cleanup process to crash on
dereferencing a NULL pointer.

Fix this by explicitly checking that the interface context is available
before trying to clear the pointer to driver data.

Fixes: 7fa99b3246d1 ("AP: Allow starting multiple interfaces within single MLD")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoP2P: Do not filter pref_freq_list if the driver does not provide one
Jouni Malinen [Fri, 18 Aug 2023 17:40:12 +0000 (20:40 +0300)] 
P2P: Do not filter pref_freq_list if the driver does not provide one

wpa_drv_get_pref_freq_list() may fail and the 6 GHz channel removal
should not be done unless the operation actually succeeded. The previous
implementation ended up processing uninitialized data. This did not
really result in any observable misbehavior since the result was not
used, but this showed up as a failed test case when running tests with
valgrind.

Fixes: f0cdacacb356 ("P2P: Allow connection on 6 GHz channels if requested")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agotests: P2P autonomous GO and clearing of networking information
Jouni Malinen [Fri, 18 Aug 2023 17:33:29 +0000 (20:33 +0300)] 
tests: P2P autonomous GO and clearing of networking information

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoP2P: Clean wpa_s->last_ssid when removing a temporary group network
Xin Deng [Tue, 11 Jul 2023 06:18:38 +0000 (23:18 -0700)] 
P2P: Clean wpa_s->last_ssid when removing a temporary group network

wpa_supplicant could crash due to dereferencing freed memory in a corner
case. When a reestablished P2P GO group gets removed because the
hardware mode is not supported when switching from 2.4 to 5 GHz. Group
removal in wpas_p2p_group_delete() forget to clean wpa_s->last_ssid due
to the missing wpas_notify_network_removed() call before removing the
network with wpa_config_remove_network().

That could cause a crash when flushing old BSSs which age out in
wpa_bss_flush_by_age() which uses wpa_s->last_ssid in some cases.

Fix this by invoking wpas_notify_network_removed() to clean
wpa_s->last_ssid when removing a temporary P2P group network.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoDefine QCA vendor attribute for high RSSI roam trigger threshold
Sunil Dutt [Mon, 24 Jul 2023 11:26:47 +0000 (16:56 +0530)] 
Define QCA vendor attribute for high RSSI roam trigger threshold

Define an attribute for high RSSI roam trigger threshold. STA is
expected to trigger roam if the current connected AP's RSSI gets above
this high RSSI threshold. STA's roam attempt on high RSSI threshold aims
to find candidates from other better Wi-Fi bands.

Signed-off-by: Sunil Dutt <quic_usdutt@quicinc.com>
23 months agoDefine QCA vendor roam control RSSI attributes
Ke Huang [Tue, 20 Jun 2023 08:03:34 +0000 (16:03 +0800)] 
Define QCA vendor roam control RSSI attributes

Add three vendor roam control attributes to configure the roaming
parameters dynamically.
QCA_ATTR_ROAM_CONTROL_CONNECTED_LOW_RSSI_THRESHOLD controls the
connected AP's low RSSI threshold to trigger the neighbor lookup.
QCA_ATTR_ROAM_CONTROL_CANDIDATE_ROAM_RSSI_DIFF and
QCA_ATTR_ROAM_CONTROL_6GHZ_CANDIDATE_ROAM_RSSI_DIFF control the RSSI
difference threshold between the connected AP and the new candidate AP
for the roam to trigger.

Co-authored-by: Sunil Dutt <quic_usdutt@quicinc.com>
Signed-off-by: Sunil Dutt <quic_usdutt@quicinc.com>
23 months agoExtend QCA vendor command to include more parameters for netdev events
Krunalsinh Padhar [Wed, 16 Aug 2023 19:29:17 +0000 (12:29 -0700)] 
Extend QCA vendor command to include more parameters for netdev events

Extend enum qca_wlan_vendor_attr_mlo_peer_prim_netdev_event to add MLD
MAC address, the number of links, and link info. Link info contains
ifindex and MAC address of each link of a non-AP MLD that was negotiated
in ML association.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoQCA vendor attributes for updating roaming AP BSSID info
Chunquan Luo [Tue, 8 Aug 2023 06:51:50 +0000 (23:51 -0700)] 
QCA vendor attributes for updating roaming AP BSSID info

Add vendor attribute IDs QCA_WLAN_VENDOR_ATTR_ROAM_STATS_ORIGINAL_BSSID,
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_CANDIDATE_BSSID, and
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_ROAMED_BSSID for updating roaming AP
BSSID to user space to enable user space collecting the BSSID for
roaming issues.

Signed-off-by: Chunquan Luo <quic_chunquan@quicinc.com>
23 months agoEHT: 320 MHz DFS support
Chenming Huang [Fri, 14 Jul 2023 02:49:20 +0000 (08:19 +0530)] 
EHT: 320 MHz DFS support

Add support to obtain the start channel when checking whether DFS
is required when using 320 MHz channels.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoEHT: Support puncturing for 320 MHz channel bandwidth
Chenming Huang [Wed, 12 Jul 2023 03:02:32 +0000 (08:32 +0530)] 
EHT: Support puncturing for 320 MHz channel bandwidth

Determine the channel width by operating class for the 6 GHz band when
validating puncturing bitmap. This is needed to allow puncturing to be
used with 320 MHz channels.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Guess SAE/OWE group from EAPOL-Key length mismatch
Jouni Malinen [Fri, 11 Aug 2023 17:35:34 +0000 (20:35 +0300)] 
wlantest: Guess SAE/OWE group from EAPOL-Key length mismatch

The MIC length depends on the negotiated group when SAE-EXT-KEY or OWE
key_mgmt is used. wlantest can determine the group if the capture file
includes the group negotiation, i.e., the initial association when a PMK
was created. However, if the capture file includes only an association
using PMKSA caching, the group information is not available. This can
result in inability to be able to process the EAPOL-Key frames (e.g.,
with the "Truncated EAPOL-Key from" message).

If the negotiated group is not known and an EAPOL-Key frame length does
not seem to match the default expectations for group 19, check whether
the alternative lengths for group 20 or 21 would result in a frame that
seems to have valid length. If so, update the STA entry with the guessed
group and continue processing the EAPOL-Key frames based on this.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoAP: Use is_zero_ether_addr() to check if BSSID is NULL
Ilan Peer [Tue, 25 Jul 2023 07:16:58 +0000 (12:46 +0530)] 
AP: Use is_zero_ether_addr() to check if BSSID is NULL

Use helper function is_zero_ether_addr() for checking empty bssid
value in hostapd_driver_init().

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Manaswini Paluri <quic_mpaluri@quicinc.com>
23 months agoAP: Add configuration option to specify the desired MLD address
Ilan Peer [Tue, 25 Jul 2023 07:16:57 +0000 (12:46 +0530)] 
AP: Add configuration option to specify the desired MLD address

Add mld_addr configuration option to set the MLD MAC address.
The already existing bssid configuration option can be used to
control the AP MLD's link addresses.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Manaswini Paluri <quic_mpaluri@quicinc.com>
23 months agohostapd: Fix AID assignment in multiple BSSID
Allen.Ye [Thu, 3 Aug 2023 12:33:55 +0000 (20:33 +0800)] 
hostapd: Fix AID assignment in multiple BSSID

When STAs connect to transmitted BSS and nontransmitted BSS, the
AP should assign the aIDs from the same pool.

Use the transmitted BSS AID pool to assign AIDs when the AP enables
multiple BSSID.

Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
23 months agowpa_supplicant: Fix configuration parsing error for tx_queue_*
Michael Lee [Thu, 27 Jul 2023 08:29:22 +0000 (16:29 +0800)] 
wpa_supplicant: Fix configuration parsing error for tx_queue_*

In the original flow, after hostapd_config_tx_queue() successfully
parses a tx_queue variable, wpa_config_process_global() would not return
immediately. Then it would print out "unknown global field" later and set
return val to -1.

Return success (0) after hostapd_config_tx_queue() successfully parses a
tx_queue variable to fix this.

Fixes: 790026c3daa2 ("Allow TX queue parameters to be configured for wpa_supplicant AP/P2P GO")
Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
23 months agoBSS coloring: Fix CCA with multiple BSS
Felix Fietkau [Mon, 7 Aug 2023 19:59:47 +0000 (21:59 +0200)] 
BSS coloring: Fix CCA with multiple BSS

Pass bss->ctx instead of drv->ctx in order to avoid multiple reports for
the first bss. The first report would otherwise clear hapd->cca_color and
subsequent reports would cause the iface bss color to be set to 0.
In order to avoid any issues with cancellations, only overwrite the color
based on hapd->cca_color if it was actually set.

Fixes: 33c4dd26cd11 ("BSS coloring: Handle the collision and CCA events coming from the kernel")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoMinor formatting changes to CCMP test vectors
Henry Ptasinski [Thu, 13 Jul 2023 13:29:32 +0000 (15:29 +0200)] 
Minor formatting changes to CCMP test vectors

Signed-off-by: Henry Ptasinski <henry@e78com.com>
23 months agoInclude PTID in PV1 nonce construction for CCMP test vector
Henry Ptasinski [Thu, 13 Jul 2023 13:29:32 +0000 (15:29 +0200)] 
Include PTID in PV1 nonce construction for CCMP test vector

Includ the PTID in the PV1 nonce construction.

Signed-off-by: Henry Ptasinski <henry@e78com.com>
23 months agoFix CCMP test vector issues
Henry Ptasinski [Thu, 13 Jul 2023 13:29:32 +0000 (15:29 +0200)] 
Fix CCMP test vector issues

Commit b20991da6936a1baae9f2239ee127610a6f5335d introduced errors in
the order of arguments to the calls of ccmp_decrypt() and
ccmp_256_decrypt(). Correct the order of arguments.

Fixes: b20991da6936 ("wlantest: MLD MAC Address in CCMP/GCMP AAD/nonce")
Signed-off-by: Henry Ptasinski <henry@e78com.com>
23 months agoAP: Fix ieee802_1x_ml_set_sta_authorized()
Ilan Peer [Sun, 18 Jun 2023 14:55:40 +0000 (17:55 +0300)] 
AP: Fix ieee802_1x_ml_set_sta_authorized()

One of the conditions in the function should be inverted. Fix it.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
23 months agoFix a compiler warning on prototype mismatch
Chien Wong [Sun, 6 Aug 2023 15:15:48 +0000 (23:15 +0800)] 
Fix a compiler warning on prototype mismatch

Fix the warning:
wpa_supplicant.c:2257:5: warning: conflicting types for
‘wpas_update_random_addr’ due to enum/integer mismatch; have â€˜int(struct
wpa_supplicant *, enum wpas_mac_addr_style,  struct wpa_ssid *)’
[-Wenum-int-mismatch]
 2257 | int wpas_update_random_addr(struct wpa_supplicant *wpa_s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~
In file included from wpa_supplicant.c:32:
wpa_supplicant_i.h:1653:5: note: previous declaration of
‘wpas_update_random_addr’ with type â€˜int(struct wpa_supplicant *, int, 
struct wpa_ssid *)’
 1653 | int wpas_update_random_addr(struct wpa_supplicant *wpa_s, int
style,
      |     ^~~~~~~~~~~~~~~~~~~~~~~

Fixes: 1d4027fdbef2 ("Make random MAC address style parameters use common enum values")
Signed-off-by: Chien Wong <m@xv97.com>
23 months agotests: Check for beacon loss when using beacon protection
Jouni Malinen [Thu, 10 Aug 2023 18:26:36 +0000 (21:26 +0300)] 
tests: Check for beacon loss when using beacon protection

This extends testing coverage to detect an issue that was fixed in
commit bf9cbb462fd9 ("Fix writing of BIGTK in FT protocol").

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoFix writing of BIGTK in FT protocol
Jouni Malinen [Thu, 10 Aug 2023 18:17:40 +0000 (21:17 +0300)] 
Fix writing of BIGTK in FT protocol

A copy-paste issue in wpa_ft_bigtk_subelem() ended up encoding the IGTK
value instead of the BIGTK when providing the current BIGTK to the STA
during FT protocol. Fix this to use the correct key to avoid issues when
beacon protection is used with FT.

Fixes: 16889aff408e ("Add BIGTK KDE and subelement similarly to IGTK")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoAdd QCA vendor attributes for NDP setup
Vinay Gannevaram [Mon, 17 Apr 2023 09:59:18 +0000 (15:29 +0530)] 
Add QCA vendor attributes for NDP setup

QCA vendor extension is used for NDP setup. This defines the new
attributes QCA_WLAN_VENDOR_ATTR_NDP_CSIA_CAPABILITIES and
QCA_WLAN_VENDOR_ATTR_NDP_GTK_REQUIRED to support GTKSA, IGTKSA, and
BIGTKSA for NDP setup.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Do not update BSS entries for other AP MLDs in PTK cloning
Jouni Malinen [Thu, 10 Aug 2023 09:12:01 +0000 (12:12 +0300)] 
wlantest: Do not update BSS entries for other AP MLDs in PTK cloning

The new PTK migth need to be copied to another MLO STA entry, but that
operation should not modify the MLD MAC address of unrelated AP MLDs.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Do not claim update to AP MD MAC address if no change
Jouni Malinen [Thu, 10 Aug 2023 09:02:07 +0000 (12:02 +0300)] 
wlantest: Do not claim update to AP MD MAC address if no change

The "Updated AP MLD MAC Address from EAPOL-Key 1/4" can be confusing
when there is actually no change.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Include the MLD MAC address of the AP MLD in new-STA prints
Jouni Malinen [Thu, 10 Aug 2023 08:46:07 +0000 (11:46 +0300)] 
wlantest: Include the MLD MAC address of the AP MLD in new-STA prints

This makes the "Discovered new STA" entries in the debug log easier to
use when analyzing roaming cases with MLO.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Search for FT Target AP using MLD MAC address as well
Jouni Malinen [Thu, 10 Aug 2023 08:42:06 +0000 (11:42 +0300)] 
wlantest: Search for FT Target AP using MLD MAC address as well

When FT over-the-DS is used with MLO, the Target AP Address field is
expected to identify the AP MLD using its MLD MAC address.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Use the MLD MAC address as well for matching STA entries
Jouni Malinen [Thu, 10 Aug 2023 08:34:41 +0000 (11:34 +0300)] 
wlantest: Use the MLD MAC address as well for matching STA entries

Allow either a link address or the MLD MAC address of a non-AP MLD to
match the MAC address that is being used to identify a source or
destination of a frame for the MLO cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Use MLO search for the STA in reassociation
Jouni Malinen [Thu, 10 Aug 2023 08:31:26 +0000 (11:31 +0300)] 
wlantest: Use MLO search for the STA in reassociation

FT over-the-DS might have created the new STA entry on another
affiliated BSS during the FT Request/Response exchange, so use a wider
search to locate the correct STA entry when processing the Reassociation
Request/Response frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Learn non-AP MLD MAC address from (Re)Association Request frames
Jouni Malinen [Thu, 10 Aug 2023 08:27:21 +0000 (11:27 +0300)] 
wlantest: Learn non-AP MLD MAC address from (Re)Association Request frames

Use the Basic Multi-Link element in (Re)Association Request frames to
learn the non-AP MLD MAC address instead of having to wait until this
address is included in an EAPOL-Key frame. This is needed for FT
protocol (where 4-way handshake is not used) and it is also convenient
to have the MLD MAC address available as soon as possible to be able to
decrypt frames and even to recognize some special AP vs. STA cases when
either the BSSID or the AP MLD MAC address might be used.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Recognize non-AP MLD based on any link address for decryption
Jouni Malinen [Thu, 10 Aug 2023 08:22:47 +0000 (11:22 +0300)] 
wlantest: Recognize non-AP MLD based on any link address for decryption

Compare A1 against all the link addresses of a non-AP MLD when
determining whether a Data frame is from the non-AP MLD or the AP MLD
during a decryption attempt.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Find non-AP MLD only from affiliated BSSs of the AP MLD
Jouni Malinen [Thu, 10 Aug 2023 08:18:57 +0000 (11:18 +0300)] 
wlantest: Find non-AP MLD only from affiliated BSSs of the AP MLD

Make sta_find_mlo() more accurate by searching a non-AP MLD only from
the affialiated BSSs of the AP MLD instead of from any BSS. This might
help in some roaming cases where both the old and the new AP MLD have
their affiliated links in the BSS table.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Learn AP MLD MAC address from Beacon frames
Jouni Malinen [Thu, 10 Aug 2023 07:57:07 +0000 (10:57 +0300)] 
wlantest: Learn AP MLD MAC address from Beacon frames

Use the Basic Multi-Link element in Beacon frames (and Probe Response
frames for that matter) to learn the AP MLD MAC address instead of
having to wait until this address is included in an EAPOL-Key frame.
This is needed for FT protocol (where 4-way handshake is not used) and
it is also convenient to have the MLD MAC address available as soon as
possible to be able to decrypt frames and even to recognize some special
AP vs. STA cases when either the BSSID or the AP MLD MAC address might
be used.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoFTE protected element check for MLO Reassociation Response frame
Jouni Malinen [Tue, 8 Aug 2023 10:32:32 +0000 (13:32 +0300)] 
FTE protected element check for MLO Reassociation Response frame

The set of protected elements in the FTE in Reassociation Response frame
is different for MLO. Count RSNE and RSNXE separately for each link.
This implementation uses the number of links for which a GTK was
provided which does not fully match the standard ("requested link") and
a more accurate implementation is likely needed, but that will require
some more complexity and state information.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoDefragmentation of FTE
Jouni Malinen [Tue, 8 Aug 2023 09:37:39 +0000 (12:37 +0300)] 
Defragmentation of FTE

Defragment the FTE if it was fragmented. This is needed for MLO when the
FTE in Reassociation Response frame might be longer than 255 octets to
include all the group keys for all the links.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoRecognize FTE MLO subelements
Jouni Malinen [Tue, 8 Aug 2023 08:57:06 +0000 (11:57 +0300)] 
Recognize FTE MLO subelements

Recognize the new MLO GTK/IGTK/BIGTK subelements when parsing an FTE.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Support multiple input files
Jouni Malinen [Tue, 8 Aug 2023 08:00:42 +0000 (11:00 +0300)] 
wlantest: Support multiple input files

Allow the -r<file> command line argument to be used multiple times to
read more than a single capture file for processing. This reduces need
for external tools to be used first to merge capture files for wlantest.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Handle variable length MIC field in EAPOL-Key with OWE
Jouni Malinen [Tue, 8 Aug 2023 07:30:10 +0000 (10:30 +0300)] 
wlantest: Handle variable length MIC field in EAPOL-Key with OWE

The Key MIC field is of variable length when using OWE, so determine the
correct length based on which group was negotiated for OWE during
association.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Fix eht_mld_sae_legacy_client to restore sae_pwe
Jouni Malinen [Fri, 21 Jul 2023 17:17:53 +0000 (20:17 +0300)] 
tests: Fix eht_mld_sae_legacy_client to restore sae_pwe

Changing sae_pwe and leaving the modified value for the following test
cases can result in failures.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAP MLD: Handle new STA event when using SME offload to the driver
Veerendranath Jakkam [Mon, 6 Mar 2023 03:03:53 +0000 (08:33 +0530)] 
AP MLD: Handle new STA event when using SME offload to the driver

Parse link id and station MLD address received from the driver in the
NL80211_CMD_NEW_STA event.

Set MLO information of the station to the sta_info and wpa_sm.

Co-authored-by: Manaswini Paluri <quic_mpaluri@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agonl80211: Skip STA MLO link channel switch handling in AP mode
Manaswini Paluri [Thu, 22 Jun 2023 08:49:36 +0000 (14:19 +0530)] 
nl80211: Skip STA MLO link channel switch handling in AP mode

Add check to skip the STA mode specific MLO link channel switch handling
in AP mode. Commit 1b6f3b5850a7 ("MLD STA: Indicate per link channel
switch") added this indication only for STA mode.

Signed-off-by: Manaswini Paluri <quic_mpaluri@quicinc.com>
2 years agoAP MLD: OWE when SME is offloaded to the driver
Manaswini Paluri [Mon, 6 Mar 2023 10:49:04 +0000 (16:19 +0530)] 
AP MLD: OWE when SME is offloaded to the driver

Add support to parse association link id and MLD address from the
NL80211_CMD_UPDATE_OWE_INFO event.

Set MLO information of the station to the sta_info and wpa_sm.

Use station association link address for sending DH IE info to the
driver.

Signed-off-by: Manaswini Paluri <quic_mpaluri@quicinc.com>
2 years agoAP MLD: Use STA assoc link address in external auth status to the driver
Manaswini Paluri [Mon, 17 Apr 2023 14:04:44 +0000 (19:34 +0530)] 
AP MLD: Use STA assoc link address in external auth status to the driver

Use station association link address for sending SAE authentication
status to the driver in AP mode external authentication status.

Signed-off-by: Manaswini Paluri <quic_mpaluri@quicinc.com>
2 years agoSet RRM used config if the (Re)Association Request frame has RRM IE
Kiran Kumar Lokere [Thu, 8 Jun 2023 19:30:02 +0000 (12:30 -0700)] 
Set RRM used config if the (Re)Association Request frame has RRM IE

Set the sme RRM used config if the RRM element is present in the
(Re)Association Request frame sent in association event to cover the
cases where the driver SME takes care of negotiating RRM capabilities.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd QCA vendor attributes for user defined power save parameters
Vishal Miskin [Tue, 27 Jun 2023 14:13:36 +0000 (19:43 +0530)] 
Add QCA vendor attributes for user defined power save parameters

Extend QCA_WLAN_VENDOR_ATTR_CONFIG_OPTIMIZED_POWER_MANAGEMENT
attribute to support enum qca_wlan_vendor_opm_mode.

Add QCA vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_ITO and
QCA_WLAN_VENDOR_ATTR_CONFIG_OPM_SPEC_WAKE to configure inactivity
timeout and speculative wake interval in User defined optimized
power save mode.

Signed-off-by: Vishal Miskin <quic_vmiskin@quicinc.com>
2 years agoP2P: Check p2p_channel_select() return value
Jouni Malinen [Tue, 18 Jul 2023 13:15:01 +0000 (16:15 +0300)] 
P2P: Check p2p_channel_select() return value

Verify that the operation succeeds before a debug print indicating that
it did. This was already done in most callers, so be more consistent and
do it here as well.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFILS: Fix HE MCS field initialization
Jouni Malinen [Tue, 18 Jul 2023 13:11:08 +0000 (16:11 +0300)] 
FILS: Fix HE MCS field initialization

The second argument to memset() is only eight bits, so there is no point
in trying to set 0xffff values for an array of 16-bit fields. 0xff will
do the exact same thing without causing static analyzes warnings about
truncated value.

Fixes: 903e3a1e6259 ("FILS: Fix maximum NSS calculation for FD frame")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoACS: Remove invalid debug print
Jouni Malinen [Tue, 18 Jul 2023 13:08:44 +0000 (16:08 +0300)] 
ACS: Remove invalid debug print

ideal_chan is NULL here, so it is not really valid to try to debug print
something from it due to the implied NULL pointer dereferencing.

Fixes: af0f60e7dd00 ("EHT: Calculate puncturing bitmap for ACS")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoCheck whether element parsing has failed
Jouni Malinen [Tue, 18 Jul 2023 13:02:44 +0000 (16:02 +0300)] 
Check whether element parsing has failed

Check the ieee802_11_parse_elems() return code and do not proceed in
various cases if parsing failed. Previously, these cases would have been
allowed to continue by ignoring whatever might have followed in the IE
buffer after the first detected parsing failure. This is not really an
issue in practice, but it feels cleaner to explicitly stop when
receiving an invalid set of IEs.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoWPS: Optimize attribute parsing workaround
Jouni Malinen [Tue, 18 Jul 2023 08:33:37 +0000 (11:33 +0300)] 
WPS: Optimize attribute parsing workaround

Optimize the search for nonzero octets when checking for the need to
work around WPS M1 padding. The previous implementation was really
inefficient (O(n^2)) and while that was likely sufficiently fast for the
cases where the MMPDU size limit prevents long buffers (e.g., all P2P
Action frames), it might be able to take tens of seconds on low-end CPUs
with maximum length EAP-WSC messages during WPS provisioning. More
visibly, this was causing OSS-Fuzz to time out a test case with
unrealisticly long data (i.e., almost 10 times the maximum EAP-WSC
buffer length).

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60039
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Do not print control characters in debug
Jouni Malinen [Tue, 18 Jul 2023 08:15:15 +0000 (11:15 +0300)] 
P2P: Do not print control characters in debug

Do not print the received country code as characters if it includes
control characters.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: PEAP and TTLS phase2_auth behavior
Jouni Malinen [Mon, 17 Jul 2023 18:11:09 +0000 (21:11 +0300)] 
tests: PEAP and TTLS phase2_auth behavior

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoTTLS client: Support phase2_auth=2
Jouni Malinen [Mon, 17 Jul 2023 18:20:37 +0000 (21:20 +0300)] 
TTLS client: Support phase2_auth=2

Allow the phase2_auth=2 parameter (in phase1 configuration item) to be
used with EAP-TTLS to require Phase 2 authentication. In practice, this
disables TLS session resumption since EAP-TTLS is defined to skip Phase
2 when resuming a session.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPEAP client: Update Phase 2 authentication requirements
Jouni Malinen [Sat, 8 Jul 2023 16:55:32 +0000 (19:55 +0300)] 
PEAP client: Update Phase 2 authentication requirements

The previous PEAP client behavior allowed the server to skip Phase 2
authentication with the expectation that the server was authenticated
during Phase 1 through TLS server certificate validation. Various PEAP
specifications are not exactly clear on what the behavior on this front
is supposed to be and as such, this ended up being more flexible than
the TTLS/FAST/TEAP cases. However, this is not really ideal when
unfortunately common misconfiguration of PEAP is used in deployed
devices where the server trust root (ca_cert) is not configured or the
user has an easy option for allowing this validation step to be skipped.

Change the default PEAP client behavior to be to require Phase 2
authentication to be successfully completed for cases where TLS session
resumption is not used and the client certificate has not been
configured. Those two exceptions are the main cases where a deployed
authentication server might skip Phase 2 and as such, where a more
strict default behavior could result in undesired interoperability
issues. Requiring Phase 2 authentication will end up disabling TLS
session resumption automatically to avoid interoperability issues.

Allow Phase 2 authentication behavior to be configured with a new phase1
configuration parameter option:
'phase2_auth' option can be used to control Phase 2 (i.e., within TLS
tunnel) behavior for PEAP:
 * 0 = do not require Phase 2 authentication
 * 1 = require Phase 2 authentication when client certificate
   (private_key/client_cert) is no used and TLS session resumption was
   not used (default)
 * 2 = require Phase 2 authentication in all cases

Signed-off-by: Jouni Malinen <j@w1.fi>
2 years agowlantest: Support HT Control field in Robust Management frames
Jouni Malinen [Thu, 22 Jun 2023 19:44:51 +0000 (22:44 +0300)] 
wlantest: Support HT Control field in Robust Management frames

Check the +HTC bit in FC to determine if the HT Control field is present
when decrypting Robust Management frames. This was already done for QoS
Data frames, but the Management frame case had not been extended to
cover this option.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd support to configure per-MLO link maximum supported channel width
Veerendranath Jakkam [Thu, 22 Jun 2023 05:34:02 +0000 (11:04 +0530)] 
Add support to configure per-MLO link maximum supported channel width

Update documentation of the QCA_WLAN_VENDOR_ATTR_CONFIG_CHANNEL_WIDTH
and QCA_WLAN_VENDOR_ATTR_CONFIG_CHAN_WIDTH_UPDATE_TYPE attributes to
indicate support for per-MLO link configuration.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoAdd QCA vendor interface to support per-MLO link configurations
Veerendranath Jakkam [Thu, 22 Jun 2023 05:21:21 +0000 (10:51 +0530)] 
Add QCA vendor interface to support per-MLO link configurations

Add support for per-MLO link configurations in
QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION commands.

Additionally, add documentation for
QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION commands.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoReserve QCA vendor sub command id 232
Vamsi Krishna [Fri, 16 Jun 2023 06:22:19 +0000 (11:52 +0530)] 
Reserve QCA vendor sub command id 232

This is reserved for QCA use.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoQCA vendor test config attribute for MLO link powersave
Kiran Kumar Lokere [Thu, 8 Jun 2023 19:43:29 +0000 (12:43 -0700)] 
QCA vendor test config attribute for MLO link powersave

Define a new QCA vendor test config attribute to configure powersave
on MLO links.

This attribute is used for testing purposes.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd vendor attributes for EPCS feature
Paul Zhang [Mon, 12 Jun 2023 08:32:17 +0000 (16:32 +0800)] 
Add vendor attributes for EPCS feature

Add vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_EPCS_CAPABILITY
to set EPCS (Emergency Preparedness Communications Service)
feature capability.

Add vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_EPCS_FUNCTION
to enable/disable EPCS priority access.

These are for testing purposes.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoQCA vendor interface to control maximum allowed bandwidth update type
Ainy Kumari [Thu, 25 May 2023 11:55:33 +0000 (17:25 +0530)] 
QCA vendor interface to control maximum allowed bandwidth update type

Add support to control maximum allowed bandwidth update type for
the current connection.

Signed-off-by: Ainy Kumari <quic_ainykuma@quicinc.com>
2 years agoAdd support to get the TDLS wider bandwidth capability
Aleti Nageshwar Reddy [Wed, 21 Jun 2023 09:04:53 +0000 (14:34 +0530)] 
Add support to get the TDLS wider bandwidth capability

Extend bitwise mask in enum qca_wlan_tdls_caps_features_supported to get
the TDLS wider bandwidth capability from the driver.

Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agoAdd documentation and nested attribute enums for existing QCA TDLS commands
Aleti Nageshwar Reddy [Tue, 13 Jun 2023 11:20:25 +0000 (16:50 +0530)] 
Add documentation and nested attribute enums for existing QCA TDLS commands

Add missing documentation and nested attribute enums for the existing
QCA TDLS vendor commands.

Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agoDefine a QCA vendor attribute to configure UL MU transmission
Nirav Shah [Wed, 21 Jun 2023 15:26:29 +0000 (20:56 +0530)] 
Define a QCA vendor attribute to configure UL MU transmission

Define a new QCA vendor attribute to enable/suspend trigger
based UL MU transmission.

Signed-off-by: Prasanna JS <quic_pjs@quicinc.com>
2 years agoEHT: Process puncturing bitmap from channel select driver event for ACS
Chenming Huang [Thu, 23 Mar 2023 08:04:45 +0000 (16:04 +0800)] 
EHT: Process puncturing bitmap from channel select driver event for ACS

Retrieve the puncturing bitmap sent by the driver in channel select
events for ACS when using the QCA vendor specific event.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agonl80211: Always return NL_SKIP from survey dump handler
Veerendranath Jakkam [Thu, 1 Jun 2023 10:02:26 +0000 (15:32 +0530)] 
nl80211: Always return NL_SKIP from survey dump handler

Previously, NL_STOP was returned from the survey dump handler if the
maximum number of frequencies was reached for storing survey
information, but this is causing wpa_supplicant context getting stuck if
the current SKB returned by the kernel itself ends with NLMSG_DONE type
message. This is due to libnl immediately stopping processing the
current SKB upon receiving NL_STOP and not being able to process
NLMSG_DONE type message, and due to this wpa_supplicant's
finish_handler() not getting called. Fix this by returning NL_SKIP
instead while still ignoring all possible additional frequencies.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoDetermine current hw mode before channel switch
Xinyue Ling [Wed, 7 Jun 2023 08:13:34 +0000 (16:13 +0800)] 
Determine current hw mode before channel switch

There are two hw modes (5 GHz and 6 GHz) with HOSTAPD_MODE_IEEE80211A
and the current hw mode may be wrong after one channel switch to 6 GHz.
This will cause hostapd_set_freq_params() to return -1 when saving
previous state and the second channel switch to fail. Fix this by adding
hostapd_determine_mode() before every channel switch.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoEnhance QCA_WLAN_VENDOR_ATTR_CONFIG_EHT_MLO_MAX_NUM_LINKS
Shivani Baranwal [Wed, 31 May 2023 09:41:24 +0000 (15:11 +0530)] 
Enhance QCA_WLAN_VENDOR_ATTR_CONFIG_EHT_MLO_MAX_NUM_LINKS

Use zero value with QCA_WLAN_VENDOR_ATTR_CONFIG_EHT_MLO_MAX_NUM_LINKS to
restore the device default maximum number of allowed MLO links
capability.

Also, as per IEEE 802.11be/D3.0, the maximum number of allowed links for
an MLO connection is 15. Update the documentation of the attribute to
indicate the same.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoAP MLD: Provide Link ID when requesting current seqnum for a group key
Jouni Malinen [Thu, 15 Jun 2023 14:43:17 +0000 (17:43 +0300)] 
AP MLD: Provide Link ID when requesting current seqnum for a group key

This is needed to match the key configuration design with a single
netdev and the nl80211 driver interface.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Additional EHT MLD AP coverage
Jouni Malinen [Wed, 14 Jun 2023 17:03:08 +0000 (20:03 +0300)] 
tests: Additional EHT MLD AP coverage

Verify behavior in SAE/PSK transition mode and PTK rekeying.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Add basic MLD hwsim tests
Andrei Otcheretianski [Mon, 22 May 2023 19:34:12 +0000 (22:34 +0300)] 
tests: Add basic MLD hwsim tests

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoAP/MLO: Forward received EAPOL frames to correct BSS
Andrei Otcheretianski [Mon, 22 May 2023 19:34:10 +0000 (22:34 +0300)] 
AP/MLO: Forward received EAPOL frames to correct BSS

In case of MLO AP and legacy client, make sure received EAPOL frames are
processed on the correct BSS.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoAP/MLO: Forward Management frame TX status to correct BSS
Andrei Otcheretianski [Mon, 22 May 2023 19:34:10 +0000 (22:34 +0300)] 
AP/MLO: Forward Management frame TX status to correct BSS

In case of MLO AP and legacy client, make sure Management frame TX
status is processed on the correct BSS.

Since there's only one instance of i802_bss for all BSSs in an AP MLD in
the nl80211 driver interface, the link ID is needed to forward the
status to the correct BSS. Store the link ID when transmitting
Managements frames and report it in TX status.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoAP/MLO: Forward EAPOL TX status to correct BSS
Andrei Otcheretianski [Mon, 22 May 2023 19:34:10 +0000 (22:34 +0300)] 
AP/MLO: Forward EAPOL TX status to correct BSS

In case of MLO AP and legacy client, make sure EAPOL TX status is
processed on the correct BSS.

Since there's only one instance of i802_bss for all BSSs in an AP MLD in
the nl80211 driver interface, the link ID is needed to forward the EAPOL
TX status to the correct BSS. Store the link ID when transmitting EAPOL
frames over control interface and report it in TX status.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoAP: Use MLD address for traffic tests
Andrei Otcheretianski [Mon, 22 May 2023 19:34:09 +0000 (22:34 +0300)] 
AP: Use MLD address for traffic tests

In case of MLD use the MLD address.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoAP: Don't process SAE/OWE association info on MLD links
Andrei Otcheretianski [Mon, 22 May 2023 19:34:08 +0000 (22:34 +0300)] 
AP: Don't process SAE/OWE association info on MLD links

Only the main link handles SAE authentication and OWE, skip them on
other links.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoAP: Use MLD address for SAE commit derivation
Andrei Otcheretianski [Mon, 22 May 2023 19:34:07 +0000 (22:34 +0300)] 
AP: Use MLD address for SAE commit derivation

MLO associations use the MLD address instead of the MAC address in SAE
derivation.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoAP: Specify the link ID for set_key() callback for group keys
Ilan Peer [Mon, 22 May 2023 19:34:06 +0000 (22:34 +0300)] 
AP: Specify the link ID for set_key() callback for group keys

If the AP is part of an AP MLD specify the link ID in the set_key
parameters whenever setting a group key.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoMLO: Get the correct AA and SPA based on MLD operation for RSN authenticator
Ilan Peer [Mon, 22 May 2023 19:34:05 +0000 (22:34 +0300)] 
MLO: Get the correct AA and SPA based on MLD operation for RSN authenticator

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2 years agoMLO: Add MLO KDEs to EAPOL-Key msg 1/2 of the group handshake
Ilan Peer [Mon, 22 May 2023 19:34:04 +0000 (22:34 +0300)] 
MLO: Add MLO KDEs to EAPOL-Key msg 1/2 of the group handshake

This provides the link specific group keys and last used PN/IPN/BIPN
values to the Supplicant in the MLO KDEs instead of the KDEs used for
non-MLO cases.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2 years agoMLO: Validate MLO KDEs in EAPOL-Key msg 4/4
Ilan Peer [Mon, 22 May 2023 19:34:03 +0000 (22:34 +0300)] 
MLO: Validate MLO KDEs in EAPOL-Key msg 4/4

Verify that the MLD address in EAPOL-Key msg 4/4 is set correctly for
MLO cases. Note that the mechanism used here for distinguishing between
EAPOL-Key msg 2/4 and 4/4 is not exactly ideal and should be improved in
the future.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoMLO: Add MLO KDEs to EAPOL-Key msg 3/4
Andrei Otcheretianski [Mon, 22 May 2023 19:34:02 +0000 (22:34 +0300)] 
MLO: Add MLO KDEs to EAPOL-Key msg 3/4

This provides the link specific group keys and last used PN/IPN/BIPN
values to the Supplicant in the MLO KDEs instead of the KDEs used for
non-MLO cases.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoMLO: Mechanism for fetching group key information for the links
Andrei Otcheretianski [Mon, 22 May 2023 19:34:02 +0000 (22:34 +0300)] 
MLO: Mechanism for fetching group key information for the links

Allow RSN authenticator to fetch the current group key information with
the keys and the last used PN/IPN/BIPN for MLO specific KDEs.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoMLO: Validate MLO Link KDEs in EAPOL-Key msg 2/4
Ilan Peer [Mon, 22 May 2023 19:34:01 +0000 (22:34 +0300)] 
MLO: Validate MLO Link KDEs in EAPOL-Key msg 2/4

Verify that the affiliated link information matches between association
(unprotected) and 4-way handshake (protected).

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoMLO: Add MAC Address KDE to EAPOL-Key msg 1/4 for MLO association
Ilan Peer [Mon, 22 May 2023 19:34:00 +0000 (22:34 +0300)] 
MLO: Add MAC Address KDE to EAPOL-Key msg 1/4 for MLO association

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>