diff options
author | Eliad Peller <eliad@wizery.com> | 2015-04-14 11:36:23 +0300 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-04-29 13:51:22 +0300 |
commit | e5629be7c9984c8427f36bc01c2c35fb4a21d26b (patch) | |
tree | a038dde32360e485872413a8b5279e4b878b3c3b /drivers/net | |
parent | 8423cdc31eb074e95c0722c395b6742a6854cc11 (diff) | |
download | op-kernel-dev-e5629be7c9984c8427f36bc01c2c35fb4a21d26b.zip op-kernel-dev-e5629be7c9984c8427f36bc01c2c35fb4a21d26b.tar.gz |
iwlwifi: mvm: avoid use-after-free on iwl_mvm_d0i3_enable_tx() [BUGFIX]
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.
type=bugfix
bug=not-tracked
fixes=I78c07110b59dcd389207bd2b168b0a2760839fe0
Change-Id: I619ce2c17e064dc98c7be9abc1e23175fdc8fb9a
Reported-by: Heng Luo <heng.luo@intel.com>
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-on: https://gerrit.rds.intel.com/r/55381
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Tested-by: IWL Jenkins
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net')
-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 1c66297..2ea0123 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) ieee80211_iterate_active_interfaces( mvm->hw, IEEE80211_IFACE_ITER_NORMAL, iwl_mvm_d0i3_disconnect_iter, mvm); - - iwl_free_resp(&get_status_cmd); out: iwl_mvm_d0i3_enable_tx(mvm, qos_seq); + /* qos_seq might point inside resp_pkt, so free it only now */ + if (get_status_cmd.resp_pkt) + iwl_free_resp(&get_status_cmd); + /* the FW might have updated the regdomain */ iwl_mvm_update_changed_regdom(mvm); |