public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Axtens <dja@axtens.net>
To: Daniel Borkmann <daniel@iogearbox.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, 01 Mar 2018 11:17:44 +1100	[thread overview]
Message-ID: <878tbcejiv.fsf@linkitivity.dja.id.au> (raw)
In-Reply-To: <f4684aae-10e4-6e64-08b5-3995f19d9b8d@iogearbox.net>

Hi Daniel,

>> 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.

Regards,
Daniel

PS. apologies for missing you on Cc - will make sure you're cced on any
future bpf-related work!
>
> Thanks,
> Daniel

  reply	other threads:[~2018-03-01  0:17 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 [this message]
2018-03-01  0:47         ` Daniel Borkmann
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=878tbcejiv.fsf@linkitivity.dja.id.au \
    --to=dja@axtens.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.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