]> 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)
commitb8def6c7fc1b93ba6c8cfd66d7ba6be0427e7ba2
treed4a87abe570218f1278f5b07c40b9460abda1975
parentb08f44f750bfd46fbefec31d79bec925dcdbe678
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: 0c6b7ebe3782 ("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