From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarkko Sakkinen Subject: Re: [PATCH] tpm: fix buffer overflow in /dev/tpm0 Date: Sun, 11 Sep 2016 21:57:37 +0300 Message-ID: <20160911185737.GA13353@intel.com> References: <1473596340-11376-1-git-send-email-jarkko.sakkinen@linux.intel.com> <20160911125142.GA20191@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160911125142.GA20191-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Peter Huewe Cc: "moderated list:TPM DEVICE DRIVER" , open list List-Id: tpmdd-devel@lists.sourceforge.net On Sun, Sep 11, 2016 at 03:51:42PM +0300, Jarkko Sakkinen wrote: > On Sun, Sep 11, 2016 at 03:19:00PM +0300, Jarkko Sakkinen wrote: > > tpm_write() does not check whether the buffer has at least enough space > > for the header before passing it to tpm_transmit() so an overflow can > > happen. > > > > Signed-off-by: Jarkko Sakkinen > > This is usable neither as read nor write primitive for an exploit. Still > it makes sense to validate the input here. Cannot add fixes line for this one as it's from pre-GIT times... /Jarkko ------------------------------------------------------------------------------