diff options
author | Rajkumar Manoharan <rmanohar@qti.qualcomm.com> | 2017-05-14 21:41:55 -0700 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-09-15 18:29:42 +0100 |
commit | 2204ce849e00dd7bddd99eca47e72b6daba16369 (patch) | |
tree | 7f6ee4963eaf2cff0cf1d656817381c5a765b69b /net/mac80211 | |
parent | f6021896f0331b0e51878ed5064ce5fb250c0e77 (diff) | |
download | linux-stable-2204ce849e00dd7bddd99eca47e72b6daba16369.tar.gz linux-stable-2204ce849e00dd7bddd99eca47e72b6daba16369.tar.bz2 linux-stable-2204ce849e00dd7bddd99eca47e72b6daba16369.zip |
mac80211: strictly check mesh address extension mode
commit 5667c86acf021e6dcf02584408b4484a273ac68f upstream.
Mesh forwarding path checks for address extension mode to fetch
appropriate proxied address and MPP address. Existing condition
that looks for 6 address format is not strict enough so that
frames with improper values are processed and invalid entries
are added into MPP table. Fix that by adding a stricter check before
processing the packet.
Per IEEE Std 802.11s-2011 spec. Table 7-6g1 lists address extension
mode 0x3 as reserved one. And also Table Table 9-13 does not specify
0x3 as valid address field.
Fixes: 9b395bc3be1c ("mac80211: verify that skb data is present")
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[bwh: Backported to 3.16: add mesh_flags variable in ieee80211_data_to_8023(),
added separately upstream]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/rx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index b1d0d22fb2a4..762b783ea66d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2108,7 +2108,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) if (is_multicast_ether_addr(hdr->addr1)) { mpp_addr = hdr->addr3; proxied_addr = mesh_hdr->eaddr1; - } else if (mesh_hdr->flags & MESH_FLAGS_AE_A5_A6) { + } else if ((mesh_hdr->flags & MESH_FLAGS_AE) == + MESH_FLAGS_AE_A5_A6) { /* has_a4 already checked in ieee80211_rx_mesh_check */ mpp_addr = hdr->addr4; proxied_addr = mesh_hdr->eaddr2; |