]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Add get_unaligned to ieee80211_get_radiotap_len
authorAndy Green <andy@warmcat.com>
Wed, 10 Oct 2007 02:46:33 +0000 (22:46 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Nov 2007 16:27:36 +0000 (08:27 -0800)
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>
net/mac80211/ieee80211.c

index 0c6c3c3b94af508e1c9a651b797a4ad207fb0ddf..9e0da6e8c443cf6b20a68e926251e6bc0197a6bc 100644 (file)
@@ -350,7 +350,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