From: m1s5p6688@gmail.com
To: linux-wireless@vger.kernel.org
Cc: johannes.berg@intel.com, emmanuel.grumbach@intel.com,
luciano.coelho@intel.com, linuxwifi@intel.com
Subject: [PATCH] iwlwifi: fix possible potential NULL pointer dereference
Date: Thu, 2 Jan 2020 10:49:59 +0800 [thread overview]
Message-ID: <20200102024959.5199-1-m1s5p6688@gmail.com> (raw)
From: Qing Xu <m1s5p6688@gmail.com>
iwl_req_fw_callback() check the wrong kmemdup return value, leading
to a NULL pointer dereference.
Fix it by replacing the wrong value with the correct.
Signed-off-by: Qing Xu <m1s5p6688@gmail.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index 4096ccf58..68c9b7157 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1455,7 +1455,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
kmemdup(pieces->dbg_conf_tlv[i],
pieces->dbg_conf_tlv_len[i],
GFP_KERNEL);
- if (!pieces->dbg_conf_tlv_len[i])
+ if (!drv->fw.dbg.conf_tlv[i])
goto out_free_fw;
}
}
--
2.17.1
reply other threads:[~2020-01-02 2:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200102024959.5199-1-m1s5p6688@gmail.com \
--to=m1s5p6688@gmail.com \
--cc=emmanuel.grumbach@intel.com \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxwifi@intel.com \
--cc=luciano.coelho@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.