From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f51.google.com ([74.125.83.51]:34648 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965144AbeCAARt (ORCPT ); Wed, 28 Feb 2018 19:17:49 -0500 Received: by mail-pg0-f51.google.com with SMTP id m19so1612188pgn.1 for ; Wed, 28 Feb 2018 16:17:49 -0800 (PST) From: Daniel Axtens To: Daniel Borkmann , David Miller Cc: netdev@vger.kernel.org, alexei.starovoitov@gmail.com Subject: Re: [PATCH 5/6] net: add and use helpers when adjusting gso_size In-Reply-To: References: <20180227130407.22498-1-dja@axtens.net> <20180227130407.22498-6-dja@axtens.net> <20180228.105622.1054351882596152165.davem@davemloft.net> Date: Thu, 01 Mar 2018 11:17:44 +1100 Message-ID: <878tbcejiv.fsf@linkitivity.dja.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: netdev-owner@vger.kernel.org List-ID: 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