netfilter: nf_tables: validate family when identifying table via handle
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 4 Dec 2023 13:51:48 +0000 (14:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:39:11 +0000 (18:39 +0100)
commit3176160c22d94eecd0032b392886f8a0fc32c26e
tree12d72e9e22be998683ad9ef812c5adb93623caf4
parent96f8654b701f772af5f358b91807ce2836ff3444
netfilter: nf_tables: validate family when identifying table via handle

[ Upstream commit f6e1532a2697b81da00bfb184e99d15e01e9d98c ]

Validate table family when looking up for it via NFTA_TABLE_HANDLE.

Fixes: 3ecbfd65f50e ("netfilter: nf_tables: allocate handle and delete objects via handle")
Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c