From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5078A11C83 for ; Mon, 28 Aug 2023 10:39:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6595C433C7; Mon, 28 Aug 2023 10:39:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1693219171; bh=b1HJmHLCLyLmEcDuD1lisB81DaKhNhXjNuE4AIIZ9RQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a3xPnA2buG4+eUKuhtbJJeUJeL8GyUWKwnvdAwM2Q2kBJ0vF2YKfqv16x1gMr54c+ t0iwLG2weW1NMGlbt4hNHFjOOZcCSCG4P9XChT3Yt/0w2Qd2U0io2ZLvdBCRPLjmrZ C6UOMKVNl5hFXkuaKpNq1x14kk7z1aN4gO/+Gkeo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Pablo Neira Ayuso , Florian Westphal , Sasha Levin Subject: [PATCH 5.4 069/158] netfilter: nft_dynset: disallow object maps Date: Mon, 28 Aug 2023 12:12:46 +0200 Message-ID: <20230828101159.613744769@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828101157.322319621@linuxfoundation.org> References: <20230828101157.322319621@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pablo Neira Ayuso [ Upstream commit 23185c6aed1ffb8fc44087880ba2767aba493779 ] Do not allow to insert elements from datapath to objects maps. Fixes: 8aeff920dcc9 ("netfilter: nf_tables: add stateful object reference to set elements") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin --- net/netfilter/nft_dynset.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/netfilter/nft_dynset.c b/net/netfilter/nft_dynset.c index 8aca2fdc0664c..e0c17217817d6 100644 --- a/net/netfilter/nft_dynset.c +++ b/net/netfilter/nft_dynset.c @@ -161,6 +161,9 @@ static int nft_dynset_init(const struct nft_ctx *ctx, if (IS_ERR(set)) return PTR_ERR(set); + if (set->flags & NFT_SET_OBJECT) + return -EOPNOTSUPP; + if (set->ops->update == NULL) return -EOPNOTSUPP; -- 2.40.1