Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3326633imm; Sun, 16 Sep 2018 15:34:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbKuiXmZnlKF+iWZ8ZIWam7dIphgFyPDidO3lHLUhIeP0O0JsTdkC6mXTFk8rNbFej2deVm X-Received: by 2002:a17:902:4124:: with SMTP id e33-v6mr22342658pld.48.1537137294283; Sun, 16 Sep 2018 15:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537137294; cv=none; d=google.com; s=arc-20160816; b=GLxjrfLjQ7XLpgPUrcT8DE1JDdBDbHIPhePl/iJLqft9T7rdg80836Sey/F/aXx489 y5HgFMMjehY9Xcpl24uza+P9x+Ze23WKd3z5T1Gkmn5p4GY222oKQGz6IxNQC2T5rYPZ 5727FfknNsILlpPx+lzwX+fisCDQwbuCrPGocPAc7LKSpm2ZTiVk0ALhtvnDyr2t0QJc TZZ4ax9WETaFUmvOAXmvNOJe+AwK99Jpkju8jLRxDT5SWCt9BeJiqCCZnE8LgAWv06BE gkW5Jk/xezbJa49XDH5smGoBdOyRZehSY9P8gaLdZ8lxq3v4k0y1mgMK1GSk6oyCpWSM C6/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=N3SqUCx81Wqvf9fMNZZxrmAoBhT4TQ8p84D+Pa6yHe4=; b=GjdbY5GsRJn8/oXGUXvC8HAEe3KjgFyCsPinhYfBoYmnl7DUM8ksw2UPcTQqo0IKxe c8pi9AY/l1fNA7bRCq7UI65OKq5fPf7FUYr2j3PnaIKClIZ91YJOsGl4MIScsA/cRlh6 xY7tnTtJ1k0ZyY/bffbjsqAIBfKcAenuH6c8LEEYYstp1WcGOJbjCq+E3vLk6zJ+UDCc C5emfUy+bSJpbOX1kvCaoIxBij7uCfk9snAN6c46CIwJ533DzwPRpEueNoaX7WN8gdFt MuyqIo0ByIDsRzpQQrXC2AEUMftOH/kO02u64lTmbwQI8crTJDveqftIpIPt9RiYxfj+ Sm4Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5-v6si11898171pll.89.2018.09.16.15.34.38; Sun, 16 Sep 2018 15:34:54 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728559AbeIQD65 (ORCPT + 99 others); Sun, 16 Sep 2018 23:58:57 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:35866 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728190AbeIQD65 (ORCPT ); Sun, 16 Sep 2018 23:58:57 -0400 Received: from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net [74.93.104.98]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id EE0BD1420B130; Sun, 16 Sep 2018 15:34:27 -0700 (PDT) Date: Sun, 16 Sep 2018 15:34:27 -0700 (PDT) Message-Id: <20180916.153427.1678835674354962099.davem@davemloft.net> To: yanhaishuang@cmss.chinamobile.com Cc: kuznet@ms2.inr.ac.ru, jbenc@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3,net-next 1/2] ip_gre: fix parsing gre header in ipgre_err From: David Miller In-Reply-To: <1536899208-2958-1-git-send-email-yanhaishuang@cmss.chinamobile.com> References: <1536899208-2958-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 16 Sep 2018 15:34:28 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Haishuang Yan Date: Fri, 14 Sep 2018 12:26:47 +0800 > gre_parse_header stops parsing when csum_err is encountered, which means > tpi->key is undefined and ip_tunnel_lookup will return NULL improperly. > > This patch introduce a NULL pointer as csum_err parameter. Even when > csum_err is encountered, it won't return error and continue parsing gre > header as expected. > > Fixes: 9f57c67c379d ("gre: Remove support for sharing GRE protocol hook.") > Reported-by: Jiri Benc > Signed-off-by: Haishuang Yan > > --- > Changes since v3: > * skb_checksum_simple_validate need to be performed in csum_err case. Applied.