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] [day] [month] [year] [list]
Message-ID: <CACKFLim=eBejv94cx-fSGZLfntUmZbRe7VVh5NEcCh9KAODCBA@mail.gmail.com>
Date: Thu, 2 Oct 2025 14:00:34 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Alexandr Sapozhnkiov <alsp705@...il.com>
Cc: Pavan Chebbi <pavan.chebbi@...adcom.com>, Michael Chan <mchan@...adcom.com>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, 
	lvc-project@...uxtesting.org
Subject: Re: [PATCH] fix uninit value using in tg3_setup_fiber_mii_phy()

On Thu, Oct 2, 2025 at 2:12 AM Alexandr Sapozhnkiov <alsp705@...il.com> wrote:
>
> From: Alexandr Sapozhnikov <alsp705@...il.com>
>
> There is a way when we go to the goto fiber_setup_done label
> and the condition current_link_up && current_duplex == DUPLEX_FULL
> is met, then the tg3_setup_flow_control() function is executed with
> undefined values of local_adv and remote_adv.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Alexandr Sapozhnikov <alsp705@...il.com>
> ---
>  drivers/net/ethernet/broadcom/tg3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index 1589a49b876c..1fa61328c1b9 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -5802,7 +5802,7 @@ static int tg3_setup_fiber_mii_phy(struct tg3 *tp, bool force_reset)
>         u32 current_speed = SPEED_UNKNOWN;
>         u8 current_duplex = DUPLEX_UNKNOWN;
>         bool current_link_up = false;
> -       u32 local_adv, remote_adv, sgsr;
> +       u32 local_adv = 0, remote_adv = 0, sgsr;

Looks like we don't have local and remote advertisement information in
this SGMII mode, so setting them to 0 is correct.

Much further down in this function we set local_adv and remote_adv to
0 for GMII mode.  Could you remove those 2 lines now that they are no
longer needed?  Thanks.

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5469 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ