Received: by 10.213.65.68 with SMTP id h4csp370115imn; Tue, 20 Mar 2018 05:38:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELuQ+a2h7t/4cX8xuR+unPDSMVj8aGZxluNyOOtRPCup068nXNoRspCQSGEhBmjCuN00S4vk X-Received: by 10.101.97.207 with SMTP id j15mr11833520pgv.266.1521549511217; Tue, 20 Mar 2018 05:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521549511; cv=none; d=google.com; s=arc-20160816; b=CzmypdGDy7jPlJP6Umayu/Iww7wpOeppxa9DkaZWr3T4JAasG9ArtPXz0+TCiuX9kL ZVc2n1Crwwwdh/cI5K8mlYlhRMH04fHB5+/ul5VUp8eKm0cgVN955nF4Ts8ueot8NFkH NJZktM5K+XaX7ephJDDNsRdkRs+frOxi4PozET8K01ecouMjbqaT73NCOi7yDBGyzo9Q BEUfivnqmSv5durrIRrIzoWVuBoz+3jlOkdJD9ruiE1cJh4cIqb/J3gHRoUn0z4UJu2m wq0uKadxxxgSaYcwwArVa8eCn25h+a/4j3xwY+OyiPqM67pmihXH5uN3GncDcpbXYmlR pT/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=1hWgK39f8qUgeSakMcs7CZZfzif2y551o3XhwewGZnE=; b=bjSAvNjbihZ5Jtqjq6qcumGigjl8H2zuSdYmWRKLaCHtePkASCawY0FwmaylRGPjDu VurJMPYPX/C2aXTChN/HPrAEEcdBuvK5ML8ueQbtnqimKj2kHwkSO+U6dK03gclAnhu6 c2IZzQuq734RNnJOMPnS1eqzUYQiluaRG7VJjI+00fG/D2vVxU3YNMF2hfn/fFXFd6g2 XGNj2rxD/7LFd1hN5JQ/tRXNIqRROXUHTdyZScjb7MjxiSxOIsWB5lEQ4cePhgyd29Dn WxVxPEbQsGOPMTHsEca29q1bp+sUU6K2wHjAF8F7L7iwOuKuxZ79gIQnDMdo0dFpLas+ qxEg== 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 p3si1121812pgc.776.2018.03.20.05.38.15; Tue, 20 Mar 2018 05:38:31 -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 S1753361AbeCTMhR (ORCPT + 99 others); Tue, 20 Mar 2018 08:37:17 -0400 Received: from mail.us.es ([193.147.175.20]:55822 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753297AbeCTMhL (ORCPT ); Tue, 20 Mar 2018 08:37:11 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id C8FE61C4386 for ; Tue, 20 Mar 2018 13:37:00 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id B9607DA243 for ; Tue, 20 Mar 2018 13:37:00 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id B87EADA242; Tue, 20 Mar 2018 13:37:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on antivirus1-rhel7.int X-Spam-Level: X-Spam-Status: No, score=-108.0 required=7.5 tests=ALL_TRUSTED,BAYES_50, HEADER_FROM_DIFFERENT_DOMAINS,SMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1 Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 7BEC9DA787; Tue, 20 Mar 2018 13:36:57 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Tue, 20 Mar 2018 13:36:57 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from us.es (sys.soleta.eu [212.170.55.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 1984lsi) by entrada.int (Postfix) with ESMTPSA id 3EF8841E4817; Tue, 20 Mar 2018 13:36:57 +0100 (CET) Date: Tue, 20 Mar 2018 13:37:06 +0100 X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: "Gustavo A. R. Silva" Cc: Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: Re: [PATCH v2] netfilter: nf_tables: remove VLA usage Message-ID: <20180320123706.kfbsbhqws5hincvk@salvia> References: <20180313031617.GA2204@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180313031617.GA2204@embeddedgus> User-Agent: NeoMutt/20170113 (1.7.2) X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 12, 2018 at 10:16:17PM -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLA and replace it > with dynamic memory allocation. > > From a security viewpoint, the use of Variable Length Arrays can be > a vector for stack overflow attacks. Also, in general, as the code > evolves it is easy to lose track of how big a VLA can get. Thus, we > can end up having segfaults that are hard to debug. > > Also, fixed as part of the directive to remove all VLAs from > the kernel: https://lkml.org/lkml/2018/3/7/621 Applied, thanks.