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] station: check return of handshake_state_set_pmksa
Date: Wed, 3 Dec 2025 16:19:27 -0600	[thread overview]
Message-ID: <f1fe54f2-8205-477b-8237-506da0e7260d@gmail.com> (raw)
In-Reply-To: <20251203150321.916124-1-prestwoj@gmail.com>

Hi James,

On 12/3/25 9:03 AM, James Prestwood wrote:
> If this fails num_pmkids and pmkids would get set, but to an
> uninitialized buffer. This would then fail to build the handshake
> object later when copying the PMKID.
> ---
>   src/station.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/src/station.c b/src/station.c
> index 50997f5f..6c9e8d13 100644
> --- a/src/station.c
> +++ b/src/station.c
> @@ -1378,9 +1378,13 @@ build_ie:
>   					bss->ssid, bss->ssid_len,
>   					info.akm_suites);
>   		if (pmksa) {
> -			handshake_state_set_pmksa(hs, pmksa);
> -			info.num_pmkids = 1;
> -			info.pmkids = hs->pmksa->pmkid;
> +			if (!handshake_state_set_pmksa(hs, pmksa)) {

This seems fishy.  Are you sure you're not masking the real issue here?  Would 
this possibly be related to fast transition re-using an old handshake?  Maybe we 
should not try to use or set the PMKSA for FT ?

> +				l_warn("failed to set PMKSA to handshake");
> +				pmksa_cache_free(pmksa);
> +			} else {
> +				info.num_pmkids = 1;
> +				info.pmkids = hs->pmksa->pmkid;
> +			}
>   		}
>   	}
>   

Regards,
-Denis

  reply	other threads:[~2025-12-03 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 15:03 [PATCH] station: check return of handshake_state_set_pmksa James Prestwood
2025-12-03 22:19 ` Denis Kenzior [this message]
2025-12-03 22:27   ` James Prestwood

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=f1fe54f2-8205-477b-8237-506da0e7260d@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