diff options
author | Andy Green <andy@warmcat.com> | 2007-10-09 22:46:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-02 08:44:12 -0700 |
commit | 774b4c5215a40f8971ca71470f3832e0ed53a41f (patch) | |
tree | 504c76e94245e2b94f221d29d9898d6a66f9bfa9 /net | |
parent | 8c7537c719348c8bed52f08b2d6e9a8795165290 (diff) | |
download | lwn-774b4c5215a40f8971ca71470f3832e0ed53a41f.tar.gz lwn-774b4c5215a40f8971ca71470f3832e0ed53a41f.zip |
Add get_unaligned to ieee80211_get_radiotap_len
patch dfe6e81deaa79c85086c0cc8d85b229e444ab97f in mainline.
ieee80211_get_radiotap_len() tries to dereference radiotap length without
taking care that it is completely unaligned and get_unaligned()
is required.
Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ieee80211.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 42725e1cf7d3..b9f25070c6be 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c @@ -24,6 +24,7 @@ #include <linux/compiler.h> #include <linux/bitmap.h> #include <net/cfg80211.h> +#include <asm/unaligned.h> #include "ieee80211_common.h" #include "ieee80211_i.h" @@ -338,7 +339,7 @@ static int ieee80211_get_radiotap_len(struct sk_buff *skb) struct ieee80211_radiotap_header *hdr = (struct ieee80211_radiotap_header *) skb->data; - return le16_to_cpu(hdr->it_len); + return le16_to_cpu(get_unaligned(&hdr->it_len)); } #ifdef CONFIG_MAC80211_LOWTX_FRAME_DUMP |