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