Received: by 10.213.65.68 with SMTP id h4csp370553imn; Tue, 20 Mar 2018 05:39:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELtUzyfvv6OdSwdhX3RY0HxngPbOqu8CBbUQZ4yMjeDJPdl33M56aSSH6fIosJQgNtkpR0K8 X-Received: by 2002:a17:902:6d0f:: with SMTP id s15-v6mr16719692plk.375.1521549548374; Tue, 20 Mar 2018 05:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521549548; cv=none; d=google.com; s=arc-20160816; b=Sv+/AqhzNn2BspGJQKaCG3oD8416qihwRPV5aQAO80bsgVQFwxPfeT2fjUTMUgvXry SzlNWqhpv7nj1zn29dN9BovJptWGf4Y1G/tUbTHb/82Fu3xrbfYMAz3sTy9lhERuu1FG KfbzP7PGDPQLKL5RQPN6F3JLZdQSDe1mVqq2oBX+SchNH7s95jpOzbkc7Yc60Q361emm jGPTjwm4r66s/ZWpt5HiGSon+9R1kG4PWelsJcx+qDstsspPkvyff8P29mrYJIb+lPbK WilW1g9zwA5guoIc28b8yLThFVkpQKP0qPgyLXDaRL2bCxQ7lGpCU4Gx4tOuBGmv30gi b6ng== 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=lsqAFg0gEC0qOGYS153zsGIzCruKkqZsbMkqq9pnH4g=; b=x3feXSlb2A+wDQPI58kLb+So9mwboN02F4vYitVdGGhN7Gc+fYOfz5D+OWOeMfnA83 hoH6dqVlk0DALER5gPG4ShrPYf4IasS0jgdbrsjAyWdWG9nxmw81iwACJQSx7ckqRU4x 07yErugUtRrqoFDfk9JsvPOB7Lajr2tHNp6HcTlkalphDbxD/mBQo55bPOIxKKfCIR/c 8G6153Ah+1n1UkKYvzj/35lBqBPZZMnVkNS89Eyf21CYwGYwKZn+PT2sORpsVqolTRoD ioq8xzU5EhoITCWUk8y0St94l0vs/pykJIOfHnABaZw1fmpY1maUstPjgZUG/8zAS/ZW 1Urw== 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 q1-v6si1541380plb.349.2018.03.20.05.38.54; Tue, 20 Mar 2018 05:39:08 -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 S1753250AbeCTMgt (ORCPT + 99 others); Tue, 20 Mar 2018 08:36:49 -0400 Received: from mail.us.es ([193.147.175.20]:55554 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752898AbeCTMgq (ORCPT ); Tue, 20 Mar 2018 08:36:46 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 109741C4395 for ; Tue, 20 Mar 2018 13:36:36 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 0052FDA3AC for ; Tue, 20 Mar 2018 13:36:36 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id F1963DA786; Tue, 20 Mar 2018 13:36:35 +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 B3A08DA787; Tue, 20 Mar 2018 13:36:33 +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:33 +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 6C9354265A2F; Tue, 20 Mar 2018 13:36:33 +0100 (CET) Date: Tue, 20 Mar 2018 13:36:42 +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, Kernel Hardening , Kees Cook , "Gustavo A. R. Silva" Subject: Re: [PATCH] netfilter: cttimeout: remove VLA usage Message-ID: <20180320123642.5cqzpaoxqvrpwi2h@salvia> References: <20180312231442.GA22071@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180312231442.GA22071@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 06:14:42PM -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.