]> git.ipfire.org Git - thirdparty/hostap.git/commit
nl80211: Allow up to 64-byte PMK in NL80211_CMD_SET_PMKSA
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>
Tue, 8 Nov 2022 13:11:41 +0000 (18:41 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 9 Nov 2022 11:21:46 +0000 (13:21 +0200)
commit15583802b9f12e27a0e9da09dec6cf12772a99d7
tree8c72d6ac4a25bf9c757ba954b66f15dc48522a1b
parent1e0b7379d68de9c1154d6601685f9bb63161c440
nl80211: Allow up to 64-byte PMK in NL80211_CMD_SET_PMKSA

Kernel commit 22e76844c566 - ("ieee80211: Increase PMK maximum length to
 64 bytes") increased the maximum allowed length for NL80211_ATTR_PMK to
64 bytes. Thus, allow sending 64 bytes PMK in NL80211_CMD_SET_PMKSA and
if NL80211_CMD_SET_PMKSA fails with ERANGE try NL80211_CMD_SET_PMKSA
again without PMK. Also, skip sending PMK when PMK length is greater
than 64 bytes.

This is needed for some newer cases like DPP with NIST P-521 and
SAE-EXT-KEY with group 21. The kernel change from 48 to 64 octets is
from February 2018, so the new limit should be available in most cases
that might want to use these new mechanisms. Maintain a backwards
compatible fallback option for now to cover some earlier needs for DPP.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
src/drivers/driver_nl80211.c