All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	dsahern@gmail.com, stephen@networkplumber.org,
	netdev@vger.kernel.org
Subject: Re: [Bug 199643] New: UBSAN: Undefined behaviour in ./include/net/route.h:240:2
Date: Thu, 7 Jun 2018 17:49:23 -0700	[thread overview]
Message-ID: <20180607174923.13a11d08@cakuba.netronome.com> (raw)
In-Reply-To: <e05416a5-b4fe-6e9f-cefc-86848fb146cf@gmail.com>

On Thu, 7 Jun 2018 17:28:59 -0700, Eric Dumazet wrote:
> On 06/07/2018 05:11 PM, David Miller wrote:
> > From: Jakub Kicinski <jakub.kicinski@netronome.com>
> > Date: Thu, 7 Jun 2018 17:06:23 -0700
> >   
> >> [  293.213661]  ip_send_unicast_reply+0x1b67/0x1d0e  
> > 
> > This calls ip_setup_cork() which can NULL out the 'rt' route
> > pointer.  Hmmm... :-/
> >   
> 
> 
> UBSAN seems unhappy  with dst being NULL in :
> 
> dst_release(&rt->dst);
> 
> But the code obviously is ready for dst being NULL, it is even documented :)

Oh, so the code depends on dst being the first member?  Would it make
sense to just cast the pointer instead?

  reply	other threads:[~2018-06-08  0:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 17:34 Fw: [Bug 199643] New: UBSAN: Undefined behaviour in ./include/net/route.h:240:2 Stephen Hemminger
2018-05-08  4:12 ` David Miller
2018-05-08 14:52   ` David Ahern
2018-06-08  0:06     ` Jakub Kicinski
2018-06-08  0:11       ` David Miller
2018-06-08  0:28         ` Eric Dumazet
2018-06-08  0:49           ` Jakub Kicinski [this message]
2018-06-08  0:53             ` David Ahern
2018-06-08  1:02               ` Jakub Kicinski

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=20180607174923.13a11d08@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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.