Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4822069ybl; Wed, 22 Jan 2020 05:24:22 -0800 (PST) X-Google-Smtp-Source: APXvYqz4s8CT0uCGZlYIIAHcro+tI5f3Ej7uxNTPpZyJs3J4VRPlu7A+8su8Cew+Q4j4LJArTu54 X-Received: by 2002:aca:554d:: with SMTP id j74mr6973422oib.92.1579699462874; Wed, 22 Jan 2020 05:24:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699462; cv=none; d=google.com; s=arc-20160816; b=EGzHLzEcvCIIZVuOSotnKtr57aALPr1m/BRCtI2iM+Kvl0Vej6S/Ig6wW69xwR7tEl GHo+pxcOPSPnPxsaMG3TjpKvGHhejTVJp14RJiQdfLXUrdmycXGzaB4gv7Ams5NWmiAQ chqHCi719jw8V492Vi2ow6mHQYlKBUZC2N7+VHnP7k+cff9SJ5kYN9bQ5KKMY4wPeQAM ehzjb+sDKLtMisf01iista1UIOEXg+fb8sbGt6kijifa9wK1X6B0Rtq4ERDbwWOjTjkO Dhu19D4B7dhQkkhBz6HBfuuGX91uRL4jnngEW5DjtDGc8KPb4NjORXuviR8iIqphDZ1N XDfg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qETJpW2SV1WD7YA4AORjtCrMCt82mmFh6qGF1SbaEcA=; b=Z/ykZuieKB9ha7E774L+re8w6pA/OzouBu6hVuDDp0py7cAwjP46hcR+hIA9gth+aT R4LjrpnYHifcrcyTiDwqzLKvSyxQY/V2s0WaeOflyhUi+eabw3zp9NOnXb/6YcKAGVay pjXILR2GGqlci6we2ll8CU9ypQADON4RKIbtGBtI0emBAqZSxTwlqg1tCIvSAeRWWFm9 9to7xCoKfSEE2hrJyJIgKmJ5nbsIVAU9WJGcm85nZymEGcQzugimMMYXUSfKAe3k+GTn /HV03gcb5f96z92zVxcJuWxJrkaQ7CfMkDy+aBboJoLPyLuwl5QHZWkb3wg6WlKGhcbt F73Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LTvcnFz9; 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 w131si18370680oie.47.2020.01.22.05.24.11; Wed, 22 Jan 2020 05:24:22 -0800 (PST) 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=@kernel.org header.s=default header.b=LTvcnFz9; 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 S1730697AbgAVNXG (ORCPT + 99 others); Wed, 22 Jan 2020 08:23:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:41036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729353AbgAVNXD (ORCPT ); Wed, 22 Jan 2020 08:23:03 -0500 Received: from localhost (unknown [84.241.205.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A79822467B; Wed, 22 Jan 2020 13:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699383; bh=WDHFmtGhG10YbiH7PL2Z0ayF3nFw7FCKt/ukbS1zEQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LTvcnFz9/3R0xIlM2Y0tAlo8JIipOQhQK6cUURFbP/VtejJacClZbna1RUxjMdw6q 4DwRCznNUfA6hTuzjrON+ryW0ZbOOkc1ViDmX7k1IcgR2tx9MGbu4BOU80hQJ87SOX uiUxoxhPBnlja6UoqbSpG+tC/VHDjwQV1vqdIVQg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Westphal , Pablo Neira Ayuso Subject: [PATCH 5.4 128/222] netfilter: nft_tunnel: ERSPAN_VERSION must not be null Date: Wed, 22 Jan 2020 10:28:34 +0100 Message-Id: <20200122092842.914363198@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Westphal commit 9ec22d7c6c69146180577f3ad5fdf504beeaee62 upstream. Fixes: af308b94a2a4a5 ("netfilter: nf_tables: add tunnel support") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nft_tunnel.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/netfilter/nft_tunnel.c +++ b/net/netfilter/nft_tunnel.c @@ -266,6 +266,9 @@ static int nft_tunnel_obj_erspan_init(co if (err < 0) return err; + if (!tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION]) + return -EINVAL; + version = ntohl(nla_get_be32(tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION])); switch (version) { case ERSPAN_VERSION: