lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 21 Dec 2020 20:15:22 +0200
From:   Kalle Valo <kvalo@...eaurora.org>
To:     Zekun Shen <bruceshenzk@...il.com>
Cc:     netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
        linux-kernel@...r.kernel.org, ath10k@...ts.infradead.org,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] net: ath10k: santity check for ep connectivity

Zekun Shen <bruceshenzk@...il.com> writes:

> Function ep_rx_complete is being called without NULL checking
> in ath10k_htc_rx_completion_handler. Without such check, mal-
> formed packet is able to cause jump to NULL.
>
> ep->service_id seems a good candidate for sanity check as it is
> used in usb.c.
>
> Signed-off-by: Zekun Shen <bruceshenzk@...il.com>
> ---
>  drivers/net/wireless/ath/ath10k/htc.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
> index 31df6dd04..e00794d97 100644
> --- a/drivers/net/wireless/ath/ath10k/htc.c
> +++ b/drivers/net/wireless/ath/ath10k/htc.c
> @@ -450,6 +450,11 @@ void ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
>  
>  	ep = &htc->endpoint[eid];
>  
> +	if (ep->service_id == 0) {
> +		ath10k_warn(ar, "HTC Rx: ep %d is not connect\n", eid);
> +		goto out;
> +	}

I think using ATH10K_HTC_SVC_ID_UNUSED is more descriptive than zero, as
ath10k_htc_reset_endpoint_states() uses it. I fixed in the pending
branch.

I think also ath10k_htc_process_credit_report() might have a similar
problem, can you take a look?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists