mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 10:40:28 +09:00
CVE-2025-8277: mbedtls: Avoid leaking ecdh keys
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -182,7 +182,10 @@ void crypto_free(struct ssh_crypto_struct *crypto)
|
||||
#endif /* OPENSSL_VERSION_NUMBER */
|
||||
#elif defined HAVE_GCRYPT_ECC
|
||||
gcry_sexp_release(crypto->ecdh_privkey);
|
||||
#endif
|
||||
#elif defined HAVE_LIBMBEDCRYPTO
|
||||
mbedtls_ecp_keypair_free(crypto->ecdh_privkey);
|
||||
SAFE_FREE(crypto->ecdh_privkey);
|
||||
#endif /* HAVE_LIBGCRYPT */
|
||||
crypto->ecdh_privkey = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user