netfilter: nf_tables: disallow element updates of bound anonymous sets
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 16 Jun 2023 13:20:16 +0000 (15:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:12:32 +0000 (11:12 +0200)
commitb60c0ce0ff3107b8cbabda46769b104890381046
treec70fc489fda1132cc359e5c1c3b71d802961157d
parent0d836f917520300a8725a5dbdad4406438d0cead
netfilter: nf_tables: disallow element updates of bound anonymous sets

[ Upstream commit c88c535b592d3baeee74009f3eceeeaf0fdd5e1b ]

Anonymous sets come with NFT_SET_CONSTANT from userspace. Although API
allows to create anonymous sets without NFT_SET_CONSTANT, it makes no
sense to allow to add and to delete elements for bound anonymous sets.

Fixes: 96518518cc41 ("netfilter: add nftables")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c