Received: by 10.192.165.148 with SMTP id m20csp534551imm; Wed, 25 Apr 2018 03:51:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx493U7CnNWYpEsqLce703soWiZHp6ZBagSdQFsZC4uR1Jqg1yy/fN4bqQ8iqlGmK//8CA/PS X-Received: by 2002:a17:902:be08:: with SMTP id r8-v6mr28249819pls.289.1524653478563; Wed, 25 Apr 2018 03:51:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524653478; cv=none; d=google.com; s=arc-20160816; b=qHHK80YvkkzijxGDaQU/t41tiHRUDplxc89xPrDkfCHngeyUd5E4tkBOsLwxOqOJBH SODywMyF/Eh9SPQ1fV7ceuaVRU9UfQrs15avKjLDq2fY65Toi48ShdXsn7O/n6Pfl9N6 vABqGM++MC18uKNo1Q5fNRw0eKo/4qlcfLslXW1ph94hVWfsFpJ+hWLbgFg1AQWseVxv +ACtEtVpIEr87HQd4/KYvN2YTYqkPwNaTb5McJXJPdOOfrIwsnuv1JKzEzYlNAkbUInW J4mYDQr99evYigwVBtNPWCMtwa9NCtezftpVs7dVyVzsWf6q0A74YK/G2ana4CzRzeC/ PqNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=RuEnrY9YxndC5ChY5ETGVuR5Gi0LDWylaI9rQp5D7ak=; b=i/CQP9mAHUmevQXfS/Ly6bxqlBjFufIZQlKc1eYEhkKfWf2H7mAi5K3mb3jsLqLxqv mj7iL821TLaLZHAHcr1twH0LdWSBbn4mUNpGW+TMxoDPlzX3TRPVXrBVoTqKN8aSNcVw aPwnAadr+t6tN4hfzukwFd6De3p78JJ8jFi6Qtgkj+XQcmz5h3lX7qzwRWqP6SdUDgfx b1HSJS9wrlk4xAwU+AtXvyGjgW8drRTvAP041juofwJwxmN8TLyw4X5PE2nrgSVNdQdF OeS0D5OHPeQQLIGaEWkV7vS0PBSpej9K/OH2g8o35rAorTOiPulbKSeNchJQgRF6e8nZ fw9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u128si8662255pgc.247.2018.04.25.03.51.03; Wed, 25 Apr 2018 03:51:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754562AbeDYKtl (ORCPT + 99 others); Wed, 25 Apr 2018 06:49:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53372 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754400AbeDYKoi (ORCPT ); Wed, 25 Apr 2018 06:44:38 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4A041412; Wed, 25 Apr 2018 10:44:37 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Westphal , Pablo Neira Ayuso Subject: [PATCH 4.14 174/183] netfilter: x_tables: cap allocations at 512 mbyte Date: Wed, 25 Apr 2018 12:36:34 +0200 Message-Id: <20180425103249.503229111@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Westphal commit 19926968ea86a286aa6fbea16ee3f2e7442f10f0 upstream. 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 Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/x_tables.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -40,6 +40,7 @@ MODULE_AUTHOR("Harald Welte = XT_MAX_TABLE_SIZE) return NULL; /* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */