public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Daniel Axtens <dja@axtens.net>, David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, alexei.starovoitov@gmail.com
Subject: Re: [PATCH 5/6] net: add and use helpers when adjusting gso_size
Date: Thu, 1 Mar 2018 01:47:19 +0100	[thread overview]
Message-ID: <1d8c2f03-e2d4-e554-bc26-fff705ba7aae@iogearbox.net> (raw)
In-Reply-To: <878tbcejiv.fsf@linkitivity.dja.id.au>

On 03/01/2018 01:17 AM, Daniel Axtens wrote:
[...]
>>> It means that a user loaded eBPF program can trigger logs full of
>>> warnings merely by using this eBPF helper and generating GSO'd SCTP
>>> traffic.
>>>
>>> Daniel and Alexei, this is a serious problem.  The eBPF helpers
>>> mentioned here cannot handle SCTP GSO packets properly, and in fact
>>> corrupt them if they adjust the gso_size.
>>>
>>> SCTP GSO packets use the GSO_BY_FRAGS scheme and cannot be treated
>>> the same way we treat normal GSO packets.
>>
>> Thanks for Cc, I would have missed it. This patch in combination with
>> patch 6/6 seems okay since we reject it in these cases, which is fine
>> (although it could be a warn_once), but patch 6/6 is definitely buggy
>> in that we leave the skb in a half edited state when leaving the helper.
>> Daniel, want me to fix this up from bpf side and route 5/6 and actual
>> fix via bpf tree? Otherwise please respin with fixed 6/6.
> 
> I'm happy for you to take these two via the bpf tree with whatever
> fixes/changes are appropriate - I'm no eBPF expert so my fix was a 'best
> guess' only. Let me know if you would like anything respun on my end.

Ok, sounds good. In that case you would need to only resend the first
4 patches of your series targeted at -net (I presume?). For the others
no further action required from your side, I'll take care of them
tomorrow then.

Thanks,
Daniel

  reply	other threads:[~2018-03-01  0:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 13:04 [PATCH 0/6]GSO_BY_FRAGS correctness improvements Daniel Axtens
2018-02-27 13:04 ` [PATCH 1/6] net: rename skb_gso_validate_mtu -> skb_gso_validate_network_len Daniel Axtens
2018-02-27 13:04 ` [PATCH 2/6] net: sched: tbf: handle GSO_BY_FRAGS case in enqueue Daniel Axtens
2018-02-27 13:04 ` [PATCH 3/6] net: xfrm: use skb_gso_validate_network_len() to check gso sizes Daniel Axtens
2018-02-27 13:04 ` [PATCH 4/6] net: make skb_gso_*_seglen functions private Daniel Axtens
2018-02-28 15:53   ` David Miller
2018-02-27 13:04 ` [PATCH 5/6] net: add and use helpers when adjusting gso_size Daniel Axtens
2018-02-28 15:56   ` David Miller
2018-02-28 16:21     ` Daniel Borkmann
2018-03-01  0:17       ` Daniel Axtens
2018-03-01  0:47         ` Daniel Borkmann [this message]
2018-02-27 13:04 ` [PATCH 6/6] net: filter: refuse to change gso_size of SCTP packets Daniel Axtens

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=1d8c2f03-e2d4-e554-bc26-fff705ba7aae@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dja@axtens.net \
    --cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox