diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-03-04 05:43:28 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-03-19 16:29:52 -0400 |
commit | d2722f8b87fb172ff2f31d3a2816b31d58678d40 (patch) | |
tree | 6944ac9cc71ffe7de37fa252b32c954810894418 /net/mac80211/mlme.c | |
parent | 255e25b0e5d4bd035d82f53011df619d8cc0bedb (diff) |
mac80211: fix potential use-after-free
The bss struct might be freed in ieee80211_rx_bss_put(),
so we shouldn't use it afterwards.
Cc: stable@vger.kernel.org (3.10+)
Fixes: 817cee7675237 ("mac80211: track AP's beacon rate and give it to the driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 46b62bb3677c..423816f18b55 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2780,8 +2780,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
2780 | bss = ieee80211_bss_info_update(local, rx_status, mgmt, len, elems, | 2780 | bss = ieee80211_bss_info_update(local, rx_status, mgmt, len, elems, |
2781 | channel); | 2781 | channel); |
2782 | if (bss) { | 2782 | if (bss) { |
2783 | ieee80211_rx_bss_put(local, bss); | ||
2784 | sdata->vif.bss_conf.beacon_rate = bss->beacon_rate; | 2783 | sdata->vif.bss_conf.beacon_rate = bss->beacon_rate; |
2784 | ieee80211_rx_bss_put(local, bss); | ||
2785 | } | 2785 | } |
2786 | } | 2786 | } |
2787 | 2787 | ||