From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Parthiban" <parthiban@linumiz.com>,
<James.Bottomley@HansenPartnership.com>
Cc: <linux-integrity@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<peterhuewe@gmx.de>, <jgg@ziepe.ca>
Subject: Re: SLB9670 TPM module crash
Date: Sat, 18 May 2024 14:25:24 +0300 [thread overview]
Message-ID: <D1CQEN4ROQFK.1NHMZGCIL1YC5@kernel.org> (raw)
In-Reply-To: <7955419c-ccc2-4a20-8ff5-07b119258415@linumiz.com>
On Sat May 18, 2024 at 2:21 PM EEST, Parthiban wrote:
> Dear James Bottomley,
>
> The following crash is observed in the current mainline kernel and I have tried the
> git bisect to narrow it down. Bisect points to the below commit, which got merged as
> part of [1]. I tried reverting the below commit and the TPM loads fine.
>
> commit 1b6d7f9eb150305dcb0da4f7101a8d30dcdf0497
> Author: James Bottomley <James.Bottomley@HansenPartnership.com>
> Date: Mon Apr 29 16:28:07 2024 -0400
>
> tpm: add session encryption protection to tpm2_get_random()
>
> If some entity is snooping the TPM bus, they can see the random
> numbers we're extracting from the TPM and do prediction attacks
> against their consumers. Foil this attack by using response
> encryption to prevent the attacker from seeing the random sequence.
>
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> Tested-by: Jarkko Sakkinen <jarkko@kernel.org>
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
>
> drivers/char/tpm/tpm2-cmd.c | 21 +++++++++++++++++----
> 1 file changed, 17 insertions(+), 4 deletions(-)
>
> [ 11.551988] tpm_tis_spi spi0.1: 2.0 TPM (device-id 0x1B, rev-id 22)
> [ 11.563036] spi_master spi0: will run message pump with realtime priority
Explanation and workaround: https://lore.kernel.org/linux-integrity/D1C1KL7Q27P9.39BH0Z4EMBBUG@kernel.org/
James, this must be fixed by:
diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
index 7c0486e3199c..2d9e2c860ad9 100644
--- a/drivers/char/tpm/Kconfig
+++ b/drivers/char/tpm/Kconfig
@@ -34,7 +34,7 @@ if TCG_TPM
config TCG_TPM2_HMAC
bool "Use HMAC and encrypted transactions on the TPM bus"
- default y
+ default n
select CRYPTO_ECDH
select CRYPTO_LIB_AESCFB
select CRYPTO_LIB_SHA256
Distributors know how to enable this but given the high volumes of small
devices still with TPM, this trend needs to be cutted.
BR, Jarkko
BR, Jarkko
next prev parent reply other threads:[~2024-05-18 11:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-18 11:21 Parthiban
2024-05-18 11:25 ` Jarkko Sakkinen [this message]
2024-05-18 11:27 ` 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=D1CQEN4ROQFK.1NHMZGCIL1YC5@kernel.org \
--to=jarkko@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=parthiban@linumiz.com \
--cc=peterhuewe@gmx.de \
/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
all inboxes | Powered by JetHome®