]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nft_tproxy: restrict to prerouting hook
authorFlorian Westphal <fw@strlen.de>
Sat, 20 Aug 2022 15:54:06 +0000 (17:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 15:18:05 +0000 (17:18 +0200)
commit343fed6b0daeb528ae5c9d4d84d9ff763ac95619
tree44e0951ba13fad0f207e19953bd83b3a86b6a5e5
parente53cfa017bf4575d0b948a8f45313ef66d897136
netfilter: nft_tproxy: restrict to prerouting hook

[ Upstream commit 18bbc3213383a82b05383827f4b1b882e3f0a5a5 ]

TPROXY is only allowed from prerouting, but nft_tproxy doesn't check this.
This fixes a crash (null dereference) when using tproxy from e.g. output.

Fixes: 4ed8eb6570a4 ("netfilter: nf_tables: Add native tproxy support")
Reported-by: Shell Chen <xierch@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_tproxy.c