Skip to content

Commit 7617338

Browse files
committed
netfilter: nft_set_pipapo: skip inactive elements during set walk
jira VULN-8904 cve CVE-2023-6817 commit-author Florian Westphal <[email protected]> commit 317eb96 upstream-diff Additional newline because this kernel has not removed the nft_set_elem_expired call yet 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]> (cherry picked from commit 317eb96) Signed-off-by: Brett Mastbergen <[email protected]>
1 parent 5449582 commit 7617338

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/netfilter/nft_set_pipapo.c

+4
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,10 @@ static void nft_pipapo_walk(const struct nft_ctx *ctx, struct nft_set *set,
19811981
goto cont;
19821982

19831983
e = f->mt[r].e;
1984+
1985+
if (!nft_set_elem_active(&e->ext, iter->genmask))
1986+
goto cont;
1987+
19841988
if (nft_set_elem_expired(&e->ext))
19851989
goto cont;
19861990

0 commit comments

Comments
 (0)