Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3076139rwe; Mon, 29 Aug 2022 05:33:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR6imT5Uml34F9yziTwUHro+u/VnpkXTqtew4cGJBXLVmkmMcEr3dpFUJQo2w7WHJY66t2gp X-Received: by 2002:a17:903:22c6:b0:172:cad9:403 with SMTP id y6-20020a17090322c600b00172cad90403mr16605427plg.123.1661776380740; Mon, 29 Aug 2022 05:33:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661776380; cv=none; d=google.com; s=arc-20160816; b=t+xtG/9zOr0a3DLwH7DdlqxqquMnGpYAwDXP8E0ug73tOmOo4yrLXlxPvjHht9ca1a 0Z4Jtqzm2RZqrxHP5M86xFDwQiJVMvI5Q/ywQqdyM8PXVqW1F3AykKas/27kUHGpxuj6 KmfrQ4VRDcJCj6XarHWpowjgByLhbdGMWjZX/cE5A7aNXogKrynfHYrIix+MA6h5idr4 qJ8hXc7TRCgybMZ02qA/lj8U7f5Ka/CRwAKaqtN1EnMpAWb1tNX+8CX8+74zhNJg3vC0 3gKbEJyLhYfqS1EqE3XEOguhWwtJKWPqVFLYh4/NqItxomPvPGq3jMuO4LibFyeECwdl j74g== 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=vK2DaXTHNIvECgyIX+/s2OpvyDzNU+zlopqt538sI1Q=; b=Rodr2aRwYt26G2ds8qbCW9ljm0ud7fg8hZ8k4YdReaGhGmNmc/NhLHTNHbtJnK8bd+ DWM4B8fVRsBJNzMGjwhYpqUKLnWvv3TIM9OngcBf9Yx1aIfEpdLXwxVTF6wXYxd1AL1L onTQAPdLuA0SS6qLZhHEroDls5eYwP4ojv/UhNFfakOCsCHbm2amIb8otyditD0vIqaj 8MEWDsVSm7r7hdF364wXmP/glkvKDkyMH1GKBzrfWzUpmn1B/Xe6F76HNuU7M4O7rWd4 edg1sA6O42DNMoDPk8sztPVICM3DFP1wsikeBrF7Dy8J6QkkFPy3ajKLvfJHi573IH46 Eulg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l84mFPBU; 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 nh16-20020a17090b365000b001fda1f91adasi4763352pjb.110.2022.08.29.05.32.49; Mon, 29 Aug 2022 05:33:00 -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=l84mFPBU; 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 S231995AbiH2L1D (ORCPT + 99 others); Mon, 29 Aug 2022 07:27:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231646AbiH2LXC (ORCPT ); Mon, 29 Aug 2022 07:23:02 -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 8637B1EA; Mon, 29 Aug 2022 04:14:44 -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 544BDB80EB8; Mon, 29 Aug 2022 11:14:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A05FDC433C1; Mon, 29 Aug 2022 11:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771680; bh=8FkDwLZrpoSuvjoJww+KkBs/L9j41Rsp290Zc/VDYCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l84mFPBUDFZPYe7laJG7uzsZyOiAcGWZhUzT6E6AeexTwGaqLIoHj/5EmTRRFGy0e a0k8HDw01I8J4xfDicfE28tUeLCKAINSF0Y/NV2H4B1YNXGfk5RXeKUjQDcEX7Oocm 8ZXEzVrGxQpYIbpF7JMR6FqeWl1vLWKzYnKTQfTc= 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.19 061/158] netfilter: nft_tunnel: restrict it to netdev family Date: Mon, 29 Aug 2022 12:58:31 +0200 Message-Id: <20220829105811.267293432@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105808.828227973@linuxfoundation.org> References: <20220829105808.828227973@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 d0f9b1d51b0e9..96b03e0bf74ff 100644 --- a/net/netfilter/nft_tunnel.c +++ b/net/netfilter/nft_tunnel.c @@ -161,6 +161,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