Resolves: RHEL-215674 Resolves: RHEL-215675 Resolves: RHEL-215676 Resolves: RHEL-215677 Resolves: RHEL-215678 Resolves: RHEL-215679 Resolves: RHEL-215680 Assisted-by: Ymir
65 lines
2.2 KiB
Diff
65 lines
2.2 KiB
Diff
From 742f080646e1825393ddd353e653c148eba96e40 Mon Sep 17 00:00:00 2001
|
|
From: Jakub Jelen <jjelen@redhat.com>
|
|
Date: Fri, 15 May 2026 17:01:21 +0200
|
|
Subject: [PATCH 1/2] CVE-2026-59847 libcrypto: Fix tag verification of AES-GCM
|
|
ciphers
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
EVP_DecryptFinal() returns 0 errors, which was wrongly checked since
|
|
its introduction.
|
|
|
|
Reported by Ben Smyth discuss@bensmyth.com
|
|
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Reviewed-by: Pavol Žáčik <pzacik@redhat.com>
|
|
(cherry picked from commit 6d6cb6cb4d1684bb3f2b9fd23f3635e79d1e5495)
|
|
---
|
|
src/libcrypto.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/libcrypto.c b/src/libcrypto.c
|
|
index c92b11e0..1376d404 100644
|
|
--- a/src/libcrypto.c
|
|
+++ b/src/libcrypto.c
|
|
@@ -924,7 +924,7 @@ evp_cipher_aead_decrypt(struct ssh_cipher_struct *cipher,
|
|
rc = EVP_DecryptFinal(cipher->ctx,
|
|
NULL,
|
|
&outlen);
|
|
- if (rc < 0) {
|
|
+ if (rc != 1 || outlen != 0) {
|
|
SSH_LOG(SSH_LOG_TRACE, "EVP_DecryptFinal failed: Failed authentication");
|
|
return SSH_ERROR;
|
|
}
|
|
|
|
From 4237a6bfe3322a4148506bdaf483e1aedb4d88d9 Mon Sep 17 00:00:00 2001
|
|
From: Jakub Jelen <jjelen@redhat.com>
|
|
Date: Mon, 18 May 2026 08:56:31 +0200
|
|
Subject: [PATCH 2/2] CVE-2026-59847 libcrypto: Fix symmetric issue during
|
|
encryption
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
Reviewed-by: Pavol Žáčik <pzacik@redhat.com>
|
|
(cherry picked from commit a5173c6ad249f7960bc7c1cc75a6a05ead8e3eba)
|
|
---
|
|
src/libcrypto.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/libcrypto.c b/src/libcrypto.c
|
|
index 1376d404..0e5f99fc 100644
|
|
--- a/src/libcrypto.c
|
|
+++ b/src/libcrypto.c
|
|
@@ -836,7 +836,7 @@ evp_cipher_aead_encrypt(struct ssh_cipher_struct *cipher,
|
|
rc = EVP_EncryptFinal(cipher->ctx,
|
|
NULL,
|
|
&tmplen);
|
|
- if (rc < 0) {
|
|
+ if (rc != 1) {
|
|
SSH_LOG(SSH_LOG_TRACE, "EVP_EncryptFinal failed: Failed to create a tag");
|
|
return;
|
|
}
|