]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.19.4/mac80211-drop-unencrypted-frames-in-mesh-fwding.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.19.4 / mac80211-drop-unencrypted-frames-in-mesh-fwding.patch
CommitLineData
35e5a9d9
GKH
1From d0c22119f574b851e63360c6b8660fe9593bbc3c Mon Sep 17 00:00:00 2001
2From: Bob Copeland <me@bobcopeland.com>
3Date: Mon, 2 Mar 2015 14:28:52 -0500
4Subject: mac80211: drop unencrypted frames in mesh fwding
5
6From: Bob Copeland <me@bobcopeland.com>
7
8commit d0c22119f574b851e63360c6b8660fe9593bbc3c upstream.
9
10The mesh forwarding path was not checking that data
11frames were protected when running an encrypted network;
12add the necessary check.
13
14Reported-by: Johannes Berg <johannes@sipsolutions.net>
15Signed-off-by: Bob Copeland <me@bobcopeland.com>
16Signed-off-by: Johannes Berg <johannes.berg@intel.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19---
20 net/mac80211/rx.c | 3 +++
21 1 file changed, 3 insertions(+)
22
23--- a/net/mac80211/rx.c
24+++ b/net/mac80211/rx.c
25@@ -2191,6 +2191,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
26 hdr = (struct ieee80211_hdr *) skb->data;
27 mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
28
29+ if (ieee80211_drop_unencrypted(rx, hdr->frame_control))
30+ return RX_DROP_MONITOR;
31+
32 /* frame is in RMC, don't forward */
33 if (ieee80211_is_data(hdr->frame_control) &&
34 is_multicast_ether_addr(hdr->addr1) &&