mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
brcmfmac: reject too long PSK
nl80211 already allows specifying 48 bytes, but brcmfmac only supports 32. Reject keys that are too long. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
2d6edad4b2
commit
64d1519edc
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user