summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2019-05-29 16:39:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-14 08:11:06 +0200
commit8e115a07994004bd52d036d5c4b4f601637cebc3 (patch)
treee5f091787f9cd2a43a0d7039bda1be73ace5b717
parentd4c0f752c1d2c6383cc7582c19b2ed7159d45937 (diff)
iwlwifi: Fix double-free problems in iwl_req_fw_callback()
[ Upstream commit a8627176b0de7ba3f4524f641ddff4abf23ae4e4 ] In the error handling code of iwl_req_fw_callback(), iwl_dealloc_ucode() is called to free data. In iwl_drv_stop(), iwl_dealloc_ucode() is called again, which can cause double-free problems. To fix this bug, the call to iwl_dealloc_ucode() in iwl_req_fw_callback() is deleted. This bug is found by a runtime fuzzing tool named FIZZER written by us. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-drv.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index c0631255aee7..db6628d390a2 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1547,7 +1547,6 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
goto free;
out_free_fw:
- iwl_dealloc_ucode(drv);
release_firmware(ucode_raw);
out_unbind:
complete(&drv->request_firmware_complete);