Commit c6d2e202 authored by Jarkko Sakkinen's avatar Jarkko Sakkinen Committed by Greg Kroah-Hartman
Browse files

tpm: fix response size validation in tpm_get_random()



commit 84b59f64 upstream.

When checking whether the response is large enough to be able to contain
the received random bytes in tpm_get_random() and tpm2_get_random(),
they fail to take account the header size, which should be added to the
minimum size. This commit fixes this issue.

Cc: stable@vger.kernel.org
Fixes: c659af78 ("tpm: Check size of response before accessing data")
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e6d2f788
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment