Re: [PATCH 6.12.y] tpm: fix off-by-four bounds check in tpm2_get_random()

From: Jarkko Sakkinen

Date: Mon Oct 05 2026 - 15:20:31 EST


On Mon, Oct 05, 2026 at 09:50:27AM -0400, Sasha Levin wrote:
> > Fix this by checking the response length against 'offset', which
> > already includes the skipped parameter size field.
>
> Queued for 6.12, thanks.
>
> --
> Thanks,
> Sasha

Phew, good to hear, thank you!

There might be for some time more than usual merge conflicts in TPM
driver given making tpm_buf memory layout flat for the sake of being
able to use __free for of its allocations, and thus completely
prevent any possible memory leaks from transient buffers.

Right, and also merge conflicts could happen also in trusted keys.

They are cheap to fix and I'll monitor this situation proactively,
and try to react fast.

Br, Jarkko