diff --git a/0001-Don-t-free-soptions-while-it-is-still-needed.patch b/0001-Don-t-free-soptions-while-it-is-still-needed.patch new file mode 100644 index 0000000..4cf96dc --- /dev/null +++ b/0001-Don-t-free-soptions-while-it-is-still-needed.patch @@ -0,0 +1,29 @@ +From c5270bde4dab84f18c347e82376ef00733865247 Mon Sep 17 00:00:00 2001 +From: Rob Crittenden +Date: Wed, 1 Jul 2020 10:46:50 -0400 +Subject: [PATCH] Don't free soptions while it is still needed + +Introduced in fbcf03dd44007a9b231e9396cc418a00e1a4b49a trying +to avoid leaking soptions and aoptions. + +https://pagure.io/certmonger/issue/163 +Signed-off-by: Rob Crittenden +--- + src/dogtag.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/dogtag.c b/src/dogtag.c +index 91c9c588..faf81f97 100644 +--- a/src/dogtag.c ++++ b/src/dogtag.c +@@ -579,7 +579,6 @@ main(int argc, const char **argv) + pin = NULL; + } + } +- free(soptions); + /* Add client creds. */ + if (uid != NULL) { + uid = cm_submit_u_url_encode(uid); +-- +2.25.4 + diff --git a/certmonger.spec b/certmonger.spec index a0cf949..42b68e7 100644 --- a/certmonger.spec +++ b/certmonger.spec @@ -26,7 +26,7 @@ Name: certmonger Version: 0.79.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Certificate status monitor and PKI enrollment client License: GPLv3+ @@ -34,6 +34,8 @@ URL: http://pagure.io/certmonger/ Source0: http://releases.pagure.org/certmonger/certmonger-%{version}.tar.gz #Source1: http://releases.pagure.org/certmonger/certmonger-%%{version}.tar.gz.sig +Patch0001: 0001-Don-t-free-soptions-while-it-is-still-needed.patch + BuildRequires: autoconf BuildRequires: automake @@ -244,6 +246,9 @@ exit 0 %endif %changelog +* Tue Jun 30 2020 Rob Crittenden - 0.79.11-2 +- Fix for an unnecessary free() which can cause core dump. + * Tue Jun 30 2020 Rob Crittenden - 0.79.11-1 - Update to upstream 0.79.11