From: Ajay Singh <ajay.kathat@microchip.com>
To: <ajay.kathat@gmail.com>
Cc: Ajay Singh <ajay.kathat@microchip.com>, <stable@vger.kernel.org>
Subject: [PATCH 1/3] staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc_resp_info()
Date: Wed, 11 Apr 2018 15:08:40 +0530 [thread overview]
Message-ID: <1523439520-12965-1-git-send-email-ajay.kathat@microchip.com> (raw)
Commit fe014d4e6b55 (staging: wilc1000: free memory allocated for general info
message from firmware) introduced bug by using wrong source address in
kmemdup(). 'conn_info.req_ies' is used for source address in kempdup()
instead of 'hif_drv->usr_conn_req.ies'.
This commit fixes the NULL pointer dereference issue in
host_int_parse_assoc_resp_info() by using the correct source address in
kmemdup().
Fixes: fe014d4e6b55 (staging: wilc1000: free memory allocated for
general info message from firmware)
Cc: stable@vger.kernel.org
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Tested-by: Ajay Singh <ajay.kathat@microchip.com>
---
drivers/staging/wilc1000/host_interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 316d73c..302e3cb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1387,7 +1387,7 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif,
}
if (hif_drv->usr_conn_req.ies) {
- conn_info.req_ies = kmemdup(conn_info.req_ies,
+ conn_info.req_ies = kmemdup(hif_drv->usr_conn_req.ies,
hif_drv->usr_conn_req.ies_len,
GFP_KERNEL);
if (conn_info.req_ies)
--
2.7.4
next reply other threads:[~2018-04-11 9:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 9:38 Ajay Singh [this message]
2018-04-12 5:56 ` [PATCH 1/3] staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc_resp_info() Ajay Singh
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=1523439520-12965-1-git-send-email-ajay.kathat@microchip.com \
--to=ajay.kathat@microchip.com \
--cc=ajay.kathat@gmail.com \
--cc=stable@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