]> 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, 22 Feb 2023 11:55:55 +0000 (12:55 +0100)
commiteaba3f9b672c3a3f820da8ee9584b9520674eafa
tree2b4cb4fa43de8035d31ec5bef39261d8a3cda5dd
parent6618b0dcf265975555e3eb24183e2a9e9b1c947c
netfilter: nft_tproxy: restrict to prerouting hook

commit 18bbc3213383a82b05383827f4b1b882e3f0a5a5 upstream.

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: Qingfang DENG <dqfext@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_tproxy.c