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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87o830y3j6.fsf@kernel.org>
Date:   Mon, 21 Feb 2022 11:25:49 +0200
From:   Kalle Valo <kvalo@...nel.org>
To:     Souptick Joarder <jrdr.linux@...il.com>
Cc:     loic.poulain@...aro.org, davem@...emloft.net, kuba@...nel.org,
        nathan@...nel.org, ndesaulniers@...gle.com,
        ryan.odonoghue@...aro.org, wcn36xx@...ts.infradead.org,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] wcn36xx: Initialize channel to NULL inside wcn36xx_change_opchannel()

Souptick Joarder <jrdr.linux@...il.com> writes:

> From: "Souptick Joarder (HPE)" <jrdr.linux@...il.com>
>
> Kernel test robot reported below warning ->
> drivers/net/wireless/ath/wcn36xx/main.c:409:7: warning: Branch
> condition evaluates to a garbage value
> [clang-analyzer-core.uninitialized.Branch]
>
> Also code walk indicates, if channel is not found in first band,
> it will break the loop and instead of exit it will go ahead and
> assign a garbage value in wcn->channel which looks like a bug.
>
> Initialize channel with NULL should avoid this issue.
>
> Fixes: 	d6f2746691cb ("wcn36xx: Track the band and channel we are tuned to")
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Souptick Joarder (HPE) <jrdr.linux@...il.com>
> ---
>  drivers/net/wireless/ath/wcn36xx/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index 75661d449712..1a06eff07107 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -394,7 +394,7 @@ static void wcn36xx_change_opchannel(struct wcn36xx *wcn, int ch)
>  	struct ieee80211_vif *vif = NULL;
>  	struct wcn36xx_vif *tmp;
>  	struct ieee80211_supported_band *band;
> -	struct ieee80211_channel *channel;
> +	struct ieee80211_channel *channel = NULL;
>  	unsigned long flags;
>  	int i, j;

I have already applied an identical patch from Dan:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath-next&id=11e41e2929378df945bf50b95409d93059ad4507

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ