netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	<netfilter-devel@vger.kernel.org>,
	Pablo Neira Ayuso <pablo@netfilter.org>
Subject: [PATCH net 9/9] netfilter: nft_dynset: disallow object maps
Date: Wed, 16 Aug 2023 00:29:59 +0200	[thread overview]
Message-ID: <20230815223011.7019-10-fw@strlen.de> (raw)
In-Reply-To: <20230815223011.7019-1-fw@strlen.de>

From: Pablo Neira Ayuso <pablo@netfilter.org>

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 <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 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 4fb34d76dbea..5c5cc01c73c5 100644
--- a/net/netfilter/nft_dynset.c
+++ b/net/netfilter/nft_dynset.c
@@ -191,6 +191,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.41.0


      parent reply	other threads:[~2023-08-15 22:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15 22:29 [PATCH net 0/9] netfilter fixes for net Florian Westphal
2023-08-15 22:29 ` [PATCH net 1/9] netfilter: nf_tables: fix false-positive lockdep splat Florian Westphal
2023-08-16 10:20   ` patchwork-bot+netdevbpf
2023-08-15 22:29 ` [PATCH net 2/9] netfilter: nf_tables: fix kdoc warnings after gc rework Florian Westphal
2023-08-15 22:29 ` [PATCH net 3/9] netfilter: nf_tables: deactivate catchall elements in next generation Florian Westphal
2023-08-15 22:29 ` [PATCH net 4/9] netfilter: nf_tables: don't fail inserts if duplicate has expired Florian Westphal
2023-08-15 22:29 ` [PATCH net 5/9] netfilter: set default timeout to 3 secs for sctp shutdown send and recv state Florian Westphal
2023-08-15 22:29 ` [PATCH net 6/9] ipvs: fix racy memcpy in proc_do_sync_threshold Florian Westphal
2023-08-15 22:29 ` [PATCH net 7/9] netfilter: nf_tables: fix GC transaction races with netns and netlink event exit path Florian Westphal
2023-08-15 22:29 ` [PATCH net 8/9] netfilter: nf_tables: GC transaction race with netns dismantle Florian Westphal
2023-08-15 22:29 ` Florian Westphal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230815223011.7019-10-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).