Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10942567ybi; Thu, 25 Jul 2019 07:24:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkSgZstYR80L5vjJwAIEjTJ8LcMyPM2L/SRmtLFXly2Y+Sw8B59xXFTqK+0uzUpw/E8rE+ X-Received: by 2002:a17:90a:374a:: with SMTP id u68mr92616407pjb.4.1564064660099; Thu, 25 Jul 2019 07:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564064660; cv=none; d=google.com; s=arc-20160816; b=VrzaWDsr/mVG+LLCTL+rFWQ+wLLlmX59rYPWMdXNgdoZVk+WzxC+YC7p7G5Ife4V43 vNwTaIVYRWoosurkiDr/VFKSOHHeqlT6+QUOFehAeweDtIuW36hJm/abTw+PNdjureRQ l2ZK/C27P+B9XA3Hr7lK9h86ZIsM5wbLRJapUVTaVXGTZe15Szpz66ZD+dXIWuNS2FVn Eivkq3jTfziy61JbstehRv5km5SA/NgecNLJi904YWqbau0UaEYVHbysiwjdxDJlniUH yDSgvT55zX/k6DTKpdanMj+x3P/9wGc1vT5iqUIbpQOyypCZ4SjWRBF6kyPL/tHqQXLs RduQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+94dksNMcufTeD/gyuUattLxpQAoVrZBBEnx6NzwFI8=; b=nfq+7WR/ysDCWLOj/i6sseZE9UZnLGVHzkLdswr69Ey6nQdRmiavxditTle2ZME9Ko IDjcPrqhF31K/t4hM35LxWX5gCmR9A6nCrM5/QH2Et7lhUowueI/Uxy8WnxBAAFRI1kx AuLWjq54NvDg9urCgQdBBeFNCfb9JSFJ8pkncfT6C04jZeeRYPXoW1OIWANykVYwxiLn G4/gWvsRKSY2mUAjB/UYWWINJDCtyNxHHAaRlaNqEi7xTtys9vg8dw7J/anF4PdmBpRO FmUe0C93GCiEicY0fq8YbC/ggT3sJS50owbwEQ/TXxnlSIy0NRyWI+gn5SzxK+Qa398I y5Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=igwlp1jj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n21si19302787pgf.339.2019.07.25.07.24.05; Thu, 25 Jul 2019 07:24:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=igwlp1jj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390736AbfGYNtP (ORCPT + 99 others); Thu, 25 Jul 2019 09:49:15 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:36561 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390515AbfGYNtP (ORCPT ); Thu, 25 Jul 2019 09:49:15 -0400 Received: by mail-yb1-f194.google.com with SMTP id d9so12088338ybf.3 for ; Thu, 25 Jul 2019 06:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+94dksNMcufTeD/gyuUattLxpQAoVrZBBEnx6NzwFI8=; b=igwlp1jjMjzAEk8NRn0H5RDYphkcWR6yJ2kmjtXjspl/BBg41z7oa2nDhRSfy9sosJ TpW/84vSFYnbJbxDU5/bVkAoqDFU2nES1vtt1Wm8iH4WEzQuFgawY6ddeO7JZEI5P3j0 1EV4KfGrwCfJjlke104b3pme0tBDfKJgovzggLxwjSN1mk3CPDWpgUKlNycor5Juxii7 b7LZ3RVbvvdV5pg80c0Ia75qccs+K/9YEoPwVTQO0tpstlttM6wo4dCZLxJsubbsiztv o3jc1JRLjkl+Y+x4zBBuEXGcKReNCQQUaFUYk659QHdnLHv3n3eUfOQeK82Yw7VBK3E/ OYkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+94dksNMcufTeD/gyuUattLxpQAoVrZBBEnx6NzwFI8=; b=BT2XECr8CqTuhUv4eXq7s9v2nVF28Aq8oYjhxofpkqzgXsysVB6JhOl410zoUCC0JL smzVNr/NP15tBtx17LvRmjbh8ggRRvrDLCz10E93FEIHE1Iozp29v5KYK1cnppvHybJQ FiLYQ/G8+1BENk3ssKOisbJWRzz3xqkG7SmV4i4XM8+Wz6l3Z3/Pv62tntK/UXLC0UCy vD+wHf29xUMLCVaFSBgJC3uTtb0TTHF+jK66NmmSm0skIMq/5yrLDuhBdi3rUMYpU4WJ dTrOlPSYgj08vDyJaDf1RV9cheRg+jHn5AgXhrskegjukUdbl/p0GaK9tWm6EB0JXV27 dWFg== X-Gm-Message-State: APjAAAXkVhJV1Bf2r9PoVNB7/EaR60CkDYGX8xEMWkr2QONWVU55I7R1 9KSH8Eq68ngMmUxkUEIU7c49y8oX X-Received: by 2002:a25:397:: with SMTP id 145mr54540161ybd.469.1564062553865; Thu, 25 Jul 2019 06:49:13 -0700 (PDT) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id l4sm9960651ywa.58.2019.07.25.06.49.12 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 06:49:13 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id s41so15796235ybe.12 for ; Thu, 25 Jul 2019 06:49:12 -0700 (PDT) X-Received: by 2002:a25:2516:: with SMTP id l22mr21764852ybl.441.1564062552540; Thu, 25 Jul 2019 06:49:12 -0700 (PDT) MIME-Version: 1.0 References: <1564024076-13764-1-git-send-email-yanhaishuang@cmss.chinamobile.com> <1564024076-13764-2-git-send-email-yanhaishuang@cmss.chinamobile.com> In-Reply-To: <1564024076-13764-2-git-send-email-yanhaishuang@cmss.chinamobile.com> From: Willem de Bruijn Date: Thu, 25 Jul 2019 09:48:32 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ipip: validate header length in ipip_tunnel_xmit To: Haishuang Yan Cc: "David S. Miller" , Alexey Kuznetsov , Network Development , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 24, 2019 at 11:09 PM Haishuang Yan wrote: > > We need the same checks introduced by commit cb9f1b783850 > ("ip: validate header length on virtual device xmit") for > ipip tunnel. Fixes: cb9f1b783850b ("ip: validate header length on virtual device xmit") > Signed-off-by: Haishuang Yan Good catch. reg_vif_xmit in net/ipv4/ipmr.c probably also needs it. All other ndo_start_xmit under net/ipv4 and net/ipv6 have this check as of the above commit.