[patch 03/23] Add get_unaligned to ieee80211_get_radiotap_len

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <stable@...>
Cc: Justin Forbes <jmforbes@...>, Zwane Mwaikambo <zwane@...>, Theodore Ts'o <tytso@...>, Randy Dunlap <rdunlap@...>, Dave Jones <davej@...>, Chuck Wolber <chuckw@...>, Chris Wedgwood <reviews@...>, Michael Krufky <mkrufky@...>, Chuck Ebbert <cebbert@...>, Domenico Andreoli <cavokz@...>, <torvalds@...>, <akpm@...>, <alan@...>, warmcat <andy@...>, John W. Linville <linville@...>
Date: Thursday, November 15, 2007 - 2:20 am

-stable review patch.  If anyone has any objections, please let us know.

------------------


From: Andy Green <andy@warmcat.com>

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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -350,7 +350,7 @@ static int ieee80211_get_radiotap_len(st
 	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

-- 
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 17/23] ieee80211: fix TKIP QoS bug, Greg KH, (Thu Nov 15, 2:20 am)
[patch 15/23] Fix netlink timeouts., Greg KH, (Thu Nov 15, 2:20 am)
[patch 12/23] Fix VLAN address syncing., Greg KH, (Thu Nov 15, 2:20 am)
[patch 10/23] Fix TEQL oops., Greg KH, (Thu Nov 15, 2:20 am)
[patch 05/23] Fix 9P protocol build, Greg KH, (Thu Nov 15, 2:20 am)
Re: [patch 06/23] Fix SKB_WITH_OVERHEAD calculations., David Miller, (Thu Nov 15, 3:00 am)
[patch 03/23] Add get_unaligned to ieee80211_get_radiotap_len, Greg KH, (Thu Nov 15, 2:20 am)