public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 04/10] network: add support for SAE password identifiers
Date: Wed, 6 Dec 2023 11:08:35 -0600	[thread overview]
Message-ID: <03c0874e-0f64-493f-b9c8-cb302045938c@gmail.com> (raw)
In-Reply-To: <20231205154647.1778389-4-prestwoj@gmail.com>

Hi James,

On 12/5/23 09:46, James Prestwood wrote:
> Adds a new network profile setting [Security].PasswordIdentifier.
> When set (and the BSS enables SAE password identifiers) the network
> and handshake object will read this and use it for the SAE
> exchange.
> 
> Loading the PSK will fail if there is no password identifier set
> and the BSS sets the "exclusive" bit. If a password identifier is

I'm not so sure about this.  The trouble is that this logic is sufficient for 
the initial connection, but isn't sufficient when you consider re-association.

> set and the BSS doesn't indicate support the setting will be ignored
> (with a debug print).
> ---
>   src/network.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
>   1 file changed, 49 insertions(+), 1 deletion(-)
> 

<snip>

> @@ -641,6 +657,32 @@ static int network_load_psk(struct network *network, struct scan_bss *bss)
>   		psk_len = 0;
>   	}
>   
> +	/*
> +	 * Sort out if the password identifier is required, should be used, "
> +	 * or should be ignored.
> +	 */
> +	if (is_sae) {
> +		if (bss->sae_pw_id_exclusive && !password_id) {

This likely needs to be taken into consideration much later, when building the 
actual handshake state.

> +			l_error("BSS requires SAE password identifiers, check "
> +				"[Security].PasswordIdentifier");
> +			return -ENOKEY;
> +		}
> +
> +		/*
> +		 * If the profile contains a password identifier but the network
> +		 * does not support it IWD will still attempt to connect. The

Password identifier is only used by SAE H2E.  One can easily imagine a weird 
network of mixed APs with some being SAE H2E, some not.  This is why I didn't 
bother implementing this, it is a half-baked feature.

> +		 * caveat here is if the connection is successful the sync will
> +		 * remove the password identifier entry. Though this might be
> +		 * unexpected to the user, retaining this (invalid) setting
> +		 * isn't worth special casing.

And this doesn't sound nice at all...  I think the setting should be preserved.

> +		 */
> +		if (!bss->sae_pw_id_used && password_id) {
> +			l_debug("[Security].PasswordIdentifier set but BSS "
> +				"does not not use password identifiers");
> +			l_free(l_steal_ptr(password_id));
> +		}
> +	}
> +
>   	/* PSK can be generated from the passphrase but not the other way */
>   	if (!psk || is_sae) {
>   		if (!passphrase)

Regards,
-Denis


  reply	other threads:[~2023-12-06 17:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 15:46 [PATCH 01/10] scan: parse password identifier/exclusive bits James Prestwood
2023-12-05 15:46 ` [PATCH 02/10] network: pass scan_bss into network_load_psk James Prestwood
2023-12-05 15:46 ` [PATCH 03/10] handshake: add password identifier/setter James Prestwood
2023-12-05 15:46 ` [PATCH 04/10] network: add support for SAE password identifiers James Prestwood
2023-12-06 17:08   ` Denis Kenzior [this message]
2023-12-06 18:44     ` James Prestwood
2023-12-06 19:44       ` Denis Kenzior
2023-12-06 19:53         ` James Prestwood
2023-12-05 15:46 ` [PATCH 05/10] sae: include password identifier IE in commit James Prestwood
2023-12-05 15:46 ` [PATCH 06/10] doc: document [Security].PasswordIdentifier James Prestwood
2023-12-05 15:46 ` [PATCH 07/10] auto-t: add H2E password identifier test James Prestwood
2023-12-05 15:46 ` [PATCH 08/10] mpdu: add unknown password identifier status James Prestwood
2023-12-05 15:46 ` [PATCH 09/10] sae: add debugging for incorrect password identifier James Prestwood
2023-12-05 15:46 ` [PATCH 10/10] auto-t: throw exception if executable is missing James Prestwood
2023-12-06 17:00 ` [PATCH 01/10] scan: parse password identifier/exclusive bits Denis Kenzior

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=03c0874e-0f64-493f-b9c8-cb302045938c@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    --cc=prestwoj@gmail.com \
    /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