linux/security/keys/trusted-keys
Jarkko Sakkinen 114f00d738 KEYS: trusted: Fix tpm2_load_cmd() boundary check
tpm2_load_cmd() does boundary checks against the ASN.1 size i.e.,
payload->blob_len. Address this by passing the decoded blob size to
tpm2_load_cmd(), and use it for the boundary checks.

Cc: stable@vger.kernel.org # v5.13+
Fixes: f221974525 ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")
Reported-by: co+6a581c4284f721d4@bugs.sh
Closes: https://bugs.sh/b/6a581c4284f721d4/
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Tested-by: Srish Srinivasan <ssrish@linux.ibm.com>
Link: https://lore.kernel.org/r/20260901205809.2028454-1-jarkko@kernel.org
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2026-09-12 00:43:45 +03:00
..
Kconfig KEYS: trusted: Debugging as a feature 2026-06-15 15:19:12 +03:00
Makefile keys/trusted_keys: establish PKWM as a trusted source 2026-01-30 09:27:26 +05:30
tpm2key.asn1 security: keys: trusted: use ASN.1 TPM2 key format for the blobs 2021-04-14 16:30:30 +03:00
trusted_caam.c KEYS: trusted: Debugging as a feature 2026-06-15 15:19:12 +03:00
trusted_core.c keys/trusted_keys: mark 'migratable' as __ro_after_init 2026-06-15 15:19:12 +03:00
trusted_dcp.c KEYS: trusted: dcp: fix key_len validation and calc_blob_len() return type 2026-07-23 18:23:23 +03:00
trusted_pkwm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
trusted_tee.c KEYS: trusted: Make use of tee bus methods 2026-01-07 08:14:53 +01:00
trusted_tpm1.c tpm-buf: Memory-safe allocations 2026-08-25 18:13:36 +03:00
trusted_tpm2.c KEYS: trusted: Fix tpm2_load_cmd() boundary check 2026-09-12 00:43:45 +03:00