diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-10-26 00:36:40 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-17 13:16:11 -0800 |
commit | 4435990b6d456a8c5cac203c025d1f10e0b48a93 (patch) | |
tree | 69364585dbc2eca1b9d073544416e515417c16f4 /net/wireless | |
parent | 537d86c490a03bcb56dfa24c0327c18e61b1ced5 (diff) |
mac80211: verify that skb data is present
commit 9b395bc3be1cebf0144a127c7e67d56dbdac0930 upstream.
A number of places in the mesh code don't check that
the frame data is present and in the skb header when
trying to access. Add those checks and the necessary
pskb_may_pull() calls. This prevents accessing data
that doesn't actually exist.
To do this, export ieee80211_get_mesh_hdrlen() to be
able to use it in mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index d39a6c239c2..d22dce7b8b8 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -290,7 +290,7 @@ unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb) } EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb); -static int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr) +unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr) { int ae = meshhdr->flags & MESH_FLAGS_AE; /* 802.11-2012, 8.2.4.7.3 */ @@ -304,6 +304,7 @@ static int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr) return 18; } } +EXPORT_SYMBOL(ieee80211_get_mesh_hdrlen); int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, enum nl80211_iftype iftype) |