Skip to content
Commit 71005a1d authored by Jo Van Bulck's avatar Jo Van Bulck Committed by Greg Kroah-Hartman
Browse files

selftests/sgx: Fix uninitialized pointer dereference in error path



[ Upstream commit 79eba8c9 ]

Ensure ctx is zero-initialized, such that the encl_measure function will
not call EVP_MD_CTX_destroy with an uninitialized ctx pointer in case of an
early error during key generation.

Fixes: 2adcba79 ("selftests/x86: Add a selftest for SGX")
Signed-off-by: default avatarJo Van Bulck <jo.vanbulck@cs.kuleuven.be>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Acked-by: default avatarKai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/all/20231005153854.25566-2-jo.vanbulck%40cs.kuleuven.be


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ff168d4f
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