]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: missing validation from the abort path
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 29 Oct 2020 12:50:03 +0000 (13:50 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 30 Oct 2020 11:57:39 +0000 (12:57 +0100)
commit0cad949b73b83f7d56262819711288cc1ccb4618
treefdb037178fcf70bac3b76a02de79de161229ae78
parent608ed1f3c4e5bb13be9d696399ad70e60320eb61
netfilter: nf_tables: missing validation from the abort path

If userspace does not include the trailing end of batch message, then
nfnetlink aborts the transaction. This allows to check that ruleset
updates trigger no errors.

After this patch, invoking this command from the prerouting chain:

 # nft -c add rule x y fib saddr . oif type local

fails since oif is not supported there.

This patch fixes the lack of rule validation from the abort/check path
to catch configuration errors such as the one above.

Fixes: bcaff1410594 ("netfilter: nf_tables: fix chain dependency validation")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter/nfnetlink.h
net/netfilter/nf_tables_api.c
net/netfilter/nfnetlink.c