From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from www62.your-server.de ([213.133.104.62]:56304 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965286AbeCAAr0 (ORCPT ); Wed, 28 Feb 2018 19:47:26 -0500 Subject: Re: [PATCH 5/6] net: add and use helpers when adjusting gso_size To: Daniel Axtens , David Miller Cc: netdev@vger.kernel.org, alexei.starovoitov@gmail.com References: <20180227130407.22498-1-dja@axtens.net> <20180227130407.22498-6-dja@axtens.net> <20180228.105622.1054351882596152165.davem@davemloft.net> <878tbcejiv.fsf@linkitivity.dja.id.au> From: Daniel Borkmann Message-ID: <1d8c2f03-e2d4-e554-bc26-fff705ba7aae@iogearbox.net> Date: Thu, 1 Mar 2018 01:47:19 +0100 MIME-Version: 1.0 In-Reply-To: <878tbcejiv.fsf@linkitivity.dja.id.au> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: 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