From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
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:53:35 -0700 [thread overview]
Message-ID: <e6d18d55-2e35-b888-040f-b31117e38daf@gmail.com> (raw)
In-Reply-To: <20180607174923.13a11d08@cakuba.netronome.com>
On 6/7/18 5:49 PM, Jakub Kicinski wrote:
> 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?
>
I've been going the other way with 'rt to dst' and 'dst to rt'
transformations.
Perhaps UBSAN should be updated to understand that NULL + 0 is ok.
next prev parent reply other threads:[~2018-06-08 0:53 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
2018-06-08 0:53 ` David Ahern [this message]
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=e6d18d55-2e35-b888-040f-b31117e38daf@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jakub.kicinski@netronome.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 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).