[PATCH v4 03/11] KEYS: trusted: Validate public_len before reading key attributes
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Nov 26 20:56:44 UTC 2026
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] KEYS: trusted: missing Fixes trailer for tpm2_load_cmd() bounds
check
--
commit 3494ad506e5fb0237e39afbd811ef50539770763
Author: Jarkko Sakkinen <jarkko at kernel.org>
> 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")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126205021.2200819-1-jarkko@kernel.org?part=3
More information about the Linux-security-module-archive
mailing list