251d0b
From 0095b8a6b09173ab5eb48611dc0233d2a6337dc1 Mon Sep 17 00:00:00 2001
251d0b
From: Petr Mensik <pemensik@redhat.com>
251d0b
Date: Tue, 20 Sep 2022 11:21:45 +0200
251d0b
Subject: [PATCH] Fix CVE-2022-38177
251d0b
251d0b
5961.	[security]	Fix memory leak in ECDSA verify processing.
251d0b
			(CVE-2022-38177) [GL #3487]
251d0b
---
251d0b
 lib/dns/opensslecdsa_link.c | 2 +-
251d0b
 1 file changed, 1 insertion(+), 1 deletion(-)
251d0b
251d0b
diff --git a/lib/dns/opensslecdsa_link.c b/lib/dns/opensslecdsa_link.c
251d0b
index 83b5b51..7576e04 100644
251d0b
--- a/lib/dns/opensslecdsa_link.c
251d0b
+++ b/lib/dns/opensslecdsa_link.c
251d0b
@@ -224,7 +224,7 @@ opensslecdsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
251d0b
 		siglen = DNS_SIG_ECDSA384SIZE;
251d0b
 
251d0b
 	if (sig->length != siglen)
251d0b
-		return (DST_R_VERIFYFAILURE);
251d0b
+		DST_RET(DST_R_VERIFYFAILURE);
251d0b
 
251d0b
 	if (!EVP_DigestFinal_ex(evp_md_ctx, digest, &dgstlen))
251d0b
 		DST_RET (dst__openssl_toresult3(dctx->category,
251d0b
-- 
251d0b
2.37.3
251d0b