Re: [PATCH v8 08/17] tpm: call tpm2_flush_space() on error in tpm_try_transmit()

2018-11-19 Thread Jarkko Sakkinen
On Sun, Nov 18, 2018 at 06:21:57PM -0500, Sasha Levin wrote: > There's no "preferred" approach really. I try to warn about cases like > this early because the response rates to Greg's "FAILED" email seem to > be low - by the time they are sent out people are done with that code > and have moved on.

Re: [PATCH v8 08/17] tpm: call tpm2_flush_space() on error in tpm_try_transmit()

2018-11-18 Thread Sasha Levin
On Sun, Nov 18, 2018 at 09:36:18AM +0200, Jarkko Sakkinen wrote: On Fri, Nov 16, 2018 at 11:19:57AM -0500, Sasha Levin wrote: On Fri, Nov 16, 2018 at 02:38:32PM +0200, Jarkko Sakkinen wrote: > Always call tpm2_flush_space() on failure in tpm_try_transmit() so that > the volatile memory of the TP

Re: [PATCH v8 08/17] tpm: call tpm2_flush_space() on error in tpm_try_transmit()

2018-11-17 Thread Jarkko Sakkinen
On Fri, Nov 16, 2018 at 11:19:57AM -0500, Sasha Levin wrote: > On Fri, Nov 16, 2018 at 02:38:32PM +0200, Jarkko Sakkinen wrote: > > Always call tpm2_flush_space() on failure in tpm_try_transmit() so that > > the volatile memory of the TPM gets cleared. If /dev/tpm0 does not have > > sufficient perm

Re: [PATCH v8 08/17] tpm: call tpm2_flush_space() on error in tpm_try_transmit()

2018-11-16 Thread Sasha Levin
On Fri, Nov 16, 2018 at 02:38:32PM +0200, Jarkko Sakkinen wrote: Always call tpm2_flush_space() on failure in tpm_try_transmit() so that the volatile memory of the TPM gets cleared. If /dev/tpm0 does not have sufficient permissions (usually it has), this could lead to the leakage of TPM objects.