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, 15 Feb 2021 09:58:41 -0600
From:   Larry Finger <Larry.Finger@...inger.net>
To:     Colin King <colin.king@...onical.com>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Rafał Miłecki <zajec5@...il.com>,
        "John W . Linville" <linville@...driver.com>,
        linux-wireless@...r.kernel.org, b43-dev@...ts.infradead.org,
        netdev@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] b43: N-PHY: Fix the update of coef for the PHY revision
 >= 3case

On 2/15/21 6:05 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The documentation for the PHY update [1] states:
> 
> Loop 4 times with index i
> 
>      If PHY Revision >= 3
>          Copy table[i] to coef[i]
>      Otherwise
>          Set coef[i] to 0
> 
> the copy of the table to coef is currently implemented the wrong way
> around, table is being updated from uninitialized values in coeff.
> Fix this by swapping the assignment around.
> 
> [1] https://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreCal/
> 
> Fixes: 2f258b74d13c ("b43: N-PHY: implement restoring general configuration")
> Addresses-Coverity: ("Uninitialized scalar variable")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>   drivers/net/wireless/broadcom/b43/phy_n.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c
> index b669dff24b6e..665b737fbb0d 100644
> --- a/drivers/net/wireless/broadcom/b43/phy_n.c
> +++ b/drivers/net/wireless/broadcom/b43/phy_n.c
> @@ -5311,7 +5311,7 @@ static void b43_nphy_restore_cal(struct b43_wldev *dev)
>   
>   	for (i = 0; i < 4; i++) {
>   		if (dev->phy.rev >= 3)
> -			table[i] = coef[i];
> +			coef[i] = table[i];
>   		else
>   			coef[i] = 0;
>   	}
> 

Acked-by: Larry Finger <Larry.Finger@...inger.net>

Good catch, thanks.

Larry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ