Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1866822ybt; Mon, 15 Jun 2020 11:25:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBgCbKmacxvU8PxvUeVpGB605nte2uwrF+4HFvYwGWXnKBuo9ktTnfVW5igsg/iAqzayvF X-Received: by 2002:a17:906:1513:: with SMTP id b19mr26340460ejd.1.1592245544681; Mon, 15 Jun 2020 11:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592245544; cv=none; d=google.com; s=arc-20160816; b=hlHHMfptETK1OLdKLoKewignY0pTeq9Bcdt/qDmPP+93Ecj1eq2800C2CYJvEXcnOG MZ3GcMbz/mXB2MILjzHyoQKQracq8leopwK3FOpr+C5SOUHHGaD/xuYrYPFko5NVm+aw c27sGOhXFp2sObdRuCwBJ92EGOauLr0fHNTCTxqpOAWOsMJL4YTg2kvywT9z/gakRoyw 3VlEk4MxgqSE6lsb3uTausaiPt0+rwJ/LToUtnbY0iYt9LE/ExfUB9dQ69FJF0/FBOIC c6MPvTaZxsCHb0NOV8h+9BuADxXuI8ro7hcl37vT5cjkCzyetV5XzKHaXvgxzQqryiNV j54w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IvShgxoC6bEvinDvmURRTORSW1iT83qg7H2qgSQS19E=; b=WxUERLWcUtVb/9A1A9LB+fJEHMrqIhGx2sUKuvnqc10JgEddM/9bM6kQMQbSzNJNTT UWeGi0TyCKCKSsYYkDpB75jrbmI1YtqFDxCUAzbOhllaVlIugo+7vUj9lU27HkMKokCw z3wd/c0TQikdgVUFXyYVq/QAUSsK/XucBISSA8GOPBKNwEzDLTvUXRY58ljXg7Ne7ZQF 0x5O0EiwW3DnIspxsIAasyf0NC74C61kNryFsxUKHK8bj19nMeLq/qn8Go7ZEg8OedL2 t+sNHP2s3CChWzaKK2U9MevSE1pJ86RPBqNGVED9pSItEQ2fAYBU7PsXnc5DAQ6otNtm 33MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=U+NpbKGI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h26si9123173edj.196.2020.06.15.11.25.21; Mon, 15 Jun 2020 11:25:44 -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; dkim=pass header.i=@chromium.org header.s=google header.b=U+NpbKGI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731179AbgFOSX0 (ORCPT + 99 others); Mon, 15 Jun 2020 14:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729124AbgFOSXZ (ORCPT ); Mon, 15 Jun 2020 14:23:25 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EA7FC061A0E for ; Mon, 15 Jun 2020 11:23:25 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id i12so186891pju.3 for ; Mon, 15 Jun 2020 11:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IvShgxoC6bEvinDvmURRTORSW1iT83qg7H2qgSQS19E=; b=U+NpbKGIkE9uBSFYj785QYFB+7ya2GdLJf26a5eZptaE+Q9l3S4vQkrMwGK7idV1Q/ FaLWXHRWuMIlQR1nmVSYMSzeaWFof6bo246BhYUINV13Iwgnpu/4WR/Gn4BWy3eofGKv AkLGdGsLoSUZbPWfwHx9/xA2V3pCZV1Z7gByw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=IvShgxoC6bEvinDvmURRTORSW1iT83qg7H2qgSQS19E=; b=ZfSDxUaL+fw9Qfp6C4P7ySH5eNzjblCkzifo/Y/Bvg+LAaj0B2QTyG8T21hSCiS0ya 8f4nQDX2EziKv1zVc/0/VetGu3TEdHwjyG8/Xv6j1Q8zNgwm/TqtKyUCgErRIhvDEDlL c2r71m1a2GHrxRKoB89JRn3TY6VaYJ+z5HJjLX6JC9S0vFJscSEhySCaiIZuKMlaNA28 a1OyfcezAPrdcWurtHhYeMzbpV3J1XwBUK2TZWVpPc99jv8vA+RzjfjzmVZFnnhC+6Nj wHMiArROagPSHajinIdkWiX+otUhZlMnT+pusZvAyD0/xXvJsTF85au7sr2pih3xzmAx tEzg== X-Gm-Message-State: AOAM533PfrJIfp6REsSW3Mnf1D6EwqlODBO7sO4WiDPPsFxJotWh6jp0 mi6EC7rBbgS4Hgm2NSaxii1+Hw== X-Received: by 2002:a17:90a:1da6:: with SMTP id v35mr546338pjv.177.1592245405235; Mon, 15 Jun 2020 11:23:25 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b3sm14373082pft.127.2020.06.15.11.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 11:23:24 -0700 (PDT) Date: Mon, 15 Jun 2020 11:23:23 -0700 From: Kees Cook To: Denis Efremov Cc: Julia Lawall , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coccinelle: misc: add array_size_dup script to detect missed overlow checks Message-ID: <202006151123.3C2CB7782@keescook> References: <20200615102045.4558-1-efremov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200615102045.4558-1-efremov@linux.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 15, 2020 at 01:20:45PM +0300, Denis Efremov wrote: > Detect an opencoded expression that is used before or after > array_size()/array3_size()/struct_size() to compute the same size. > > Cc: Kees Cook > Signed-off-by: Denis Efremov Oh, very cool! How much does this find currently? -- Kees Cook