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