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: <20240829180205.GA22521@breakpoint.cc>
Date: Thu, 29 Aug 2024 20:02:05 +0200
From: Florian Westphal <fw@...len.de>
To: Florian Westphal <fw@...len.de>
Cc: Nathan Chancellor <nathan@...nel.org>,
	Steffen Klassert <steffen.klassert@...unet.com>,
	Herbert Xu <herbert@...dor.apana.org.au>, netdev@...r.kernel.org,
	llvm@...ts.linux.dev, patches@...ts.linux.dev
Subject: Re: [PATCH] xfrm: policy: Restore dir assignment in
 xfrm_hash_rebuild()

Florian Westphal <fw@...len.de> wrote:
> Nathan Chancellor <nathan@...nel.org> wrote:
> > Clang warns (or errors with CONFIG_WERROR):
> > 
> >   net/xfrm/xfrm_policy.c:1286:8: error: variable 'dir' is uninitialized when used here [-Werror,-Wuninitialized]
> >    1286 |                 if ((dir & XFRM_POLICY_MASK) == XFRM_POLICY_OUT) {
> >         |                      ^~~
> >   net/xfrm/xfrm_policy.c:1257:9: note: initialize the variable 'dir' to silence this warning
> >    1257 |         int dir;
> >         |                ^
> >         |                 = 0
> >   1 error generated.
> 
> Ugh, my bad.
> 
> Acked-by: Florian Westphal <fw@...len.de>

Actually, this fix is incomplete, the assignment needs to be
restored in the second loop as well:

1340                 chain = policy_hash_bysel(net, &policy->selector,
1341                                           policy->family, dir);
							       ~~~

Nathan, Steffen, I'll leave it up to you to either do a v2 or a revert.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ