netfilter: x_tables: limit allocation requests for blob rule heads
authorFlorian Westphal <fw@strlen.de>
Tue, 27 Feb 2018 18:42:32 +0000 (19:42 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Mar 2018 22:15:43 +0000 (23:15 +0100)
commit9d5c12a7c08f67999772065afd50fb222072114e
tree3fc6bbb9e424e03b5586b585a7e1387e5ba80adf
parent19926968ea86a286aa6fbea16ee3f2e7442f10f0
netfilter: x_tables: limit allocation requests for blob rule heads

This is a very conservative limit (134217728 rules), but good
enough to not trigger frequent oom from syzkaller.

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