From: James Prestwood <prestwoj@gmail.com>
To: John Brandt <brandtwjohn@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 07/11] sae: support reception of Confirm frame by AP
Date: Wed, 24 Apr 2024 05:08:47 -0700 [thread overview]
Message-ID: <e049836d-04cf-47db-82ea-a19997af8c46@gmail.com> (raw)
In-Reply-To: <20240421125050.6649-8-brandtwjohn@gmail.com>
Hi John,
On 4/21/24 5:50 AM, John Brandt wrote:
> Experimental AP-mode support for receiving a Confirm frame when in the
> COMMITTED state. The AP will reply with a Confirm frame.
>
> Note that when acting as an AP, on reception of a Commit frame, the AP
> only replies with a Commit frame. The protocols allows to also already
> send the Confirm frame, but older clients may not support simultaneously
> receiving a Commit and Confirm frame.
Could we add some basic unit tests. Mainly just sanity checks that the
message flow works as expected with handshake->authenticator set.
> ---
> src/sae.c | 38 +++++++++++++++++++++++++-------------
> 1 file changed, 25 insertions(+), 13 deletions(-)
>
> diff --git a/src/sae.c b/src/sae.c
> index 8a1e311a..da55c764 100644
> --- a/src/sae.c
> +++ b/src/sae.c
> @@ -906,9 +906,13 @@ static int sae_process_confirm(struct sae_sm *sm, const uint8_t *from,
>
> sm->state = SAE_STATE_ACCEPTED;
>
> - sae_debug("Sending Associate to "MAC, MAC_STR(sm->handshake->aa));
> -
> - sm->tx_assoc(sm->user_data);
> + if (!sm->handshake->authenticator) {
> + sae_debug("Sending Associate to "MAC, MAC_STR(sm->handshake->aa));
> + sm->tx_assoc(sm->user_data);
> + } else {
> + if (!sae_send_confirm(sm))
> + return -EPROTO;
> + }
>
> return 0;
> }
> @@ -1059,16 +1063,24 @@ static int sae_verify_committed(struct sae_sm *sm, uint16_t transaction,
> unsigned int skip;
> struct ie_tlv_iter iter;
>
> - /*
> - * Upon receipt of a Con event...
> - * Then the protocol instance checks the value of Sync. If it
> - * is greater than dot11RSNASAESync, the protocol instance shall send a
> - * Del event to the parent process and transition back to Nothing state.
> - * If Sync is not greater than dot11RSNASAESync, the protocol instance
> - * shall increment Sync, transmit the last SAE Commit message sent to
> - * the peer...
> - */
> - if (transaction == SAE_STATE_CONFIRMED) {
> + if (sm->handshake->authenticator && transaction == SAE_STATE_CONFIRMED) {
> + /*
> + * TODO: Sanity-check received Confirm frame from the client. For now
> + * AP-mode SAE support is experimental and we simply accept the frame.
> + * Note that the cryptographic confirm field value will still be checked
> + * before replying with a Confirm frame.
> + */
> + return 0;
> + } else if (transaction == SAE_STATE_CONFIRMED) {
> + /*
> + * Upon receipt of a Con event...
> + * Then the protocol instance checks the value of Sync. If it
> + * is greater than dot11RSNASAESync, the protocol instance shall send a
> + * Del event to the parent process and transition back to Nothing state.
> + * If Sync is not greater than dot11RSNASAESync, the protocol instance
> + * shall increment Sync, transmit the last SAE Commit message sent to
> + * the peer...
> + */
> if (sm->sync > SAE_SYNC_MAX)
> return -ETIMEDOUT;
>
next prev parent reply other threads:[~2024-04-24 12:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-21 12:50 [PATCH 00/11] Basic SAE support for AP mode John Brandt
2024-04-21 12:50 ` [PATCH 01/11] ap: ability to advertise PSK and SAE John Brandt
2024-04-21 12:50 ` [PATCH 02/11] ap: accept PSK/SAE in auth depending on config John Brandt
2024-04-24 12:05 ` James Prestwood
2024-04-21 12:50 ` [PATCH 03/11] sae: add function sae_set_group John Brandt
2024-04-24 12:05 ` James Prestwood
2024-04-21 12:50 ` [PATCH 04/11] sae: refactor and add function sae_calculate_keys John Brandt
2024-04-24 12:06 ` James Prestwood
2024-04-21 12:50 ` [PATCH 05/11] sae: make sae_process_commit callable in AP mode John Brandt
2024-04-24 12:08 ` James Prestwood
2024-04-21 12:50 ` [PATCH 06/11] sae: verify offered group " John Brandt
2024-04-21 12:50 ` [PATCH 07/11] sae: support reception of Confirm frame by AP John Brandt
2024-04-24 12:08 ` James Prestwood [this message]
2024-04-21 12:50 ` [PATCH 08/11] ap: add support to handle SAE authentication John Brandt
2024-04-24 12:06 ` James Prestwood
2024-04-21 12:50 ` [PATCH 09/11] ap: enable start of 4-way HS after SAE John Brandt
2024-04-21 12:50 ` [PATCH 10/11] eapol: support PTK derivation with SHA256 John Brandt
2024-04-21 12:50 ` [PATCH 11/11] eapol: encrypt key data for AKM-defined ciphers John Brandt
2024-04-22 13:52 ` [PATCH 00/11] Basic SAE support for AP mode James Prestwood
2024-04-24 12:07 ` James Prestwood
2024-04-29 0:04 ` John Brandt
2024-04-29 12:00 ` James Prestwood
2024-04-30 23:27 ` KeithG
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e049836d-04cf-47db-82ea-a19997af8c46@gmail.com \
--to=prestwoj@gmail.com \
--cc=brandtwjohn@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox