Skip to content

Commit f16e21d

Browse files
committed
netfilter: nft_set_pipapo: skip inactive elements during set walk
JIRA: https://issues.redhat.com/browse/RHEL-19722 Upstream Status: commit 317eb96 CVE: CVE-2023-6817 Conflicts: context only. commit 317eb96 Author: Florian Westphal <[email protected]> Date: Fri Dec 1 15:47:13 2023 +0100 netfilter: nft_set_pipapo: skip inactive elements during set walk Otherwise set elements can be deactivated twice which will cause a crash. Reported-by: Xingyuan Mo <[email protected]> Fixes: 3c4287f ("nf_tables: Add set type for arbitrary concatenation of ranges") Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Florian Westphal <[email protected]>
1 parent f5398b0 commit f16e21d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/netfilter/nft_set_pipapo.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,6 +2050,9 @@ static void nft_pipapo_walk(const struct nft_ctx *ctx, struct nft_set *set,
20502050

20512051
e = f->mt[r].e;
20522052

2053+
if (!nft_set_elem_active(&e->ext, iter->genmask))
2054+
goto cont;
2055+
20532056
elem.priv = &e->priv;
20542057

20552058
iter->err = iter->fn(ctx, set, iter, &elem);

0 commit comments

Comments
 (0)