netfilter: compat: reject huge allocation requests
authorFlorian Westphal <fw@strlen.de>
Tue, 27 Feb 2018 18:42:35 +0000 (19:42 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Mar 2018 22:15:43 +0000 (23:15 +0100)
commit7d7d7e02111e9a4dc9d0658597f528f815d820fd
tree79624163e94c944c0b0ad6efea062b96ef8d3560
parent9782a11efc072faaf91d4aa60e9d23553f918029
netfilter: compat: reject huge allocation requests

no need to bother even trying to allocating huge compat offset arrays,
such ruleset is rejected later on anyway becaus we refuse to allocate
overly large rule blobs.

However, compat translation happens before blob allocation, so we should
add a check there too.

This is supposed to help with fuzzing by avoiding oom-killer.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/x_tables.c