Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3071261rwe; Mon, 29 Aug 2022 05:28:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR7/fazS03Ri7o9RziRzIbv5oAjjR0kw7dVaZiasOGBDx9+1RFw6pgZ9x+CJ2OFC6FkQOKMn X-Received: by 2002:a17:903:2284:b0:174:8681:3f6e with SMTP id b4-20020a170903228400b0017486813f6emr8777729plh.5.1661776103298; Mon, 29 Aug 2022 05:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661776103; cv=none; d=google.com; s=arc-20160816; b=dc0fQ3wmBn1xTGuZZiI6KuxPvAW4eDbafdjPOExIuqolQxsc8mYqw9iUjcN5XrEtwt Qx0Gl7cjZ6erB+mob31Uszj5dd2KzPN9ZxZxPYXXk9YfWInmcLTcw05TrlqSnzphr35B NN+ej7vxYL3xmmQz52lvPm2hVE4gSniU4GuooJAXt1tAQw0DX/Xa4RDpEmy89ZGhOs7M M8sGaD1tiZSDYzmCTl+gkWlVUkzMHusne79NYi0GGge/YAsCbAPVdM9T377b5k6t6IWo xBqoZCEZW9c2GETmg9qlqud3e9kyxgV/Yg0qfFKyaWPlV/d4R2cK/EUYked4aW5rmtn6 Nhvw== 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=YhXghifPE2hyf3TRxKpA3qn+zrQ9e7OFSi8HKcXdKCU=; b=geASv/iZaPfcQ2eiTFgv/QkPxNeAIAHclvfLF/lksqFUh6Lnj6s2/1bYog9ZWmiL+r xgfY8SIPNbxkbIdlvKvSsvEmRNY4tb7vNeOeqWna+3596nH/jlGWec0XIMB2FPefbsmN zMO/psgGBvt4nVMeGEsUjfz7yrJgNCbUOTtNgKAJVLpTIyceegaPKYbAwlyAFXswtvKC LY1SPdW7LU3MPRIvGcoEP1PsxCZWMJpRfUyt8oQ2S+hq9JuVqktIbeZmihmVf0HhZaMD KvhmJPvj0Db7p3VEzDP2eMUhvsJ/24kumEhN77dsvNIxq3Bj88VINQwChjavM4sOcvjy w2KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=d6mevcbe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a656b85000000b00429e7cf09e3si9708396pgw.157.2022.08.29.05.28.11; Mon, 29 Aug 2022 05:28:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=d6mevcbe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231329AbiH2LNN (ORCPT + 99 others); Mon, 29 Aug 2022 07:13:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230004AbiH2LMf (ORCPT ); Mon, 29 Aug 2022 07:12:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F95E65578; Mon, 29 Aug 2022 04:08:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B979FB80EB8; Mon, 29 Aug 2022 11:06:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D8C9C433D6; Mon, 29 Aug 2022 11:06:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771179; bh=0ueb1dFP4tHhZS/U5agUHIjvYCKjpIfxMbvS/5u0iLk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d6mevcbeNV3cV/eggwu2kaCxi9EIXhENnq6RS1hrm0LJgIXvGvUmM/ahKePUgBAZO MTPQE82DvD/i+3NLXk4TcNNlmTq2EaCR3Ktw5mr5T0qgEHOFxQnz0Jhyp/OynBHa/o cNJ8mShvDA5g3YkE0cgyzGLkfLMoOhPeflPDI7do= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 5.10 36/86] netfilter: nft_tunnel: restrict it to netdev family Date: Mon, 29 Aug 2022 12:59:02 +0200 Message-Id: <20220829105758.033870828@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105756.500128871@linuxfoundation.org> References: <20220829105756.500128871@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pablo Neira Ayuso [ Upstream commit 01e4092d53bc4fe122a6e4b6d664adbd57528ca3 ] Only allow to use this expression from NFPROTO_NETDEV family. Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/nft_tunnel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c index 3b27926d5382c..2ee50996da8cc 100644 --- a/net/netfilter/nft_tunnel.c +++ b/net/netfilter/nft_tunnel.c @@ -133,6 +133,7 @@ static const struct nft_expr_ops nft_tunnel_get_ops = { static struct nft_expr_type nft_tunnel_type __read_mostly = { .name = "tunnel", + .family = NFPROTO_NETDEV, .ops = &nft_tunnel_get_ops, .policy = nft_tunnel_policy, .maxattr = NFTA_TUNNEL_MAX, -- 2.35.1