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: <657a050a-444d-2ad3-17fb-e855f5c54ea9@cumulusnetworks.com>
Date:   Thu, 1 Feb 2018 13:28:58 +0200
From:   Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        "David S . Miller" <davem@...emloft.net>,
        Stephen Hemminger <stephen@...workplumber.org>
Cc:     Arnd Bergmann <arnd@...db.de>, bridge@...ts.linux-foundation.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: bridge: Fix uninitialized error in
 br_fdb_sync_static()

On 01/02/18 12:25, Geert Uytterhoeven wrote:
> With gcc-4.1.2.:
> 
>     net/bridge/br_fdb.c: In function ‘br_fdb_sync_static’:
>     net/bridge/br_fdb.c:996: warning: ‘err’ may be used uninitialized in this function
> 
> Indeed, if the list is empty, err will be uninitialized, and will be
> propagated up as the function return value.
> 
> Fix this by preinitializing err to zero.
> 
> Fixes: eb7935830d00b9e0 ("net: bridge: use rhashtable for fdbs")
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---
>  net/bridge/br_fdb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
> index dc87fbc9a23b04e6..d9e69e4514beb20d 100644
> --- a/net/bridge/br_fdb.c
> +++ b/net/bridge/br_fdb.c
> @@ -993,7 +993,7 @@ int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
>  int br_fdb_sync_static(struct net_bridge *br, struct net_bridge_port *p)
>  {
>  	struct net_bridge_fdb_entry *f, *tmp;
> -	int err;
> +	int err = 0;
>  
>  	ASSERT_RTNL();
>  
> 

Thanks,
Acked-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ