netfilter: x_tables: cap allocations at 512 mbyte
authorFlorian Westphal <fw@strlen.de>
Tue, 27 Feb 2018 18:42:31 +0000 (19:42 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Mar 2018 22:15:43 +0000 (23:15 +0100)
commit19926968ea86a286aa6fbea16ee3f2e7442f10f0
tree9d68fdc7b64692370c42aa1eae1636858fb898a9
parente816a2ce49e49e3906f614009c919334a0c6ba6a
netfilter: x_tables: cap allocations at 512 mbyte

Arbitrary limit, however, this still allows huge rulesets
(> 1 million rules).  This helps with automated fuzzer as it prevents
oom-killer invocation.

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