netfilter: nf_tables: reject unbound chain set before commit phase
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 16 Jun 2023 13:21:39 +0000 (15:21 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 20 Jun 2023 20:43:41 +0000 (22:43 +0200)
commit62e1e94b246e685d89c3163aaef4b160e42ceb02
treefbb21e9e12f7c36837fbdeb1aa064c138bbb0bd0
parent938154b93be8cd611ddfd7bafc1849f3c4355201
netfilter: nf_tables: reject unbound chain set before commit phase

Use binding list to track set transaction and to check for unbound
chains before entering the commit phase.

Bail out if chain binding remain unused before entering the commit
step.

Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c