[PATCH v11 0/3] tpm: robust stack allocations

Jarkko Sakkinen jarkko at kernel.org
Wed Sep 24 01:31:44 UTC 2025


On Tue, Sep 23, 2025 at 08:07:41PM +0300, Jarkko Sakkinen wrote:
> 1. These are previous changes to tpm_buf, which make stack allocations
>    much more feasible than previously.
> 2. Migrate low-hanging fruit to use stack allocations.
> 3. Re-orchestrate tpm_get_random().
> 
> Jarkko Sakkinen (3):
>   tpm: Make TPM buffer allocations more robust
>   tpm: Use TPM_MIN_BUF_SIZE in driver commands
>   tpm orchestrate tpm_get_random() in the function

I'm quite soon sending v12 because I randomly noticed a resource
over-cosumption bug. which could be theoretically triggered e.g.
via interposing a bus or a faulty device: tpm2_get_pcr_allocation()
does not have a hard limit for the number of PCR banks.

The fix:

https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/commit/?h=tpm-buf&id=3d92f14c204d09babadaa0b7c7a82c40d11696d0

It does a bit of extra (out of scope) grouping those related
constants but I'd like to keep it that way (should not cause
much harm in the context of merge conflicts).

BR, Jarkko



More information about the Linux-security-module-archive mailing list