diff options
author | Eliad Peller <eliad@wizery.com> | 2015-04-14 04:36:23 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-05-21 15:36:46 -0400 |
commit | 292208914d8ca5a41cf68c2f1d2810a2ea2044e9 (patch) | |
tree | d62a919a34a487fa40473389078f7d8a1266214d | |
parent | a500e469ead055f35c7b2d0a1104e1bd58e34e70 (diff) |
iwlwifi: mvm: avoid use-after-free on iwl_mvm_d0i3_enable_tx()
qos_seq points (to a struct) inside the command response data.
Make sure to free the response only after qos_seq is not
needed anymore.
Reported-by: Heng Luo <heng.luo@intel.com>
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/ops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c index 1c66297d82c0..2ea01238754e 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c | |||
@@ -1263,11 +1263,13 @@ static void iwl_mvm_d0i3_exit_work(struct work_struct *wk) | |||
1263 | ieee80211_iterate_active_interfaces( | 1263 | ieee80211_iterate_active_interfaces( |
1264 | mvm->hw, IEEE80211_IFACE_ITER_NORMAL, | 1264 | mvm->hw, IEEE80211_IFACE_ITER_NORMAL, |
1265 | iwl_mvm_d0i3_disconnect_iter, mvm); | 1265 | iwl_mvm_d0i3_disconnect_iter, mvm); |
1266 | |||
1267 | iwl_free_resp(&get_status_cmd); | ||
1268 | out: | 1266 | out: |
1269 | iwl_mvm_d0i3_enable_tx(mvm, qos_seq); | 1267 | iwl_mvm_d0i3_enable_tx(mvm, qos_seq); |
1270 | 1268 | ||
1269 | /* qos_seq might point inside resp_pkt, so free it only now */ | ||
1270 | if (get_status_cmd.resp_pkt) | ||
1271 | iwl_free_resp(&get_status_cmd); | ||
1272 | |||
1271 | /* the FW might have updated the regdomain */ | 1273 | /* the FW might have updated the regdomain */ |
1272 | iwl_mvm_update_changed_regdom(mvm); | 1274 | iwl_mvm_update_changed_regdom(mvm); |
1273 | 1275 | ||