From: Luca Coelho <luca@coelho.fi>
To: Jia-Ju Bai <baijiaju1990@gmail.com>,
johannes.berg@intel.com, emmanuel.grumbach@intel.com,
linuxwifi@intel.com, kvalo@codeaurora.org, davem@davemloft.net
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: wireless: iwlwifi: Fix double-free problems in iwl_req_fw_callback()
Date: Tue, 14 May 2019 08:33:47 +0300 [thread overview]
Message-ID: <befa7d4791e2031ca86cd2e0d4721d166b0f38db.camel@coelho.fi> (raw)
In-Reply-To: <20190504093305.19360-1-baijiaju1990@gmail.com>
On Sat, 2019-05-04 at 17:33 +0800, Jia-Ju Bai wrote:
> 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>
> ---
> drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
> b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
> index 689a65b11cc3..4fd1737d768b 100644
> --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
> @@ -1579,7 +1579,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);
Thanks! Applied to our internal tree and will reach the mainline
following our normal upstreaming process.
--
Cheers,
Luca.
prev parent reply other threads:[~2019-05-14 5:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 9:33 [PATCH] net: wireless: iwlwifi: Fix double-free problems in iwl_req_fw_callback() Jia-Ju Bai
2019-05-14 5:33 ` Luca Coelho [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=befa7d4791e2031ca86cd2e0d4721d166b0f38db.camel@coelho.fi \
--to=luca@coelho.fi \
--cc=baijiaju1990@gmail.com \
--cc=davem@davemloft.net \
--cc=emmanuel.grumbach@intel.com \
--cc=johannes.berg@intel.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxwifi@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox