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: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NJarkko Sakkinen <jarkko@kernel.org> Signed-off-by: NJarkko Sakkinen <jarkko@kernel.org>
Showing
想要评论请 注册 或 登录