* Re: linux-4.4/net/sunrpc/auth_gss/gss_krb5_mech.c:296: Undefined Behaviour
[not found] <DUB128-W91EBE8E198A948D174CCC9CCF0@phx.gbl>
@ 2016-01-21 19:34 ` bfields
0 siblings, 0 replies; only message in thread
From: bfields @ 2016-01-21 19:34 UTC (permalink / raw)
To: David Binderman; +Cc: jlayton@poochiereds.net, linux-nfs@vger.kernel.org
On Sun, Jan 17, 2016 at 08:31:54PM +0000, David Binderman wrote:
> [linux-4.4/net/sunrpc/auth_gss/gss_krb5_mech.c:296]: (warning) Invalid test for overflow 'p+20<p'. Condition is always false unless there is overflow, and overflow is Undefined Behaviour.
>
> Source code is
>
> if (unlikely(p + 20> end || p + 20 < p)) {
Looks like we make that assumption all over; e.g. see the checks in
xdr_reserve_space and __xdr_inline_decode. I guess that should be
if (unlikely(end - p < 20))
?
What's the practical effect right now? (E.g. does gcc actually violate
our assumption here currently?)
--b.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-21 19:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <DUB128-W91EBE8E198A948D174CCC9CCF0@phx.gbl>
2016-01-21 19:34 ` linux-4.4/net/sunrpc/auth_gss/gss_krb5_mech.c:296: Undefined Behaviour bfields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).