Dan Carpenter a0bcce2b2a 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: 745b361e989a ("tpm: infrastructure for TPM spaces")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2021-10-26 05:03:33 +03:00
..
2021-09-01 09:51:16 -07:00
2018-06-05 11:24:55 -07:00
2021-04-05 08:43:50 +02:00
2021-05-21 10:09:30 +02:00
2021-06-04 15:35:03 +02:00
2021-06-04 15:35:03 +02:00
2021-07-27 12:17:21 +02:00