]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PASN: Copy PMK to PASN context on responder
authorVinay Gannevaram <quic_vganneva@quicinc.com>
Tue, 26 Sep 2023 14:47:43 +0000 (20:17 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 28 Sep 2023 15:43:56 +0000 (18:43 +0300)
Wi-Fi Aware pairing responder needs to forward the derive PMK to the
framework on successful pairing setup. The framework will set
corresponding PMK while a pairing verification is initiated by the
paired peer. Since the PMK is not updated for responder's PASN context,
framework does not have a valid PMK and verification fails. Hence copy
the derived PMK to PASN context.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/pasn/pasn_responder.c

index 78a9dd7da8a9c389340fec8919d320bf224b7fa7..47be403245e170e8305ce8e365b6a5162b7ee526 100644 (file)
@@ -335,6 +335,8 @@ pasn_derive_keys(struct pasn_data *pasn,
                }
        }
 
+       pasn->pmk_len = pmk_len;
+       os_memcpy(pasn->pmk, pmk, pmk_len);
        ret = pasn_pmk_to_ptk(pmk, pmk_len, peer_addr, own_addr,
                              wpabuf_head(secret), wpabuf_len(secret),
                              &pasn->ptk, pasn->akmp,