diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-04-17 12:14:29 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-04-18 09:12:22 +0200 |
commit | d46fc894147cf98dd6e8210aa99ed46854191840 (patch) | |
tree | 2fbd07e6a402920e533d3fb11667ae7d7b0aa333 /include | |
parent | netfilter: nf_tables: fix ifdef to also consider nf_tables=m (diff) | |
download | linux-d46fc894147cf98dd6e8210aa99ed46854191840.tar.xz linux-d46fc894147cf98dd6e8210aa99ed46854191840.zip |
netfilter: nf_tables: validate catch-all set elements
catch-all set element might jump/goto to chain that uses expressions
that require validation.
Fixes: aaa31047a6d2 ("netfilter: nftables: add catch-all set element support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netfilter/nf_tables.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 9430128aae99..1b8e305bb54a 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -1085,6 +1085,10 @@ struct nft_chain { }; int nft_chain_validate(const struct nft_ctx *ctx, const struct nft_chain *chain); +int nft_setelem_validate(const struct nft_ctx *ctx, struct nft_set *set, + const struct nft_set_iter *iter, + struct nft_set_elem *elem); +int nft_set_catchall_validate(const struct nft_ctx *ctx, struct nft_set *set); enum nft_chain_types { NFT_CHAIN_T_DEFAULT = 0, |