public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v3 1/4] station: check return of handshake_state_set_pmksa
@ 2026-03-09 16:57 James Prestwood
  2026-03-09 16:57 ` [PATCH v3 2/4] auto-t: refactor testSAE-roam into connect/roam functions James Prestwood
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: James Prestwood @ 2026-03-09 16:57 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

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 50997f5f..fdd4cda5 100644
--- a/src/station.c
+++ b/src/station.c
@@ -1378,9 +1378,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;
+			}
 		}
 	}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-10 14:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 16:57 [PATCH v3 1/4] station: check return of handshake_state_set_pmksa James Prestwood
2026-03-09 16:57 ` [PATCH v3 2/4] auto-t: refactor testSAE-roam into connect/roam functions James Prestwood
2026-03-09 16:57 ` [PATCH v3 3/4] auto-t: Add test to roam back to BSS with existing PMKSA James Prestwood
2026-03-09 16:57 ` [PATCH v3 4/4] handshake: clear expiration of pmksa in _steal_pmksa() James Prestwood
2026-03-10 14:33 ` [PATCH v3 1/4] station: check return of handshake_state_set_pmksa Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox