UPSTREAM: netfilter: nft_set_pipapo: skip inactive elements during set walk
commit 317eb9685095678f2c9f5a8189de698c5354316a upstream.
Otherwise set elements can be deactivated twice which will cause a crash.
Bug: 316310313
Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Fixes: 3c4287f620
("nf_tables: Add set type for arbitrary concatenation of ranges")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 189c2a82933c67ad360c421258d5449f6647544a)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I27fb6ee806642e23ca02700763a387341dd463e6
This commit is contained in:
parent
a72131befe
commit
2274751099
@ -2028,6 +2028,9 @@ static void nft_pipapo_walk(const struct nft_ctx *ctx, struct nft_set *set,
|
||||
|
||||
e = f->mt[r].e;
|
||||
|
||||
if (!nft_set_elem_active(&e->ext, iter->genmask))
|
||||
goto cont;
|
||||
|
||||
elem.priv = e;
|
||||
|
||||
iter->err = iter->fn(ctx, set, iter, &elem);
|
||||
|
Loading…
Reference in New Issue
Block a user