From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB6EC37B032; Tue, 3 Mar 2026 21:32:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772573575; cv=none; b=ubQvvOaIKjeTCbZUl38NakCYGL6KP5LolcOXODC7N/MxbxOg2Xs0oei5uH0cx635FsnSJzp9yUy2TD8+DXGVLpWoniQTUiV/VQzNxGvEwJQpIKUaMrd4ZTsTdhSKXvL3FIh0bccmG5x9YbEisYoCGcn3QfpVUSb0xJJxsNYkypI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772573575; c=relaxed/simple; bh=HGXEN6CIIV2zc0hLkcO8+d7RGXuo+Dynxj/zp8BYXh0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bWq3ffGzxrZWzqy6Zpl0WygltpyUU64uXwGAwD1zpjcK7bc6BcjA6xrlgIdeCRrPuSxuLBcfJtRU+eHNBS3EzMQHp3nC55GS7z2NQANut5FZWpVDm1208MNcm9Kiuu4PYbF6E7yPP4fLUdljnp8h6Zz0KAGJ8/St8qbELvt3CRg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=peTwc7vm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="peTwc7vm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0F32C116C6; Tue, 3 Mar 2026 21:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772573575; bh=HGXEN6CIIV2zc0hLkcO8+d7RGXuo+Dynxj/zp8BYXh0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=peTwc7vmeZPXp0vNg8pyoNIdG4ZXDFlyUCDc1DLsKbd+QnIxy/UtxsgdMDikHttE4 btgAe3irhy4F305VS4IjjJYkkZE/foIW7neEg3Xleqlv+Pn+SDudoix61alrop/QH/ HVfmSkTI/9yMdo2B06eqNzQZJUm/wg/heJilMD9xlGlOgbNhLbZqk5gLyClCR/QAeu KUm4ffAVyiM9tlVxH+E0iBB1gCnQHx0juKJw6hKAjYUdkwZsiPwWvdbypWhIZ/DN7j laA0zZdv5Ik/cCUkZLXmDwaP7QfyHGBdZQ0vidBGQblnl26Nf6uMS5tT4aa4kx03bG 2ZLAOOmFE5A6A== Date: Tue, 3 Mar 2026 23:32:50 +0200 From: Jarkko Sakkinen To: Chris Fenner Cc: Mimi Zohar , linux-integrity@vger.kernel.org, Jonathan McDowell , Eric Biggers , James Bottomley , David Howells , Paul Moore , James Morris , "Serge E. Hallyn" , "open list:KEYS-TRUSTED" , "open list:SECURITY SUBSYSTEM" , open list , Roberto Sassu Subject: Re: [PATCH v9 01/11] KEYS: trusted: Use get_random-fallback for TPM Message-ID: References: <20260125192526.782202-1-jarkko@kernel.org> <20260125192526.782202-2-jarkko@kernel.org> <06a08cbbe47111a1795e5dcd42fb8cc4be643a72.camel@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Feb 20, 2026 at 10:30:26AM -0800, Chris Fenner wrote: > My conclusion about TCG_TPM2_HMAC after [1] and [2] was that > TPM2_TCG_HMAC doesn't (or didn't at the time) actually solve the > threat model it claims to (active interposer adversaries), while > dramatically increasing the cost of many kernel TPM activities beyond > the amount that would have been required to just solve for > passive/bus-sniffer interposer adversaries. The added symmetric crypto > required to secure a TPM transaction is almost not noticeable; the big > performance problem is the re-bootstrapping of the session with ECDH > for every command. > > My primary concern at that time was, essentially, that TCG_TPM2_HMAC > punts on checking that the key that was used to secure the session was > actually resident in a real TPM and not just an interposer adversary. > I wrote up my understanding at > https://www.dlp.rip/decorative-cryptography, for anyone who wants a > long-form opinionated take :). > > Unless I'm wrong, or TCG_TPM2_HMAC has changed dramatically since > August, I don't think "TPM2_TCG_HMAC makes this too costly" is a > compelling reason to make a security decision. (There could be other > reasons to make choices about whether to use the TPM as a source of > randomness in the kernel! This just isn't one IMHO.) > > The version of TCG_TPM2_HMAC that I'd like to see someday would be one > that fully admits that its threat model is only passive interposers, > and sets up one session upon startup and ContextSaves/ContextLoads it > back into the TPM as needed in order to secure parameter encryption > for e.g., GetRandom() and Unseal() calls. Neither agreeing nor disagreeing but this patch set clearly does not move forward and I spent already enough energy for this. For better ideas the patches are available in queue branch. High-level takes don't move anything forward (or backward), sorry. > > [1]: https://lore.kernel.org/linux-integrity/CAMigqh2nwuRRxaLyOJ+QaTJ+XGmkQj=rMj5K9GP1bCcXp2OsBQ@mail.gmail.com/ > [2]: https://lore.kernel.org/linux-integrity/20250825203223.629515-1-jarkko@kernel.org/ > > Thanks > Chris > > On Fri, Feb 20, 2026 at 10:04 AM Mimi Zohar wrote: > > > > [Cc: Chris Fenner, Jonathan McDowell, Roberto] > > > > On Sun, 2026-01-25 at 21:25 +0200, Jarkko Sakkinen wrote: > > > 1. tpm2_get_random() is costly when TCG_TPM2_HMAC is enabled and thus its > > > use should be pooled rather than directly used. This both reduces > > > latency and improves its predictability. > > > > If the concern is the latency of encrypting the bus session, please remember > > that: > > > > - Not all environments expose the TPM bus to sniffing. > > - The current TPM trusted keys design is based on TPM RNG, but already allows it > > to be replaced with the kernel RNG via the "trusted_rng=kernel" boot command > > line option. > > - The proposed patch removes that possibility for no reason. > > > > Mimi & Elaine > > > > BR, Jarkko