Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: Jan-Henrik Bruhn <git@jhbruhn.de>
To: iwd@lists.linux.dev
Cc: Jan-Henrik Bruhn <kernel@jhbruhn.de>
Subject: [PATCH 2/2] eapol: use vendor quirk to relax PMKID check
Date: Tue, 27 Oct 2026 11:27:35 +0100	[thread overview]
Message-ID: <20261027102735.140381-2-git@jhbruhn.de> (raw)
In-Reply-To: <20261027102735.140381-1-git@jhbruhn.de>

From: Jan-Henrik Bruhn <kernel@jhbruhn.de>

Extreme Networks APs running WiNG include a PMKID in message 1/4 of
the FT-8021X handshake which IWD cannot validate. It does not match
the PMKID derived from either half of the MSK (SHA1 or SHA256), nor
PMKR0Name/PMKR1Name, and changes on every attempt. IWD treats this
as a PMKSA mismatch and restarts EAP, which only results in another
mismatch until the AP deauthenticates the station.

If EAP was just completed the PMK is fresh, so restarting EAP cannot
help. The PMKID in 1/4 is also not covered by a MIC, whereas the
PMKR1Name in 3/4 is, and is already validated. For APs with the
pmkid_mismatch quirk, continue the handshake in this case.

---
Notes:

Seen with Extreme Networks APs (BSSID OUI 00:dc:b2, vendor IE OUI
00:a0:f8 type 5), FT-8021X and PEAPv0/MSCHAPv2 with Crypto-Binding.
wpa_supplicant connects fine.

Without this patch (iwd 3.12), every attempt looks like this:

  EAP completed with eapSuccess
  eapol_handle_ptk_1_of_4() ifindex=9
  handshake_state_pmkid_matches() PMKID did not match, trying SHA1 derivation
  eapol_handle_ptk_1_of_4() Authenticator sent a PMKID that didn't match
  PEAP: tls_tx_handshake:1244 Sending a TLS_CLIENT_HELLO of 172 bytes
  ...
  Received Deauthentication event, reason: 32770, from_ap: true

A debug build logged the received PMKIDs (fe890a12..., b7936fa1...,
d3531a44...). With this patch 3/4 is accepted and the connection
completes.

With FT-8021X removed from AKM selection (same APs, no patch) there
is no PMKID mismatch and 802.1X connects fine, so this is specific to
the FT-8021X implementation on these APs.

 src/eapol.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/eapol.c b/src/eapol.c
index 372549c..d802adc 100644
--- a/src/eapol.c
+++ b/src/eapol.c
@@ -1256,14 +1256,19 @@ static void eapol_handle_ptk_1_of_4(struct eapol_sm *sm,
 			goto error_unspecified;
 	} else if (pmkid) {
 		if (!handshake_state_pmkid_matches(sm->handshake, pmkid)) {
+			bool ignore = sm->eap_exchanged &&
+				sm->handshake->vendor_quirks.pmkid_mismatch;
+
 			l_debug("Authenticator sent a PMKID that didn't match");
 
 			/*
 			 * If the AP has a different PMKSA from ours and we
 			 * have means to create a new PMKSA through EAP then
-			 * try that, otherwise give up.
+			 * try that, otherwise give up.  Some APs send a PMKID
+			 * we can't derive even after a fresh EAP exchange, in
+			 * which case restarting EAP won't help.
 			 */
-			if (sm->eap) {
+			if (sm->eap && !ignore) {
 				__send_eapol_start(sm, unencrypted);
 				return;
 			}
-- 
2.43.0


      reply	other threads:[~2026-10-27 10:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 10:27 [PATCH 1/2] vendor_quirks: add PMKID mismatch quirk Jan-Henrik Bruhn
2026-10-27 10:27 ` Jan-Henrik Bruhn [this message]

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=20261027102735.140381-2-git@jhbruhn.de \
    --to=git@jhbruhn.de \
    --cc=iwd@lists.linux.dev \
    --cc=kernel@jhbruhn.de \
    /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