]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 12 Aug 2022 14:19:23 +0000 (16:19 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 12 Aug 2022 14:32:16 +0000 (16:32 +0200)
commitc15dc142aaa7630a4348df6f46ce2afe59688f70
treed4a87abe570218f1278f5b07c40b9460abda1975
parentd35141763b44935e7dd0c592c7532d18be2c7e2e
netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag

If the NFTA_SET_ELEM_OBJREF netlink attribute is present and
NFT_SET_OBJECT flag is set on, report EINVAL.

Move existing sanity check earlier to validate that NFT_SET_OBJECT
requires NFTA_SET_ELEM_OBJREF.

Fixes: b8103279a36a ("netfilter: nf_tables: add stateful object reference to set elements")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c