mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 12:50:30 +09:00
CVE-2025-5987 libcrypto: Correctly detect failures of chacha initialization
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
acb158e827
commit
bc4804aa9b
@@ -794,9 +794,9 @@ chacha20_poly1305_set_key(struct ssh_cipher_struct *cipher,
|
||||
SSH_LOG(SSH_LOG_TRACE, "EVP_CIPHER_CTX_new failed");
|
||||
goto out;
|
||||
}
|
||||
ret = EVP_EncryptInit_ex(ctx->header_evp, EVP_chacha20(), NULL,
|
||||
rv = EVP_EncryptInit_ex(ctx->header_evp, EVP_chacha20(), NULL,
|
||||
u8key + CHACHA20_KEYLEN, NULL);
|
||||
if (ret != 1) {
|
||||
if (rv != 1) {
|
||||
SSH_LOG(SSH_LOG_TRACE, "EVP_CipherInit failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user