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