Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp884965pxb; Thu, 21 Oct 2021 11:18:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvHgwHiFG6RVUqd/miyjL0awEebCfMOk491RdXCPrmPQu9E4bs5TeR6wCuFzTik2Sm5lj4 X-Received: by 2002:a05:6402:34d0:: with SMTP id w16mr9799339edc.98.1634840330092; Thu, 21 Oct 2021 11:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634840330; cv=none; d=google.com; s=arc-20160816; b=n3Ly9RDuvURka3ivg4kbywDPefd9RVsZ61VMkEGQ636Axlnc9ZHEDbezhZbuJk+zEl mOzErFLeWetCfLiO/2OnCEPiuF3QC2yidiu2cqr9MtMsVwdvAIBmhmfzfMIETObuwS3o p6zHBc5XlaaTxzhbksxOv6a2A+2EdAURmxjwf6vpshR1ZksXFTkqreAAteI8X9g6Mffy jEGCKjqRJd3Lq0qAT1fWxP7RhV/m9Iv+l+mP06F6r9F//tDMTFebHqArohq0gvloscQC nn4ZhVgLM4aWVHwKw9lLXMY1p+mjQgkqDNGeGP8PqKngR3AQDSpcwzqaiLuYX0PPhpEh mBKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=8b2Xbd3V98Uv/j0EThKdltQrbV4aRNepTw50vve/0Es=; b=LEGUcl5m+7cr/wtK0SrBNNmwHL4o571jRrWW2wyjQnnWalxl6heh97sc4vBPrddvXi 3hGC5q/KjU7lVWNl+hslm8rv4AT50NKr7kByCBpTbn84Q4MedRAv8g6ZL80MNXnnso3u nmbVZfojChNO85Ta0CE85Onp80yGfdYmPuai7dIz/QeIRfSJL1FHYYUGRtCe1d06Jaui yRVLXFfILlvAx7YKOPLvCBSzspJzy2ZumBvCaeipoMOjX2c1xlnzV5pEaNcXf952r0IY 3Gpe5Why2yegOd8zDUgYjqtL1HYjc5eTAbAiJQZJbeGQqxph/SJE0Hm7qiurf2RqVqZK 13uQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si9073738ejw.199.2021.10.21.11.18.24; Thu, 21 Oct 2021 11:18:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232128AbhJUSS0 (ORCPT + 99 others); Thu, 21 Oct 2021 14:18:26 -0400 Received: from mail.netfilter.org ([217.70.188.207]:35048 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230331AbhJUSSZ (ORCPT ); Thu, 21 Oct 2021 14:18:25 -0400 Received: from netfilter.org (unknown [78.30.32.163]) by mail.netfilter.org (Postfix) with ESMTPSA id 6E3ED63F37; Thu, 21 Oct 2021 20:14:25 +0200 (CEST) Date: Thu, 21 Oct 2021 20:16:03 +0200 From: Pablo Neira Ayuso To: Kees Cook Cc: "Gustavo A. R. Silva" , Jozsef Kadlecsik , Florian Westphal , Roopa Prabhu , Nikolay Aleksandrov , "David S. Miller" , Jakub Kicinski , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][net-next] netfilter: ebtables: use array_size() helper in copy_{from,to}_user() Message-ID: References: <20210928200647.GA266402@embeddedor> <202110210958.6626A30@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202110210958.6626A30@keescook> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 21, 2021 at 10:00:34AM -0700, Kees Cook wrote: > On Tue, Sep 28, 2021 at 03:06:47PM -0500, Gustavo A. R. Silva wrote: > > Use array_size() helper instead of the open-coded version in > > copy_{from,to}_user(). These sorts of multiplication factors > > need to be wrapped in array_size(). > > > > Link: https://github.com/KSPP/linux/issues/160 > > Signed-off-by: Gustavo A. R. Silva > > Thanks! > > Reviewed-by: Kees Cook > > I see that this is marked "Awaiting Upstream" (for an ebtables > maintainer ack?) > https://patchwork.kernel.org/project/netdevbpf/patch/20210928200647.GA266402@embeddedor/ I'll route this through the netfilter tree, thanks.