This is a note to let you know that I've just added the patch titled netfilter: nft_dynset: do not reject set updates with NFT_SET_EVAL to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: netfilter-nft_dynset-do-not-reject-set-updates-with-nft_set_eval.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From stable-owner@xxxxxxxxxxxxxxx Sat May 27 16:08:12 2023 From: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> Date: Sat, 27 May 2023 18:08:08 +0200 Subject: netfilter: nft_dynset: do not reject set updates with NFT_SET_EVAL To: netfilter-devel@xxxxxxxxxxxxxxx Cc: gregkh@xxxxxxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, sashal@xxxxxxxxxx Message-ID: <20230527160811.67779-9-pablo@xxxxxxxxxxxxx> From: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> [ 215a31f19dedd4e92a67cf5a9717ee898d012b3a ] NFT_SET_EVAL is signalling the kernel that this sets can be updated from the evaluation path, even if there are no expressions attached to the element. Otherwise, set updates with no expressions fail. Update description to describe the right semantics. Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates") Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- include/uapi/linux/netfilter/nf_tables.h | 2 +- net/netfilter/nft_dynset.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h @@ -258,7 +258,7 @@ enum nft_rule_compat_attributes { * @NFT_SET_INTERVAL: set contains intervals * @NFT_SET_MAP: set is used as a dictionary * @NFT_SET_TIMEOUT: set uses timeouts - * @NFT_SET_EVAL: set contains expressions for evaluation + * @NFT_SET_EVAL: set can be updated from the evaluation path * @NFT_SET_OBJECT: set contains stateful objects */ enum nft_set_flags { --- a/net/netfilter/nft_dynset.c +++ b/net/netfilter/nft_dynset.c @@ -190,9 +190,7 @@ static int nft_dynset_init(const struct priv->expr = nft_expr_init(ctx, tb[NFTA_DYNSET_EXPR]); if (IS_ERR(priv->expr)) return PTR_ERR(priv->expr); - - } else if (set->flags & NFT_SET_EVAL) - return -EINVAL; + } nft_set_ext_prepare(&priv->tmpl); nft_set_ext_add_length(&priv->tmpl, NFT_SET_EXT_KEY, set->klen); Patches currently in stable-queue which might be from stable-owner@xxxxxxxxxxxxxxx are queue-4.14/netfilter-nftables-add-nft_parse_register_load-and-use-it.patch queue-4.14/netfilter-nftables-add-nft_parse_register_store-and-use-it.patch queue-4.14/netfilter-nf_tables-fix-register-ordering.patch queue-4.14/netfilter-nftables-statify-nft_parse_register.patch queue-4.14/netfilter-nf_tables-validate-registers-coming-from-userspace.patch queue-4.14/netfilter-nft_dynset-do-not-reject-set-updates-with-nft_set_eval.patch queue-4.14/netfilter-nf_tables-do-not-allow-set_id-to-refer-to-another-table.patch queue-4.14/netfilter-nf_tables-stricter-validation-of-element-data.patch queue-4.14/netfilter-nf_tables-add-nft_setelem_parse_key.patch queue-4.14/netfilter-nf_tables-do-not-allow-rule_id-to-refer-to-another-chain.patch queue-4.14/netfilter-nf_tables-allow-up-to-64-bytes-in-the-set-element-data-area.patch