[PATCH] tpm: validate object type in tpm2_handle_mso()

Jarkko Sakkinen jarkko at kernel.org
Sun Jul 7 10:14:53 UTC 2024


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 at kernel.org>
> ---

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




More information about the Linux-security-module-archive mailing list