From patchwork Fri Apr 20 19:15:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 902141 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mojatatu.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=mojatatu-com.20150623.gappssmtp.com header.i=@mojatatu-com.20150623.gappssmtp.com header.b="I1i0nN92"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40SQZ03Yj0z9s1w for ; Sat, 21 Apr 2018 05:16:08 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752455AbeDTTQF (ORCPT ); Fri, 20 Apr 2018 15:16:05 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:54333 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbeDTTQE (ORCPT ); Fri, 20 Apr 2018 15:16:04 -0400 Received: by mail-it0-f68.google.com with SMTP id h143-v6so3829447ita.4 for ; Fri, 20 Apr 2018 12:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=2WSkFReFJpDlRlQX0U6FWsrsFCjsVJlis4IFojYbL5A=; b=I1i0nN92EAnLH7YlRmk1flPM3vFKTVz7A1j8stQ2MJbd1HZAN/V8E0qzk0TlAdSLEu E6/FcwyFjly/o14XTLwr0MRufDb45rl8zp1pY6w2YcNQwZiuaTpsGObfac0pqyxH0VNe PON3eQoEuul3V4HWm++sylHVjQG9taI5CvEYiL4cRHRhHDzQvqHh23GxvnsnPhZ2xg0s M5+UWUOhYygLe2+N0xMS7IBfnAhrX7fH6alsRzK3DQk37cLOMFtVSunr7kVFVawcI9zn zhcpInc6+15Y+BGrzDsorSb3UBosy53kwvl9d6I57cOAcjpaqOnWg0dE6s6tCTs+nmxg ghjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2WSkFReFJpDlRlQX0U6FWsrsFCjsVJlis4IFojYbL5A=; b=mASXu1CQv+7/+qvU87t911R+1kN1E+4IZ1MNGA441HY8NYJuqWRDwN477B8jGgMQw8 5ddKsE5hP+Eyuz6RxykwpD9ECA6wD8XyOHiE6pFSN+CejmOB3h5p0zqA7ztgDItMNosl J/31is9h2UVPc00qmmJUbjmCCAr/VzUoId+XqUfX9Kw1Zv6U0XmtGAAGUHU4rwHoiEjI f+0hGUvXuYi85lwJXXT4JQHUxJZVOmnCpUG2/prq44TatgDZgpkOldBmvb3DfTiGv+Fn lrCVSG790wWGR9cLOTACmsowRV7xq53dgX8O0GRcSOwXsYAyG4wStcHGzLRWv/Dklzhx zR4w== X-Gm-Message-State: ALQs6tAJfNj6ttOEE8z55sFlsm89cvav1oPC5pKsTIWDktsYyH2BlR9Q ixxz87GC2FAeCQznv4PkNXDDzQ== X-Google-Smtp-Source: AIpwx483xqPD6YOndLMyHaLoKIFfzkPE+B9BNm7xwlYT01LUkCjWUM5b3n6m3zQ0/MPj93iJj7tU5Q== X-Received: by 2002:a24:9ac1:: with SMTP id l184-v6mr4220677ite.127.1524251763837; Fri, 20 Apr 2018 12:16:03 -0700 (PDT) Received: from x220t.lan ([64.26.149.125]) by smtp.gmail.com with ESMTPSA id g202-v6sm1179368ita.13.2018.04.20.12.16.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 12:16:03 -0700 (PDT) From: Alexander Aring To: yotam.gi@gmail.com Cc: jhs@mojatatu.com, davem@davemloft.net, xiyou.wangcong@gmail.com, jiri@resnulli.us, yuvalm@mellanox.com, netdev@vger.kernel.org, kernel@mojatatu.com, Alexander Aring Subject: [PATCHv4 net 0/3] net: sched: ife: malformed ife packet fixes Date: Fri, 20 Apr 2018 15:15:02 -0400 Message-Id: <20180420191505.27633-1-aring@mojatatu.com> X-Mailer: git-send-email 2.11.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org As promised at netdev 2.2 tc workshop I am working on adding scapy support for tdc testing. It is still work in progress. I will submit the patches to tdc later (they are not in good shape yet). The good news is I have been able to find bugs which normal packet testing would not be able to find. With fuzzy testing I was able to craft certain malformed packets that IFE action was not able to deal with. This patch set fixes those bugs. changes since v4: - use pskb_may_pull before pointer assign changes since v3: - use pskb_may_pull changes since v2: - remove inline from __ife_tlv_meta_valid - add const to cast to meta_tlvhdr - add acked and reviewed tags Alexander Aring (3): net: sched: ife: signal not finding metaid net: sched: ife: handle malformed tlv length net: sched: ife: check on metadata length include/net/ife.h | 3 ++- net/ife/ife.c | 38 ++++++++++++++++++++++++++++++++++++-- net/sched/act_ife.c | 9 +++++++-- 3 files changed, 45 insertions(+), 5 deletions(-)