* [PATCH] staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc_resp_info()
@ 2018-04-12 8:21 Ajay Singh
2018-04-23 14:42 ` Claudiu Beznea
0 siblings, 1 reply; 2+ messages in thread
From: Ajay Singh @ 2018-04-12 8:21 UTC (permalink / raw)
To: linux-wireless
Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
claudiu.beznea, adham.abozaeid, Ajay Singh
Commit fe014d4e6b55 (staging: wilc1000: free memory allocated for general info
message from firmware) introduced a 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)
Signed-off-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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc_resp_info()
2018-04-12 8:21 [PATCH] staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc_resp_info() Ajay Singh
@ 2018-04-23 14:42 ` Claudiu Beznea
0 siblings, 0 replies; 2+ messages in thread
From: Claudiu Beznea @ 2018-04-23 14:42 UTC (permalink / raw)
To: Ajay Singh, linux-wireless
Cc: devel, gregkh, ganesh.krishna, venkateswara.kaja, aditya.shankar,
adham.abozaeid
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
On 12.04.2018 10:21, Ajay Singh wrote:
> Commit fe014d4e6b55 (staging: wilc1000: free memory allocated for general info
> message from firmware) introduced a 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)
> Signed-off-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)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-23 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-12 8:21 [PATCH] staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc_resp_info() Ajay Singh
2018-04-23 14:42 ` Claudiu Beznea
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.