Skip to content

Commit ad25f6d

Browse files
committed
netfilter: nft_set_pipapo: skip inactive elements during set walk
jira VULN-6807 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 d9e144d commit ad25f6d

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
@@ -1870,6 +1870,10 @@ static void nft_pipapo_walk(const struct nft_ctx *ctx, struct nft_set *set,
18701870
goto cont;
18711871

18721872
e = f->mt[r].e;
1873+
1874+
if (!nft_set_elem_active(&e->ext, iter->genmask))
1875+
goto cont;
1876+
18731877
if (nft_set_elem_expired(&e->ext))
18741878
goto cont;
18751879

0 commit comments

Comments
 (0)