linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mac80211: Drop protected data frames that have not been decrypted
@ 2010-02-14 23:37 Benoit Papillault
  2010-02-14 23:37 ` [PATCH 2/2] mac80211: Add HT IE to IBSS beacons and probe responses Benoit Papillault
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Benoit Papillault @ 2010-02-14 23:37 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Benoit Papillault

Fix for the following issue : a STA connected to a WPA2 AP was showing
frames from others STA in tcpdump on wlan0 (promiscuous mode). In fact,
those frames are not decrypted and appears as 802.3 junk. This patch
just drops any protected data frames that have not been decrypted.

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
---
 net/mac80211/rx.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c9755f3..22ae6ee 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1397,6 +1397,14 @@ ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
 		     ieee80211_is_data(fc) &&
 		     (rx->key || rx->sdata->drop_unencrypted)))
 		return -EACCES;
+	/*
+	 * Drop encrypted frames that have not been decrypted. This
+	 * happens for frames that are sent by an AP to another STA
+	 */
+	if (ieee80211_has_protected(fc) &&
+	    !(status->flag & RX_FLAG_DECRYPTED)) {
+		return -EACCES;
+	}
 	if (rx->sta && test_sta_flags(rx->sta, WLAN_STA_MFP)) {
 		if (unlikely(ieee80211_is_unicast_robust_mgmt_frame(rx->skb) &&
 			     rx->key))
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-02-16  9:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-14 23:37 [PATCH 1/2] mac80211: Drop protected data frames that have not been decrypted Benoit Papillault
2010-02-14 23:37 ` [PATCH 2/2] mac80211: Add HT IE to IBSS beacons and probe responses Benoit Papillault
2010-02-15  9:35   ` Johannes Berg
2010-02-15 22:32     ` Benoit PAPILLAULT
2010-02-16  7:17       ` Johannes Berg
2010-02-15  0:10 ` [PATCH 1/2] mac80211: Drop protected data frames that have not been decrypted Gábor Stefanik
2010-02-15  7:45   ` Benoit PAPILLAULT
2010-02-15  9:34     ` Johannes Berg
2010-02-15 22:36       ` Benoit PAPILLAULT
2010-02-16  7:18         ` Johannes Berg
2010-02-15  9:36 ` Johannes Berg
2010-02-16  9:58 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).