From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42ACCC12002 for ; Fri, 16 Jul 2021 15:53:30 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 93B4F613FB for ; Fri, 16 Jul 2021 15:53:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93B4F613FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33EDD82EA5; Fri, 16 Jul 2021 17:52:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="c3666uE+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E1CF82D8C; Fri, 16 Jul 2021 17:52:14 +0200 (CEST) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DD3E682C55 for ; Fri, 16 Jul 2021 17:52:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf34.google.com with SMTP id i4so4774808qvq.10 for ; Fri, 16 Jul 2021 08:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9XIyMehnnYM5t3nhFi0g3GZGrvnpCJ2ZCiVscSgULvo=; b=c3666uE+jLor+OQy5KXWS0EaWnRCnxc4F5jL/91TpyVjoK8BJYc3s0/j65b4UL7VvH v0y3vg+3mearyfPzRtwNMnlGO/WHGFNnSr/kGOdmh4gvT2FCt6wTgaBqT1EZT+5rIvCN mJzyobCMVRtqiNElmeDS6QL+WI8jy1M87Afr8= 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:user-agent; bh=9XIyMehnnYM5t3nhFi0g3GZGrvnpCJ2ZCiVscSgULvo=; b=occC8QcePSFh2mG/9EQ3qfZnMpRLCAIeSgQc37AirEL7VPq2pymSLl6qqS5GPbbr6M 23o6thwa6027Cfr8awQ77rM3/GgiobQDQWQaFdQglXZKsgeDdGydSBJBLX0rzm/o/j91 AXl7vi8Da9N7L1a8+xSoaItqMRVIXeUf2UvEQBfSJir+gneixBrzVUw43ohvawYGr1Zh S1+HxOpJsP+6N7FK0lJCGWFVwMXrqLBnE6R3rYNtw4q3OgLtxTgx56ZkGoi89e/ztK9I kGZ2jojiv4SKbL+1hDTymKm+djQI5tsjpHUeQHHwrJPuZm254WTujp5vk1RqD0nnyyYX RtjQ== X-Gm-Message-State: AOAM532cSAqov50/AYcJB3/LaKmJkWcZvA8q1uzzi2eZ6VDKT0up7whu u+Yc0hwJEzM6JY0OeoujUx90pzzFvY+iUA== X-Google-Smtp-Source: ABdhPJxwg4EZbp0e4twzmRL8wFIJ4ANeDAM+0yBC4uYLarI7fYfO5JbfwkzqA4gBYmYJeflUiNcQSg== X-Received: by 2002:a0c:b450:: with SMTP id e16mr10885734qvf.25.1626450727784; Fri, 16 Jul 2021 08:52:07 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-a8ce-b25c-3933-5c80.res6.spectrum.com. [2603:6081:7b01:cbda:a8ce:b25c:3933:5c80]) by smtp.gmail.com with ESMTPSA id k6sm3325413qtg.78.2021.07.16.08.52.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Jul 2021 08:52:07 -0700 (PDT) Date: Fri, 16 Jul 2021 11:52:05 -0400 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List Subject: Re: [PATCH v2 13/16] tpm: Check outgoing command size Message-ID: <20210716155205.GR9379@bill-the-cat> References: <20210513193923.v2.1.I85633a7354c5b2ad5c55257607280392d069d70c@changeid> <20210514014011.2832707-11-sjg@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="magLDk5D4XGaUXcd" Content-Disposition: inline In-Reply-To: <20210514014011.2832707-11-sjg@chromium.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --magLDk5D4XGaUXcd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 13, 2021 at 07:39:29PM -0600, Simon Glass wrote: > In tpm_sendrecv_command() the command buffer is passed in. If a mistake is > somehow made in setting this up, the size could be out of range. Add a > sanity check for this. >=20 > Signed-off-by: Simon Glass > Reported-by: Coverity (CID: 331152) Applied to u-boot/master, thanks! --=20 Tom --magLDk5D4XGaUXcd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmDxqyUACgkQFHw5/5Y0 tyyk4gv/Q3Q5CL6xvY1EDopm2bqI/UM5eNKt/UTcr2tkOsfa3hPOwIleDXEOi/sl 778WrjPkkG1osPORAqlP8z+MSq/6XOWgnROlkLBguLQmSOhUhWqQ1s0nRjlXCZGb h4yyDnghFEGNOV3VYnZO031a15JN/Ov43TbMkd0BzOtpGHM9AfK51/zS1zfN//xp e2UGjypRw6k/F5+VRfEicqkp4hUoX/yEz1BFXYQICI8FYvoRFhJ3hKtIeR3VCoEi FxuwbcF3mmv1xawKuyjdl2duhT92EGqgFuxADfZP6+X2TgaGMkQy/HnTJXOzxqcZ JrZvpWtY6aL8EPEGwe6I6DyeWKFcherTVIdf7MH8fw2MQBNw0xkGGTc6dGlvNkJE jlvsgJwJTvTs/oKDVbNN4IBAPbCqvhUbYRipcqbxplFEznnVSEK1XXgRAm8Y/y/6 R9venWPcyDsUKvdZyxAPpXKaP6YKhsP9lBOojgWPspAtjiS14vUY7bwcfJtz17yk BlxUV1TK =D5p+ -----END PGP SIGNATURE----- --magLDk5D4XGaUXcd--