3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2026-03-12 10:27:55 +01:00

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.
This commit is contained in:
James Prestwood 2026-03-09 09:57:43 -07:00 committed by Denis Kenzior
parent 4deea73977
commit 9df8d16f6d

View File

@ -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;
}
}
}