netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: Wei Wang <weiwan@google.com>, netdev <netdev@vger.kernel.org>,
	Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH bpf-next] bpf: prevent non-IPv4 socket to be added into sock hash
Date: Fri, 1 Jun 2018 11:40:35 -0700	[thread overview]
Message-ID: <0fdad75a-851c-28d4-33ed-6a10f764ab17@gmail.com> (raw)
In-Reply-To: <ee9f3172-14c5-3bf8-c61f-cf4e19c705f7@gmail.com>

On 06/01/2018 12:56 AM, John Fastabend wrote:
> On 05/31/2018 06:00 PM, Eric Dumazet wrote:
>> On Thu, May 31, 2018 at 7:32 PM John Fastabend <john.fastabend@gmail.com> wrote:
>>>
>>>
>>> Hi Wei,
>>>
>>> Thanks for the report and fix. It would be better to fix the
>>> root cause so that IPv6 works as intended.
>>>
>>> I'm testing the following now,
>>>
>>> Author: John Fastabend <john.fastabend@gmail.com>
>>> Date:   Thu May 31 14:38:59 2018 -0700
>>>
>>>     sockmap: fix crash when ipv6 sock is added by adding support for IPv6
>>>
>>>     Apparently we had a testing escape and missed IPv6. This fixes a crash
>>>     where we assign tcp_prot to IPv6 sockets instead of tcpv6_prot.
>>>
>>>     Signed-off-by: John Fastabend <john.fastabend@gmail.com>
>>>
>>
>> Hi John
>>
>> In any case, please forward correct attribution for Wei's work, and
>> syzbot 'Reported-by'
> 
> Will send update with tags in a moment.
> 
>>
>> Are you sure you are handling IPv4 mapped in IPv6 sockets as well ?
>>
>
> No, will look into it. Although I didn't see any code to handle it
> in the ./net/tls case either so if there is some issue with this it
> could possibly exist in both ULPs. I guess if ipv4 mapped ipv6
> changes prot or callbacks then we could stomp on it.
>

Will need a v2 to address this, by adding a check to only work on
ESTABLISHED sockets we resolve this issue and the one noted in the
TLS ULP side as well.

Thanks a lot Eric.

      reply	other threads:[~2018-06-01 18:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30 21:29 [PATCH bpf-next] bpf: prevent non-IPv4 socket to be added into sock hash Wei Wang
2018-05-31 23:31 ` John Fastabend
2018-06-01  1:00   ` Eric Dumazet
2018-06-01  7:56     ` John Fastabend
2018-06-01 18:40       ` John Fastabend [this message]

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=0fdad75a-851c-28d4-33ed-6a10f764ab17@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=weiwan@google.com \
    --cc=willemb@google.com \
    /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).