]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nf_tables: skip netlink portID validation if zero
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 22 Jun 2021 09:45:11 +0000 (11:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:59:58 +0000 (16:59 +0200)
commit50851870542d878c82883447016fc3009c2ebed8
tree1b5d9bf353cba0bba28f707dca3e870542d55552
parent64811dda505473f2f2872c68878af2c2a6862c33
netfilter: nf_tables: skip netlink portID validation if zero

[ Upstream commit 534799097a777e82910f77a4f9d289c815a9a64e ]

nft_table_lookup() allows us to obtain the table object by the name and
the family. The netlink portID validation needs to be skipped for the
dump path, since the ownership only applies to commands to update the
given table. Skip validation if the specified netlink PortID is zero
when calling nft_table_lookup().

Fixes: 6001a930ce03 ("netfilter: nftables: introduce table ownership")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c