From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarkko Sakkinen Subject: Re: [PATCH v2] tpm: tpm_transmit() does not check for minimum buffer size. Date: Mon, 12 Sep 2016 23:16:06 +0300 Message-ID: <20160912201606.GB8889@intel.com> References: <1473677010-13737-1-git-send-email-jarkko.sakkinen@linux.intel.com> <20160912173219.GA5843@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160912173219.GA5843-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jason Gunthorpe Cc: "moderated list:TPM DEVICE DRIVER" , open list List-Id: tpmdd-devel@lists.sourceforge.net On Mon, Sep 12, 2016 at 11:32:19AM -0600, Jason Gunthorpe wrote: > On Mon, Sep 12, 2016 at 01:43:30PM +0300, Jarkko Sakkinen wrote: > > tpm_transmit() does not check that bufsiz is at least TPM_HEADER_SIZE > > before accessing data. This commit adds the check and returns -ENOMEM. > > -EINVAL > > > v2: Updated commit msg > > After the diffstat, do not commit that to the tree Duh, right. Thanks. > Jason /Jarkko ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755942AbcILUQJ (ORCPT ); Mon, 12 Sep 2016 16:16:09 -0400 Received: from mga06.intel.com ([134.134.136.31]:27253 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753958AbcILUQH (ORCPT ); Mon, 12 Sep 2016 16:16:07 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,324,1470726000"; d="scan'208";a="7958358" Date: Mon, 12 Sep 2016 23:16:06 +0300 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: Peter Huewe , Marcel Selhorst , "moderated list:TPM DEVICE DRIVER" , open list Subject: Re: [PATCH v2] tpm: tpm_transmit() does not check for minimum buffer size. Message-ID: <20160912201606.GB8889@intel.com> References: <1473677010-13737-1-git-send-email-jarkko.sakkinen@linux.intel.com> <20160912173219.GA5843@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160912173219.GA5843@obsidianresearch.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 12, 2016 at 11:32:19AM -0600, Jason Gunthorpe wrote: > On Mon, Sep 12, 2016 at 01:43:30PM +0300, Jarkko Sakkinen wrote: > > tpm_transmit() does not check that bufsiz is at least TPM_HEADER_SIZE > > before accessing data. This commit adds the check and returns -ENOMEM. > > -EINVAL > > > v2: Updated commit msg > > After the diffstat, do not commit that to the tree Duh, right. Thanks. > Jason /Jarkko