Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2354090pxb; Mon, 20 Sep 2021 19:53:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjhmvhGj7MPnBS2pYLkYUM3n/OiK5lPz8aeCTv9PYblgY20uxwcsej2kpag4/0kJr4FdkL X-Received: by 2002:a17:906:901:: with SMTP id i1mr7058375ejd.234.1632192790379; Mon, 20 Sep 2021 19:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192790; cv=none; d=google.com; s=arc-20160816; b=Fxe5Ph27kPhHRK2vtX+depxKRMNjVeMg6nQSEEXdbb0LBF0mDuwA5VRv5sl7Y0zKlh FBr5/jUEcPkb5L717tnv378hXyIVxtKmiqv729pRAPOEk4zp1GvCNNg7iLvWgFI1aLaW E4CNZTOxfcLPQSpDJsJ63yO5hyPzFgjFgNq6qKDvY9xKExVixYrg/i+wj+JVoU3g+Uu7 aOmcaRBnQ9G8Il4MQgni81RkVKsYgHqrSv4ipj/Pr6G1q9G8FLtRMFdssJLV4LUVRMfj z2s5wu4qGOaSBtIc/WrQuCL0aGWLD071JnoxAh8f4BJMYdOgvRcE9YZRstH22ivDXc7r TbSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4YsIOJeQZJ+kLCWUSWeu+quTcyMwj+/23sn81ukP8R8=; b=M2WnyDrwClBcBLqnNHh4qgceN80V71ItOkgrvFlJPXTEPD60obYlZoVJXWA/tFjsfG VklIomrCJE9D8dMV9QuPaKWlLFNQA99rrntTyzMy/y03Z3Y8WEpVUa1pHACYzoSt6ivd G/4dQJYKT5/FklJ5njsr67ULJcVzD8RB9RGli6c2kPnDXO+k6SFwhxQirQALtLRtcaRd NBYG/I2fEFQgm8ZWAgw8W8su30TTeIp7uCW21J7W9qWETle5Vy2phD3EVh8IILV+bh3H oi2vgwa6UpM9Y0gGbXxae3p/baRC8kWtAG95xL7GqLcuuSGJ581TUVCIbDEhirsAu44l UkQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XKK5+c5e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si12337101edc.18.2021.09.20.19.52.46; Mon, 20 Sep 2021 19:53:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XKK5+c5e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354238AbhITSxt (ORCPT + 99 others); Mon, 20 Sep 2021 14:53:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:33444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385533AbhITSue (ORCPT ); Mon, 20 Sep 2021 14:50:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D2C1C63392; Mon, 20 Sep 2021 17:35:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159309; bh=gRFSAITfTuC4f8wJ31FrDKiHmtxEGLwA5hnuzmRXpps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XKK5+c5e+RtFOWlXg5dpEmJ3it46841pr5498XjOXQZd1gfIVIiZ5A4zSw7iVLQOR SlRS026JpCefezDum36nHAL/HKTLHiZgLy6m/HOzL6b0DIyTXtSuGLbnmHW5hsuArG VhG2FUsWjD3QZNMy0JEdObi+PO697ZwIwbjmoLng= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Willem de Bruijn , "David S. Miller" , Sasha Levin Subject: [PATCH 5.14 165/168] ip6_gre: Revert "ip6_gre: add validation for csum_start" Date: Mon, 20 Sep 2021 18:45:03 +0200 Message-Id: <20210920163927.102531590@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Willem de Bruijn [ Upstream commit fe63339ef36bfb1cc12962015a9b254170eea057 ] This reverts commit 9cf448c200ba9935baa94e7a0964598ce947db9d. This commit was added for equivalence with a similar fix to ip_gre. That fix proved to have a bug. Upon closer inspection, ip6_gre is not susceptible to the original bug. So revert the unnecessary extra check. In short, ipgre_xmit calls skb_pull to remove ipv4 headers previously inserted by dev_hard_header. ip6gre_tunnel_xmit does not. Link: https://lore.kernel.org/netdev/CA+FuTSe+vJgTVLc9SojGuN-f9YQ+xWLPKE_S4f=f+w+_P2hgUg@mail.gmail.com/#t Fixes: 9cf448c200ba ("ip6_gre: add validation for csum_start") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ipv6/ip6_gre.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 7a5e90e09363..bc224f917bbd 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -629,8 +629,6 @@ drop: static int gre_handle_offloads(struct sk_buff *skb, bool csum) { - if (csum && skb_checksum_start(skb) < skb->data) - return -EINVAL; return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); } -- 2.30.2