Skip to contentSkip to conversation

mac80211: fix basic rate bitmap calculation

PATCH New Johannes Berg 1 participant 1 message Apr 19, 2009 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: fix basic rate bitmap calculation

commit d61272cbb35fa1c08fe94898583d880256f2dbd3
Author: Tomas Winkler <[email protected]>
Date: Thu Oct 30 17:08:08 2008 +0200

mac80211: fix basic rates setting from association response

In previous code all the rates were marked as basic.

introduced a copy/paste error (see patch).

Unfortunately, this not just leads to wrong data being passed to the driver but is remotely exploitable for some hardware or driver combinations.

---
 net/mac80211/mlme.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/mlme.c +1 -1
@@ -1577,7 +1577,7 @@ static void ieee80211_rx_mgmt_assoc_resp
 
 	for (i = 0; i < elems.ext_supp_rates_len; i++) {
 		int rate = (elems.ext_supp_rates[i] & 0x7f) * 5;
-		bool is_basic = !!(elems.supp_rates[i] & 0x80);
+		bool is_basic = !!(elems.ext_supp_rates[i] & 0x80);
 
 		if (rate > 110)
 			have_higher_than_11mbit = true;