123456789101112131415161718192021222324252627 |
- From 64d1519edc959f5b8f86a66a51c40971c215e4ec Mon Sep 17 00:00:00 2001
- From: Johannes Berg <[email protected]>
- Date: Mon, 19 Feb 2018 13:30:45 +0100
- Subject: [PATCH] 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 <[email protected]>
- Acked-by: Arend van Spriel <[email protected]>
- Signed-off-by: Kalle Valo <[email protected]>
- ---
- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++
- 1 file changed, 3 insertions(+)
- --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
- +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
- @@ -5125,6 +5125,9 @@ static int brcmf_cfg80211_set_pmk(struct
- 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);
- }
-
|