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: <0462f31646e5ff0cc8ad2f6dc0529ecc2ba71f02.camel@codeconstruct.com.au>
Date: Mon, 19 Feb 2024 17:48:40 +0800
From: Jeremy Kerr <jk@...econstruct.com.au>
To: Dan Carpenter <dan.carpenter@...aro.org>, oe-kbuild@...ts.linux.dev, 
	netdev@...r.kernel.org
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev, Matt Johnston
 <matt@...econstruct.com.au>, Eric Dumazet <edumazet@...gle.com>, Jakub
 Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman
 <horms@...nel.org>, David Howells <dhowells@...hat.com>, Alexander Lobakin
 <aleksander.lobakin@...el.com>, Liang Chen <liangchen.linux@...il.com>, 
 Johannes Berg <johannes.berg@...el.com>
Subject: Re: [PATCH net-next 06/11] net: mctp: provide a more specific tag
 allocation ioctl

Hi Dan,

> 28828bad95a357 Jeremy Kerr 2024-02-16 @389      if (!(ctl->local_addr != MCTP_ADDR_ANY ||
> 28828bad95a357 Jeremy Kerr 2024-02-16  390            ctl->local_addr != MCTP_ADDR_NULL))
> 28828bad95a357 Jeremy Kerr 2024-02-16  391              return -EINVAL;
> 
> Should be &&.  This function will always return -EINVAL.  I haven't
> looked at the context outside of this automatically generated email
> but it suggests a failure in our test process.

Nice catch, thanks.

The issue means it would *never* detect that (not ANY, not NULL) case,
rather than always returning -EINVAL; so my ioctl test passed, but we
wouldn't have caught the forwards-compatibility check.

Given the potential for confusion here, I'll go with the simpler:

	if (ctl->local_addr != MCTP_ADDR_ANY &&
	    ctl->local_addr != MCTP_ADDR_NULL)
		return -EINVAL;

Jakub: I will send a series v2 soon, including those kunit all-tests
changes.

Cheers,


Jeremy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ