Changeset 41803


Ignore:
Timestamp:
2014-07-22T21:06:14+02:00 (4 years ago)
Author:
nbd
Message:

mac80211: fix a null pointer deref when querying station info when rate control is not initialized (#17061)

Signed-off-by: Felix Fietkau <nbd@…>

Backport of r41801

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/attitude_adjustment/package/mac80211/patches/300-pending_work.patch

    r41802 r41803  
     1commit 38695a6e5a940e6a524523b88a33916b016fb2a1 
     2Author: Felix Fietkau <nbd@openwrt.org> 
     3Date:   Fri Jul 11 12:06:18 2014 +0200 
     4 
     5    mac80211: fix crash on getting sta info with uninitialized rate control 
     6     
     7    If the expected throughput is queried before rate control has been 
     8    initialized, the minstrel op for it will crash while trying to access 
     9    the rate table. 
     10    Check for WLAN_STA_RATE_CONTROL before attempting to use the rate 
     11    control op. 
     12     
     13    Reported-by: Jean-Pierre Tosoni <jp.tosoni@acksys.fr> 
     14    Signed-off-by: Felix Fietkau <nbd@openwrt.org> 
     15 
    116commit c0ee7fa4c0da824ccccc172bf175fb1f86540921 
    217Author: Felix Fietkau <nbd@openwrt.org> 
     
    661676 EXPORT_SYMBOL(ieee80211_sta_block_awake); 
    662677  
    663 @@ -1703,3 +1723,137 @@ u8 sta_info_tx_streams(struct sta_info * 
     678@@ -1703,3 +1723,140 @@ u8 sta_info_tx_streams(struct sta_info * 
    664679        return ((ht_cap->mcs.tx_params & IEEE80211_HT_MCS_TX_MAX_STREAMS_MASK) 
    665680                        >> IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT) + 1; 
     
    670685+       struct ieee80211_sub_if_data *sdata = sta->sdata; 
    671686+       struct ieee80211_local *local = sdata->local; 
    672 +       struct rate_control_ref *ref = local->rate_ctrl; 
     687+       struct rate_control_ref *ref = NULL; 
    673688+       struct timespec uptime; 
    674689+       u64 packets = 0; 
    675690+       u32 thr = 0; 
    676691+       int i, ac; 
     692+ 
     693+       if (test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) 
     694+               ref = local->rate_ctrl; 
    677695+ 
    678696+       sinfo->generation = sdata->local->sta_generation; 
Note: See TracChangeset for help on using the changeset viewer.