Skip to content

Commit adc3478

Browse files
committed
netfilter: nf_tables: disallow anonymous set with timeout flag
jira VULN-827 cve CVE-2024-26642 commit-author Pablo Neira Ayuso <[email protected]> commit 1660360 Anonymous sets are never used with timeout from userspace, reject this. Exception to this rule is NFT_SET_EVAL to ensure legacy meters still work. Cc: [email protected] Fixes: 761da29 ("netfilter: nf_tables: add set timeout API support") Reported-by: lonial con <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]> (cherry picked from commit 1660360) Signed-off-by: Greg Rose <[email protected]>
1 parent 8b122b1 commit adc3478

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4152,6 +4152,9 @@ static int nf_tables_newset(struct net *net, struct sock *nlsk,
41524152
if ((flags & (NFT_SET_EVAL | NFT_SET_OBJECT)) ==
41534153
(NFT_SET_EVAL | NFT_SET_OBJECT))
41544154
return -EOPNOTSUPP;
4155+
if ((flags & (NFT_SET_ANONYMOUS | NFT_SET_TIMEOUT | NFT_SET_EVAL)) ==
4156+
(NFT_SET_ANONYMOUS | NFT_SET_TIMEOUT))
4157+
return -EOPNOTSUPP;
41554158
}
41564159

41574160
dtype = 0;

0 commit comments

Comments
 (0)