From patchwork Wed Jul 13 10:44:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 647859 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3rqFpW6ZDLz9syB; Wed, 13 Jul 2016 20:45:07 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1bNHf6-0001GV-Pa; Wed, 13 Jul 2016 10:45:04 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1bNHex-0001DJ-Uf for kernel-team@lists.ubuntu.com; Wed, 13 Jul 2016 10:44:55 +0000 Received: from 1.general.henrix.uk.vpn ([10.172.192.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1bNHex-0004Qf-J5 for kernel-team@lists.ubuntu.com; Wed, 13 Jul 2016 10:44:55 +0000 From: Luis Henriques To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/2] Revert "UBUNTU: SAUCE: (noup) netfilter: x_tables: check for size overflow" Date: Wed, 13 Jul 2016 11:44:53 +0100 Message-Id: <1468406694-16006-2-git-send-email-luis.henriques@canonical.com> In-Reply-To: <1468406694-16006-1-git-send-email-luis.henriques@canonical.com> References: <1468406694-16006-1-git-send-email-luis.henriques@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This reverts commit 7da29bdecc58a7aa4ba54177170b89368ff04141. Dropping this SAUCE patch and replacing it by the upstream fix for CVE-2016-3135: d157bd761585 "netfilter: x_tables: check for size overflow" The original fix (being reverted) was modified to keep only the 2nd check. https://marc.info/?l=netfilter-devel&m=145778004016206&w=2 Signed-off-by: Luis Henriques --- net/netfilter/x_tables.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index c30aa9675a02..2e94272f7f85 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -898,9 +898,6 @@ struct xt_table_info *xt_alloc_table_info(unsigned int size) struct xt_table_info *info = NULL; size_t sz = sizeof(*info) + size; - if (sz < size || sz < sizeof(*info)) - return NULL; - /* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */ if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages) return NULL;