mac80211: verify that skb data is present
authorJohannes Berg <johannes.berg@intel.com>
Thu, 25 Oct 2012 22:36:40 +0000 (00:36 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 16 Nov 2012 16:46:58 +0000 (16:46 +0000)
commitb0f5b374eadb79d66dedd9cec7b0f4e7bb6f70c4
treea1aa05b5bfe956672710e95eb333d686f12d75f6
parentc63cddefa8d6360353ba0e60f42b6c82f1c11b3c
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: Ben Hutchings <ben@decadent.org.uk>
include/net/cfg80211.h
net/mac80211/rx.c
net/wireless/util.c