From c346f2b88de3358c65dfa670a71a6eae15eee0a1 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 9 Mar 2026 09:57:46 -0700 Subject: [PATCH] handshake: clear expiration of pmksa in _steal_pmksa() When pulling the pmksa out of the handshake object (to cache) we also need to clear the expiration within the handshake itself. This will prevent future attempts of setting the PMKSA into the handshake due to the logic in handshake_state_set_pmksa(): /* checks for both expiration || pmksa being set */ if (s->expiration) return false; --- src/handshake.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/handshake.c b/src/handshake.c index f6b16c31..f1bc19e0 100644 --- a/src/handshake.c +++ b/src/handshake.c @@ -1268,6 +1268,7 @@ static struct pmksa *handshake_state_steal_pmksa(struct handshake_state *s) pmksa = l_new(struct pmksa, 1); pmksa->expiration = s->expiration; + s->expiration = 0; memcpy(pmksa->spa, s->spa, sizeof(s->spa)); memcpy(pmksa->aa, s->aa, sizeof(s->aa)); memcpy(pmksa->ssid, s->ssid, s->ssid_len);