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]
Message-ID: <CALs4sv3xJXJvWwcGk8N_s1mW9Y7GpEz6Bqv-DJO_q7hPi2yTLA@mail.gmail.com>
Date:   Mon, 28 Nov 2022 19:15:39 +0530
From:   Pavan Chebbi <pavan.chebbi@...adcom.com>
To:     Dan Carpenter <error27@...il.com>
Cc:     Jay Vosburgh <j.vosburgh@...il.com>,
        Jonathan Toppins <jtoppins@...hat.com>,
        Veaceslav Falico <vfalico@...il.com>,
        Andy Gospodarek <andy@...yhouse.net>,
        "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,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net-next v2] bonding: uninitialized variable in bond_miimon_inspect()

On Mon, Nov 28, 2022 at 4:36 PM Dan Carpenter <error27@...il.com> wrote:
>
> The "ignore_updelay" variable needs to be initialized to false.
>
> Fixes: f8a65ab2f3ff ("bonding: fix link recovery in mode 2 when updelay is nonzero")
> Signed-off-by: Dan Carpenter <error27@...il.com>
> ---
> v2: Re-order so the declarations are in reverse Christmas tree order
>
Thanks,
Reviewed-by: Pavan Chebbi <pavan.chebbi@...adcom.com>

> Don't forget about:
> drivers/net/bonding/bond_main.c:5071 bond_update_slave_arr() warn: missing error code here? 'bond_3ad_get_active_agg_info()' failed. 'ret' = '0'
>

I think that warning can be ignored, as bond_update_slave_arr() does
consider the return value of bond_3ad_get_active_agg_info() but
chooses to not bubble it up. Though the author of the function is the
best person to answer it, at this point, it looks OK to me. Maybe a
separate patch to address it would help to get the attention of the
author.

>  drivers/net/bonding/bond_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index c87481033995..e01bb0412f1c 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -2524,10 +2524,10 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in
>  /* called with rcu_read_lock() */
>  static int bond_miimon_inspect(struct bonding *bond)
>  {
> +       bool ignore_updelay = false;
>         int link_state, commit = 0;
>         struct list_head *iter;
>         struct slave *slave;
> -       bool ignore_updelay;
>
>         if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP) {
>                 ignore_updelay = !rcu_dereference(bond->curr_active_slave);
> --
> 2.35.1
>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ