netfilter: nf_tables: bail out on mismatching dynset and set expressions
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 4 Dec 2023 13:25:33 +0000 (14:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:45:09 +0000 (18:45 +0100)
commit5eeba00a89c5c6be4e45b69bef20d1d1b9edb968
tree4054d92284a5428ee7d8770a5b9f798cb2aafd99
parent0392d322b45bdd33e7b215caad0f0e581eeb0ee2
netfilter: nf_tables: bail out on mismatching dynset and set expressions

[ Upstream commit 3701cd390fd731ee7ae8b8006246c8db82c72bea ]

If dynset expressions provided by userspace is larger than the declared
set expressions, then bail out.

Fixes: 48b0ae046ee9 ("netfilter: nftables: netlink support for several set element expressions")
Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_dynset.c