Skip to content
Commit a0bcce2b authored by Dan Carpenter's avatar Dan Carpenter Committed by Jarkko Sakkinen
Browse files

tpm: Check for integer overflow in tpm2_map_response_body()



The "4 * be32_to_cpu(data->count)" multiplication can potentially
overflow which would lead to memory corruption.  Add a check for that.

Cc: stable@vger.kernel.org
Fixes: 745b361e ("tpm: infrastructure for TPM spaces")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
parent 4091c004
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment