nl80211: Exclude PMK when sending NL80211_CMD_DEL_PMKSA explicitly
Add a check in nl80211 driver layer to not include PMK while sending NL80211_CMD_DEL_PMKSA explicitly. Though it is taken care already in supplicant layer by setting the pmk_len to zero, it would be good to have a check in nl80211 layer in order to avoid future accidental inclusions of keying material in commands that do not need them. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
ba6ce9c657
commit
c6ec9759c5
1 changed files with 2 additions and 1 deletions
|
@ -7927,7 +7927,8 @@ static int nl80211_pmkid(struct i802_bss *bss, int cmd,
|
||||||
(params->fils_cache_id &&
|
(params->fils_cache_id &&
|
||||||
nla_put(msg, NL80211_ATTR_FILS_CACHE_ID, 2,
|
nla_put(msg, NL80211_ATTR_FILS_CACHE_ID, 2,
|
||||||
params->fils_cache_id)) ||
|
params->fils_cache_id)) ||
|
||||||
(params->pmk_len && params->pmk_len <= PMK_MAX_LEN &&
|
(cmd != NL80211_CMD_DEL_PMKSA &&
|
||||||
|
params->pmk_len && params->pmk_len <= PMK_MAX_LEN &&
|
||||||
nla_put(msg, NL80211_ATTR_PMK, params->pmk_len, params->pmk))) {
|
nla_put(msg, NL80211_ATTR_PMK, params->pmk_len, params->pmk))) {
|
||||||
nl80211_nlmsg_clear(msg);
|
nl80211_nlmsg_clear(msg);
|
||||||
nlmsg_free(msg);
|
nlmsg_free(msg);
|
||||||
|
|
Loading…
Reference in a new issue