netfilter: xt_TCPOPTSTRIP: don't use tcp_hdr()
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 10 Jun 2013 23:51:31 +0000 (01:51 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Feb 2018 18:32:21 +0000 (18:32 +0000)
commit3cdd962a56dea077e57c82c319c8244bcc01693a
treec2d333f10ab0863ab77cc542d4897407075e679a
parent24a6ca9612ff55f0608196663f843ee4f52ce28b
netfilter: xt_TCPOPTSTRIP: don't use tcp_hdr()

commit ed82c437320c48a4032492f4a55a7e2c934158b6 upstream.

In (bc6bcb5 netfilter: xt_TCPOPTSTRIP: fix possible mangling beyond
packet boundary), the use of tcp_hdr was introduced. However, we
cannot assume that skb->transport_header is set for non-local packets.

Cc: Florian Westphal <fw@strlen.de>
Reported-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/netfilter/xt_TCPOPTSTRIP.c