summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-28 22:29:52 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-05 11:15:44 -0700
commit735091bf209c26130d1380582d34990eb8af16ef (patch)
treeab2539a17d5618096f1f48c127c06fdf49168782 /net
parente08018b10218825052b02c0d65cf9b5dd229f5df (diff)
downloadkernel-crypto-735091bf209c26130d1380582d34990eb8af16ef.tar.gz
kernel-crypto-735091bf209c26130d1380582d34990eb8af16ef.tar.xz
kernel-crypto-735091bf209c26130d1380582d34990eb8af16ef.zip
mac80211: Fix robust management frame handling (MFP)
commit d211e90e28a074447584729018a39910d691d1a8 upstream. Commit e34e09401ee9888dd662b2fca5d607794a56daf2 incorrectly removed use of ieee80211_has_protected() from the management frame case and in practice, made this validation drop all Action frames when MFP is enabled. This should have only been done for frames with Protected field set to zero. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/rx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index edfa036fc16..48d8fdfbec8 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1399,7 +1399,8 @@ ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
(rx->key || rx->sdata->drop_unencrypted)))
return -EACCES;
if (rx->sta && test_sta_flags(rx->sta, WLAN_STA_MFP)) {
- if (unlikely(ieee80211_is_unicast_robust_mgmt_frame(rx->skb) &&
+ if (unlikely(!ieee80211_has_protected(fc) &&
+ ieee80211_is_unicast_robust_mgmt_frame(rx->skb) &&
rx->key))
return -EACCES;
/* BIP does not use Protected field, so need to check MMIE */