From: Jouni Malinen Date: Mon, 11 May 2009 18:57:55 +0000 (+0300) Subject: nl80211: Validate MFP flag type when parsing STA flags X-Git-Tag: firefly_0821_release~13604^2~464^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0e46724a48fcc3bac1fecea413d20af64a75844f;p=firefly-linux-kernel-4.4.55.git nl80211: Validate MFP flag type when parsing STA flags NL80211_STA_FLAG_MFP was forgotten from sta_flags_policy. The previous version added the flag due to the loop used in parse_station_flags, but the proper behavior would be to allow nla_parse_nested() to go through the policy for all flags. Signed-off-by: Jouni Malinen Signed-off-by: John W. Linville --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f88dbbec7521..2353ddbf4934 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -1331,6 +1331,7 @@ static const struct nla_policy sta_flags_policy[NL80211_STA_FLAG_MAX + 1] = { [NL80211_STA_FLAG_AUTHORIZED] = { .type = NLA_FLAG }, [NL80211_STA_FLAG_SHORT_PREAMBLE] = { .type = NLA_FLAG }, [NL80211_STA_FLAG_WME] = { .type = NLA_FLAG }, + [NL80211_STA_FLAG_MFP] = { .type = NLA_FLAG }, }; static int parse_station_flags(struct nlattr *nla, u32 *staflags)