diff --git a/SOURCES/openslp-2.0.0-cve-2017-17833.patch b/SOURCES/openslp-2.0.0-cve-2017-17833.patch new file mode 100644 index 0000000..eefce40 --- /dev/null +++ b/SOURCES/openslp-2.0.0-cve-2017-17833.patch @@ -0,0 +1,19 @@ +diff -up openslp-2.0.0/slpd/slpd_process.c.orig openslp-2.0.0/slpd/slpd_process.c +--- openslp-2.0.0/slpd/slpd_process.c.orig 2018-05-09 13:08:06.185104375 +0200 ++++ openslp-2.0.0/slpd/slpd_process.c 2018-05-09 13:07:21.017095089 +0200 +@@ -462,6 +462,15 @@ static int ProcessSrvRqst(SLPMessage * m + message->body.srvrqst.srvtype, 23, SLP_DA_SERVICE_TYPE) == 0) + { + errorcode = ProcessDASrvRqst(message, sendbuf, errorcode); ++ ++ if (result != *sendbuf) ++ { ++ // The pointer stored at *sendbuf can be modified by a realloc ++ // operation in ProcessDASrvRqst(). Fix up the local copy of ++ // that pointer if necessary. ++ result = *sendbuf; ++ } ++ + if (errorcode == 0) + { + /* Since we have an errorcode of 0, we were successful, diff --git a/SPECS/openslp.spec b/SPECS/openslp.spec index 9560cda..ff1b7b7 100644 --- a/SPECS/openslp.spec +++ b/SPECS/openslp.spec @@ -1,6 +1,6 @@ Name: openslp Version: 2.0.0 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 Summary: Open implementation of Service Location Protocol V2 @@ -20,6 +20,10 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Patch0: openslp-2.0.0-multicast-set.patch # Patch1: fixes buffer overflow, rhbz#1181474 Patch1: openslp-2.0.0-fortify-source-buffer-overflow.patch +# Patch2: fixes heap memory corruption in slpd/slpd_process.c, which allows +# denial of service or potentially code execution, +# backported form upstream, CVE-2017-17833 +Patch2: openslp-2.0.0-cve-2017-17833.patch BuildRequires: bison flex openssl-devel doxygen BuildRequires: automake libtool @@ -72,6 +76,7 @@ such applications. %setup -q %patch0 -p1 -b .multicast-set %patch1 -p1 -b .fortify-source-buffer-overflow +%patch2 -p1 -b .cve-2017-17833 %build @@ -152,6 +157,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jul 03 2018 Vitezslav Crhonek - 1:2.0.0-7 +- Fix possible heap memory corruption, CVE-2017-17833 + Resolves: #1575698 + * Tue Jun 28 2016 Vitezslav Crhonek - 1:2.0.0-6 - Fix buffer overflow termination of slpd with -D_FORTIFY_SOURCE=2 Resolves: #1181474