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]
Date:   Thu, 11 Jul 2019 14:17:26 -0300
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Douglas Anderson <dianders@...omium.org>, stable@...r.kernel.org,
        groeck@...omium.org, sukhomlinov@...gle.com,
        jarkko.sakkinen@...ux.intel.com, Arnd Bergmann <arnd@...db.de>,
        Peter Huewe <peterhuewe@....de>, linux-kernel@...r.kernel.org,
        linux-integrity@...r.kernel.org
Subject: Re: [PATCH] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM
 operations

On Thu, Jul 11, 2019 at 07:04:37PM +0200, Greg KH wrote:
> On Thu, Jul 11, 2019 at 01:39:15PM -0300, Jason Gunthorpe wrote:
> > On Thu, Jul 11, 2019 at 09:29:19AM -0700, Douglas Anderson wrote:
> > > From: Vadim Sukhomlinov <sukhomlinov@...gle.com>
> > > 
> > > commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 upstream.
> > > 
> > > TPM 2.0 Shutdown involve sending TPM2_Shutdown to TPM chip and disabling
> > > future TPM operations. TPM 1.2 behavior was different, future TPM
> > > operations weren't disabled, causing rare issues. This patch ensures
> > > that future TPM operations are disabled.
> > > 
> > > Fixes: d1bd4a792d39 ("tpm: Issue a TPM2_Shutdown for TPM2 devices.")
> > > Cc: stable@...r.kernel.org
> > > Signed-off-by: Vadim Sukhomlinov <sukhomlinov@...gle.com>
> > > [dianders: resolved merge conflicts with mainline]
> > > Signed-off-by: Douglas Anderson <dianders@...omium.org>
> > > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
> > > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
> > > This is the backport of the patch referenced above to 4.19 as was done
> > > in Chrome OS.  See <https://crrev.com/c/1495114> for details.  It
> > > presumably applies to some older kernels.  NOTE that the problem
> > > itself has existed for a long time, but continuing to backport this
> > > exact solution to super old kernels is out of scope for me.  For those
> > > truly interested feel free to reference the past discussion [1].
> > > 
> > > Reason for backport: mainline has commit a3fbfae82b4c ("tpm: take TPM
> > > chip power gating out of tpm_transmit()") and commit 719b7d81f204
> > > ("tpm: introduce tpm_chip_start() and tpm_chip_stop()") and it didn't
> > > seem like a good idea to backport 17 patches to avoid the conflict.
> > 
> > Careful with this, you can't backport this to any kernels that don't
> > have the sysfs ops locking changes or they will crash in sysfs code.
> 
> And what commit added that?

commit 2677ca98ae377517930c183248221f69f771c921
Author: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Date:   Sun Nov 4 11:38:27 2018 +0200

    tpm: use tpm_try_get_ops() in tpm-sysfs.c.
    
    Use tpm_try_get_ops() in tpm-sysfs.c so that we can consider moving
    other decorations (locking, localities, power management for example)
    inside it. This direction can be of course taken only after other call
    sites for tpm_transmit() have been treated in the same way.

The last sentence suggests there are other patches needed too though..

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ