netfilter: x_tables: validate e->target_offset early
authorFlorian Westphal <fw@strlen.de>
Tue, 22 Mar 2016 17:02:49 +0000 (18:02 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 28 Mar 2016 15:59:04 +0000 (17:59 +0200)
commitbdf533de6968e9686df777dc178486f600c6e617
tree23e87768a52a4d72522765b652cfe8af9bc67e46
parent99b7248e2ad57ca93ada10c6598affb267ffc99a
netfilter: x_tables: validate e->target_offset early

We should check that e->target_offset is sane before
mark_source_chains gets called since it will fetch the target entry
for loop detection.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c