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: <20200617010546.GB5100@linux.intel.com>
Date:   Wed, 17 Jun 2020 04:05:46 +0300
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     amirmizi6@...il.com
Cc:     Eyal.Cohen@...oton.com, oshrialkoby85@...il.com,
        alexander.steffen@...ineon.com, robh+dt@...nel.org,
        peterhuewe@....de, christophe-h.richard@...com, jgg@...pe.ca,
        arnd@...db.de, gregkh@...uxfoundation.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-integrity@...r.kernel.org, oshri.alkoby@...oton.com,
        tmaimon77@...il.com, gcwilson@...ibm.com, kgoldman@...ibm.com,
        Dan.Morav@...oton.com, oren.tanami@...oton.com,
        shmulik.hager@...oton.com, amir.mizinski@...oton.com,
        Benoit Houyere <benoit.houyere@...com>
Subject: Re: [PATCH v10 2/8] tpm: tpm_tis: Fix expected bit handling and send
 all bytes in one shot without last byte in exception

On Wed, Jun 17, 2020 at 04:01:12AM +0300, Jarkko Sakkinen wrote:
> On Thu, Jun 04, 2020 at 04:47:07PM +0300, amirmizi6@...il.com wrote:
> > From: Amir Mizinski <amirmizi6@...il.com>
> > 
> > Detected the following incorrect implementation of the send command:
> > polling on the TPM_STS.stsValid field followed by checking the
> > TPM_STS.expect field only once. Since TPM_STS.stsValid represents the
> > TPM_STS.expect validity, both fields should be polled at the same time.
> > 
> > This fix modifies the signature of wait_for_tpm_stat(), adding an
> > additional "mask_result" parameter to its call. wait_for_tpm_stat() is now
> > polling the TPM_STS with a mask and waits for the value in mask_result.
> > The fix adds the ability to check if certain TPM_STS bits have been
> > cleared.
> > 
> > This change is also aligned to verifying the CRC on I2C TPM. The CRC
> > verification should be done after the TPM_STS.expect field is cleared
> > (TPM received all expected command bytes and set the calculated CRC value
> > in the register).
> > 
> > In addition, the send command was changed to comply with
> > TCG_DesignPrinciples_TPM2p0Driver_vp24_pubrev.pdf as follows:
> > - send all command bytes in one loop
> > - remove special handling of the last byte
> > 
> > Suggested-by: Benoit Houyere <benoit.houyere@...com>
> > Signed-off-by: Amir Mizinski <amirmizi6@...il.com>
> 
> Just wondering how did you come up with that name since you are not
> masking anything with 'mask_result'?

Maybe just rename it as 'stat'? That would make the whole thing a lot
less confusing looking I think.

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ