]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mac80211_hwsim: fix race condition with sta/vif pointers
authorThomas Huehn <thomas@net.t-labs.tu-berlin.de>
Fri, 13 Jul 2012 18:52:24 +0000 (20:52 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 17 Jul 2012 09:42:08 +0000 (11:42 +0200)
info->control.sta and control.vif may only be dereferenced
during the drv_tx call otherwise could lead to use-after-free
bugs.

Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
[reword commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c

index 3f38d846b093abc130732ed7ab48c3450c72e343..826ac7bec73fad37ada97e85c3e1e07c473cd4bb 100644 (file)
@@ -1540,11 +1540,6 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
        /* now send back TX status */
        txi = IEEE80211_SKB_CB(skb);
 
-       if (txi->control.vif)
-               hwsim_check_magic(txi->control.vif);
-       if (txi->control.sta)
-               hwsim_check_sta_magic(txi->control.sta);
-
        ieee80211_tx_info_clear_status(txi);
 
        for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {