brcmfmac: reject too long PSK
PATCH 1/1 brcmfmac: reject too long PSK
From: Johannes Berg <[email protected]>
nl80211 already allows specifying 48 bytes, but brcmfmac only supports 32. Reject keys that are too long.
Signed-off-by Johannes Berg <[email protected]>
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +3 -0
@@ -5124,6 +5124,9 @@ static int brcmf_cfg80211_set_pmk(struct wiphy *wiphy, struct net_device *dev,if (WARN_ON (ifp->vif->profile.use_fwsup !=BRCMF_PROFILE_FWSUP_1X ))return -EINVAL ; +if (conf->pmk_len >BRCMF_WSEC_MAX_PSK_LEN ) +return -ERANGE ; +return brcmf_set_pmk (ifp, conf->pmk, conf->pmk_len); }
Signature · 1 line
2.15.1
Quoted 4 lines · Johannes Berg
From: Johannes Berg <[email protected]>
nl80211 already allows specifying 48 bytes, but brcmfmac only supports 32. Reject keys that are too long.
Hah. Recent discussion about the key length made you look ;-) Thanks!
Acked-by Arend van Spriel <[email protected]>
Quoted 20 lines
Signed-off-by Johannes Berg <[email protected]>--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++ 1 file changed, 3 insertions(+)drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +3
-0@@ -5124,6 +5124,9 @@ static int brcmf_cfg80211_set_pmk(struct wiphy *wiphy, struct net_device *dev,if (WARN_ON (ifp->vif->profile.use_fwsup !=BRCMF_PROFILE_FWSUP_1X ))return -EINVAL ; +if (conf->pmk_len >BRCMF_WSEC_MAX_PSK_LEN ) +return -ERANGE ; +return brcmf_set_pmk (ifp, conf->pmk, conf->pmk_len); }
Quoted 7 lines · Johannes Berg
From: Johannes Berg <[email protected]>
nl80211 already allows specifying 48 bytes, but brcmfmac only supports 32. Reject keys that are too long.
Signed-off-by Johannes Berg <[email protected]>Acked-by Arend van Spriel <[email protected]>
Patch applied to wireless-drivers-next.git, thanks.
64d1519edc95 brcmfmac: reject too long PSK
Signature · 3 lines
https://patchwork.kernel.org/patch/10227649/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches