tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Roberto Sassu <roberto.sassu@huawei.com>
To: tpmdd-devel@lists.sourceforge.net
Cc: linux-ima-devel@lists.sourceforge.net,
	linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Roberto Sassu <roberto.sassu@huawei.com>
Subject: [PATCH 0/3] tpm: retrieve digest size of unknown algorithms from TPM
Date: Mon, 25 Sep 2017 13:19:47 +0200	[thread overview]
Message-ID: <20170925111950.21511-1-roberto.sassu@huawei.com> (raw)

This patch set derives from a larger patch set which modifies the TPM
driver API in order to extend a PCR with multiple digests. It can be
retrieved at the URL:

https://sourceforge.net/p/tpmdd/mailman/message/35905412/


The TPM driver currently relies on the crypto subsystem to determine the
digest size of supported TPM algorithms. In the future, TPM vendors might
implement new algorithms in their chips, and those algorithms might not
be supported by the crypto subsystem.

Usually, vendors provide patches for the new hardware, and likely
the crypto subsystem will be updated before the new algorithm is
introduced. However, old kernels might be updated later, after patches
are included in the mainline kernel. This would leave the opportunity
for attackers to misuse PCRs, as PCR banks with an unknown algorithm
are not extended.

This patch set provides a long term solution for this issue. If a TPM
algorithm is not known by the crypto subsystem, the TPM driver retrieves
the digest size from the TPM with a PCR read. All the PCR banks are
extended, even if the algorithm is not yet supported by the crypto
subsystem.

Roberto Sassu (3):
  tpm: move PCR read code to static function tpm2_pcr_read_common()
  tpm: retrieve digest size of unknown algorithms with PCR read
  tpm: add the crypto algorithm identifier to active_bank_info

 drivers/char/tpm/tpm-interface.c |  4 +-
 drivers/char/tpm/tpm.h           |  2 +-
 drivers/char/tpm/tpm2-cmd.c      | 91 +++++++++++++++++++++++++++++-----------
 include/linux/tpm.h              |  6 +++
 4 files changed, 76 insertions(+), 27 deletions(-)

-- 
2.9.3

             reply	other threads:[~2017-09-25 11:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 11:19 Roberto Sassu [this message]
2017-09-25 11:19 ` [PATCH 1/3] tpm: move PCR read code to static function tpm2_pcr_read_common() Roberto Sassu
2017-10-04 10:45   ` Jarkko Sakkinen
2017-09-25 11:19 ` [PATCH 2/3] tpm: retrieve digest size of unknown algorithms with PCR read Roberto Sassu
2017-10-04 11:12   ` Jarkko Sakkinen
2017-09-25 11:19 ` [PATCH 3/3] tpm: add the crypto algorithm identifier to active_bank_info Roberto Sassu
2017-10-04 11:22   ` Jarkko Sakkinen
2017-10-04  7:32 ` [PATCH 0/3] tpm: retrieve digest size of unknown algorithms from TPM Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170925111950.21511-1-roberto.sassu@huawei.com \
    --to=roberto.sassu@huawei.com \
    --cc=linux-ima-devel@lists.sourceforge.net \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=tpmdd-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).