From 9df8d16f6d45b05a5fc0f047f06d4797e063ac5a Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 9 Mar 2026 09:57:43 -0700 Subject: [PATCH] station: check return of handshake_state_set_pmksa 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/station.c b/src/station.c index f8069d89..8fcf8c70 100644 --- a/src/station.c +++ b/src/station.c @@ -1358,9 +1358,10 @@ 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 (!L_WARN_ON(!handshake_state_set_pmksa(hs, pmksa))) { + info.num_pmkids = 1; + info.pmkids = hs->pmksa->pmkid; + } } }