diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-03-04 11:43:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-13 13:32:52 +0200 |
commit | 2c6d6302d8adb46db2157673b9ee1b7497d2968c (patch) | |
tree | f6d4e7602ea0e1c1bf78886771e4d25916dc5b17 | |
parent | e24b7822c7fea8d23d30baea8aabf96ec8522936 (diff) | |
download | lwn-2c6d6302d8adb46db2157673b9ee1b7497d2968c.tar.gz lwn-2c6d6302d8adb46db2157673b9ee1b7497d2968c.zip |
mac80211: fix potential use-after-free
commit d2722f8b87fb172ff2f31d3a2816b31d58678d40 upstream.
The bss struct might be freed in ieee80211_rx_bss_put(),
so we shouldn't use it afterwards.
Fixes: 817cee7675237 ("mac80211: track AP's beacon rate and give it to the driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 245dce969b31..8fdbac7f99f7 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2708,8 +2708,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, bss = ieee80211_bss_info_update(local, rx_status, mgmt, len, elems, channel); if (bss) { - ieee80211_rx_bss_put(local, bss); sdata->vif.bss_conf.beacon_rate = bss->beacon_rate; + ieee80211_rx_bss_put(local, bss); } } |