lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160425184845.GA15368@intel.com>
Date:	Mon, 25 Apr 2016 21:48:45 +0300
From:	Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc:	Peter Huewe <peterhuewe@....de>,
	linux-security-module@...r.kernel.org,
	Stefan Berger <stefanb@...ux.vnet.ibm.com>,
	Marcel Selhorst <tpmdd@...horst.net>,
	"moderated list:TPM DEVICE DRIVER" 
	<tpmdd-devel@...ts.sourceforge.net>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tpm: check for TPM_CHIP_FLAG_TPM2 before calling
 tpm2_shutdown()

On Mon, Apr 25, 2016 at 11:57:20AM -0600, Jason Gunthorpe wrote:
> On Mon, Apr 25, 2016 at 12:21:30PM +0300, Jarkko Sakkinen wrote:
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
> > Reported-by: Stefan Berger <stefanb@...ux.vnet.ibm.com>
> >  drivers/char/tpm/tpm-chip.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Reviewed-By: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
> Fixes: 20e0152393b41 ("tpm: fix crash in tpm_tis deinitialization")

Thanks and thanks for the fixes line (forgot to add it) :)

/Jarkko

> > diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
> > index a12db8e..1965dc7 100644
> > +++ b/drivers/char/tpm/tpm-chip.c
> > @@ -270,7 +270,8 @@ static void tpm_del_char_device(struct tpm_chip *chip)
> >  
> >  	/* Make the driver uncallable. */
> >  	down_write(&chip->ops_sem);
> > -	tpm2_shutdown(chip, TPM2_SU_CLEAR);
> > +	if (chip->flags & TPM_CHIP_FLAG_TPM2)
> > +		tpm2_shutdown(chip, TPM2_SU_CLEAR);
> >  	chip->ops = NULL;
> >  	up_write(&chip->ops_sem);
> >  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ