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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 28 Feb 2023 04:41:03 +0200
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     "Limonciello, Mario" <Mario.Limonciello@....com>
Cc:     Peter Huewe <peterhuewe@....de>, Jason Gunthorpe <jgg@...pe.ca>,
        Dominik Brodowski <linux@...inikbrodowski.net>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        Thorsten Leemhuis <regressions@...mhuis.info>,
        James Bottomley <James.Bottomley@...senpartnership.com>,
        "Jason A . Donenfeld" <Jason@...c4.com>,
        "linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] tpm: disable hwrng for fTPM on some AMD designs

On Tue, Feb 28, 2023 at 02:37:59AM +0000, Limonciello, Mario wrote:
> [Public]
> 
> 
> 
> > -----Original Message-----
> > From: Limonciello, Mario
> > Sent: Monday, February 27, 2023 08:53
> > To: Peter Huewe <peterhuewe@....de>; Jarkko Sakkinen
> > <jarkko@...nel.org>; Jason Gunthorpe <jgg@...pe.ca>; Dominik Brodowski
> > <linux@...inikbrodowski.net>; Herbert Xu
> > <herbert@...dor.apana.org.au>
> > Cc: stable@...r.kernel.org; Thorsten Leemhuis
> > <regressions@...mhuis.info>; James Bottomley
> > <James.Bottomley@...senpartnership.com>; Jason A . Donenfeld
> > <Jason@...c4.com>; linux-integrity@...r.kernel.org; linux-
> > kernel@...r.kernel.org
> > Subject: Re: [PATCH v2] tpm: disable hwrng for fTPM on some AMD designs
> > 
> > On 2/20/23 12:07, Mario Limonciello wrote:
> > > AMD has issued an advisory indicating that having fTPM enabled in
> > > BIOS can cause "stuttering" in the OS.  This issue has been fixed
> > > in newer versions of the fTPM firmware, but it's up to system
> > > designers to decide whether to distribute it.
> > >
> > > This issue has existed for a while, but is more prevalent starting
> > > with kernel 6.1 because commit b006c439d58db ("hwrng: core - start
> > > hwrng kthread also for untrusted sources") started to use the fTPM
> > > for hwrng by default. However, all uses of /dev/hwrng result in
> > > unacceptable stuttering.
> > >
> > > So, simply disable registration of the defective hwrng when detecting
> > > these faulty fTPM versions.  As this is caused by faulty firmware, it
> > > is plausible that such a problem could also be reproduced by other TPM
> > > interactions, but this hasn't been shown by any user's testing or reports.
> > >
> > > It is hypothesized to be triggered more frequently by the use of the RNG
> > > because userspace software will fetch random numbers regularly.
> > >
> > > Intentionally continue to register other TPM functionality so that users
> > > that rely upon PCR measurements or any storage of data will still have
> > > access to it.  If it's found later that another TPM functionality is
> > > exacerbating this problem a module parameter it can be turned off entirely
> > > and a module parameter can be introduced to allow users who rely upon
> > > fTPM functionality to turn it on even though this problem is present.
> > >
> > > Link: https://www.amd.com/en/support/kb/faq/pa-410
> > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=216989
> > > Link: https://lore.kernel.org/all/20230209153120.261904-1-
> > Jason@...c4.com/
> > > Fixes: b006c439d58d ("hwrng: core - start hwrng kthread also for untrusted
> > sources")
> > > Cc: stable@...r.kernel.org
> > > Cc: Jarkko Sakkinen <jarkko@...nel.org>
> > > Cc: Thorsten Leemhuis <regressions@...mhuis.info>
> > > Cc: James Bottomley <James.Bottomley@...senpartnership.com>
> > > Co-developed-by: Jason A. Donenfeld <Jason@...c4.com>
> > > Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> > > Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> > > ---
> > > v1->v2:
> > >   * Minor style from Jarkko's feedback
> > >   * Move comment above function
> > >   * Explain further in commit message
> > 
> > One of the reporters on the kernel bugzilla did confirm the v2 patch,
> > forwarding their tag.
> > 
> > Tested-by: Bell <1138267643@...com>
> 
> Here's another tag.
> 
> Tested-by: reach622@...lcuk.com 

Thanks this tested-by can be in v3 because curly braces does not affect
semantics. I can ack that then and pick it up.

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ