All of lore.kernel.org
 help / color / mirror / Atom feed
From: "bfields@fieldses.org" <bfields@fieldses.org>
To: David Binderman <dcb314@hotmail.com>
Cc: "jlayton@poochiereds.net" <jlayton@poochiereds.net>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: linux-4.4/net/sunrpc/auth_gss/gss_krb5_mech.c:296: Undefined Behaviour
Date: Thu, 21 Jan 2016 14:34:59 -0500	[thread overview]
Message-ID: <20160121193459.GC1793@fieldses.org> (raw)
In-Reply-To: <DUB128-W91EBE8E198A948D174CCC9CCF0@phx.gbl>

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.

           reply	other threads:[~2016-01-21 19:35 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <DUB128-W91EBE8E198A948D174CCC9CCF0@phx.gbl>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160121193459.GC1793@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=dcb314@hotmail.com \
    --cc=jlayton@poochiereds.net \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.