[PATCH v4 03/11] KEYS: trusted: Validate public_len before reading key attributes
Jarkko Sakkinen
jarkko at kernel.org
Thu Nov 26 21:01:21 UTC 2026
> > KEYS: trusted: Validate public_len before reading key attributes
> >
> > tpm2_load_cmd() reads the 32-bit objectAttributes field at pub + 4
> > without checking that public_len is at least 8 bytes. Reject blobs with
> > public_len < 8 before dereferencing pub + 4.
> >
> > Signed-off-by: Jarkko Sakkinen <jarkko at kernel.org>
>
> [Severity: Low]
> The unvalidated get_unaligned_be32(pub + 4) read in tpm2_load_cmd() was
> introduced by commit e5fb5d2c5a03 ("security: keys: trusted: Make sealed
> key properly interoperable"). Should the commit message include:
>
> Fixes: e5fb5d2c5a03 ("security: keys: trusted: Make sealed key properly interoperable")
Yeah, I think so, and it can be detached from the patch set, if it
receives reviewed-by tag.
Br, Jarkko
More information about the Linux-security-module-archive
mailing list