+50
−44
Loading
tpm2_read_public() has some rudimentary range checks but the function does not ensure that the response buffer has enough bytes for the full TPMT_HA payload. Re-implement the function with necessary checks and validation, and return name and name size for all handle types back to the caller. Cc: stable@vger.kernel.org # v6.10+ Fixes: d0a25bb9 ("tpm: Add HMAC session name/handle append") Signed-off-by:Jarkko Sakkinen <jarkko@kernel.org> Reviewed-by:
Jonathan McDowell <noodles@meta.com>