Re: [PATCH] tpm: validate object type in tpm2_handle_mso()
From: Jarkko Sakkinen
Date: Sun Jul 07 2024 - 06:15:09 EST
On Sun Jul 7, 2024 at 4:09 AM EEST, Jarkko Sakkinen wrote:
> tpm2_handle_mso() lacks validation for the object type. Validate that
> value is one of the allowed values in order to detect errors.
>
> Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
> ---
Just something I spotted while fixing the other bug.
If an API that claims to return enum, the results would
better *only* be values from that enum.
Also this API is using alien acronym "MSO" for the enum
fields while the spec uses "HT".
BR, Jarkko