From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nft 1/4] evaluate: mappings require set expression
Date: Wed, 9 Jul 2025 01:23:51 +0200 [thread overview]
Message-ID: <20250708232354.2189045-2-pablo@netfilter.org> (raw)
In-Reply-To: <20250708232354.2189045-1-pablo@netfilter.org>
While EXPR_CONCAT and EXPR_LIST share the same layout in struct expr,
these expressions are not possible at this stage.
Fall back to error out with "invalid mapping expression".
Fixes: 02d44b4f9917 ("evaluate: fix expression data corruption")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/evaluate.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/evaluate.c b/src/evaluate.c
index a2d5d7c29514..83381b4ef3d0 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -2211,8 +2211,6 @@ static int expr_evaluate_map(struct eval_ctx *ctx, struct expr **expr)
mappings = map->mappings;
switch (map->mappings->etype) {
- case EXPR_CONCAT:
- case EXPR_LIST:
case EXPR_SET:
set_flags |= mappings->set_flags;
/* fallthrough */
--
2.30.2
next prev parent reply other threads:[~2025-07-08 23:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 23:23 [PATCH nft 0/4] detach concat, list and set expression layouts Pablo Neira Ayuso
2025-07-08 23:23 ` Pablo Neira Ayuso [this message]
2025-07-08 23:23 ` [PATCH nft 2/4] evaluate: validate set expression type before accessing flags Pablo Neira Ayuso
2025-07-08 23:23 ` [PATCH nft 3/4] src: convert set to list expression Pablo Neira Ayuso
2025-07-08 23:23 ` [PATCH nft 4/4] src: detach set, list and concatenation expression layout Pablo Neira Ayuso
2025-07-09 13:58 ` [PATCH nft 0/4] detach concat, list and set expression layouts Florian Westphal
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=20250708232354.2189045-2-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.