]> git.baikalelectronics.ru Git - kernel.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:50:35 +0000 (12:50 +0100)
commit47e46607b217cda19a7cd1fd0c436b82345aa7a1
tree8996bed5a22ee5ada073eae03d01b938a8312332
parentec758f1b0ae87e13d22d0e412d53575c1a01fc95
netfilter: nft_tproxy: restrict to prerouting hook

commit fbc39d0e3a71aed4c2eca7c432cd353ff9b4ad53 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: 5e25179efc53 ("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