mac80211: verify that skb data is present
authorJohannes Berg <johannes.berg@intel.com>
Thu, 25 Oct 2012 22:36:40 +0000 (00:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Nov 2012 21:16:11 +0000 (13:16 -0800)
commit4435990b6d456a8c5cac203c025d1f10e0b48a93
tree69364585dbc2eca1b9d073544416e515417c16f4
parent537d86c490a03bcb56dfa24c0327c18e61b1ced5
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>
include/net/cfg80211.h
net/mac80211/rx.c
net/wireless/util.c