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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 9 May 2016 22:01:17 +0200
From:	Pablo Neira Ayuso <pablo@...filter.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Patrick McHardy <kaber@...sh.net>,
	Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
	"David S. Miller" <davem@...emloft.net>,
	Florian Westphal <fw@...len.de>,
	Daniel Borkmann <daniel@...earbox.net>,
	Sasha Levin <sasha.levin@...cle.com>,
	netfilter-devel@...r.kernel.org, coreteam@...filter.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfilter: conntrack: remove uninitialized shadow
 variable

On Mon, May 09, 2016 at 09:47:23PM +0200, Arnd Bergmann wrote:
> A recent commit introduced an unconditional use of an uninitialized
> variable, as reported in this gcc warning:
> 
> net/netfilter/nf_conntrack_core.c: In function '__nf_conntrack_confirm':
> net/netfilter/nf_conntrack_core.c:632:33: error: 'ctinfo' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>    bytes = atomic64_read(&counter[CTINFO2DIR(ctinfo)].bytes);
>                                  ^
> net/netfilter/nf_conntrack_core.c:628:26: note: 'ctinfo' was declared here
>    enum ip_conntrack_info ctinfo;
> 
> The problem is that a local variable shadows the function parameter.
> This removes the local variable, which looks like what Pablo originally
> intended.

Acked-by: Pablo Neira Ayuso <pablo@...filter.org>

Sorry for this, I wonder why gcc didn't catch up this here.

@David, you can integrate this into your net-next tree.

Thanks for fixing up this Arnd.

Powered by blists - more mailing lists