diff --git a/SOURCES/libxml2-2.11.0-fix-CVE-2023-39615.patch b/SOURCES/libxml2-2.11.0-fix-CVE-2023-39615.patch new file mode 100644 index 0000000..50fba55 --- /dev/null +++ b/SOURCES/libxml2-2.11.0-fix-CVE-2023-39615.patch @@ -0,0 +1,32 @@ +From d0c3f01e110d54415611c5fa0040cdf4a56053f9 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Sat, 6 May 2023 17:47:37 +0200 +Subject: [PATCH] parser: Fix old SAX1 parser with custom callbacks + +For some reason, xmlCtxtUseOptionsInternal set the start and end element +SAX handlers to the internal DOM builder functions when XML_PARSE_SAX1 +was specified. This means that custom SAX handlers could never work with +that flag because these functions would receive the wrong user data +argument and crash immediately. + +Fixes #535. +--- + parser.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/parser.c b/parser.c +index bb05791d3..0c8bed129 100644 +--- a/parser.c ++++ b/parser.c +@@ -14479,8 +14479,6 @@ xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encodi + } + #ifdef LIBXML_SAX1_ENABLED + if (options & XML_PARSE_SAX1) { +- ctxt->sax->startElement = xmlSAX2StartElement; +- ctxt->sax->endElement = xmlSAX2EndElement; + ctxt->sax->startElementNs = NULL; + ctxt->sax->endElementNs = NULL; + ctxt->sax->initialized = 1; +-- +GitLab + diff --git a/SPECS/libxml2.spec b/SPECS/libxml2.spec index 67c68d5..4007dcc 100644 --- a/SPECS/libxml2.spec +++ b/SPECS/libxml2.spec @@ -7,7 +7,7 @@ Name: libxml2 Version: 2.9.7 -Release: 16%{?dist}.1 +Release: 18%{?dist} Summary: Library providing XML and HTML support License: MIT @@ -56,10 +56,12 @@ Patch18: libxml2-2.9.7-CVE-2016-3709.patch Patch19: libxml2-2.9.7-CVE-2022-40303.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2136568 Patch20: libxml2-2.9.7-CVE-2022-40304.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=2186691 +# https://bugzilla.redhat.com/show_bug.cgi?id=2186692 Patch21: libxml2-2.9.13-CVE-2023-28484.patch Patch22: libxml2-2.9.13-CVE-2023-28484.2.patch Patch23: libxml2-2.9.7-CVE-2023-29469.patch +# https://issues.redhat.com/browse/RHEL-5179 +Patch24: libxml2-2.11.0-fix-CVE-2023-39615.patch BuildRequires: gcc BuildRequires: cmake-rpm-macros @@ -231,9 +233,12 @@ gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz %{python3_sitearch}/libxml2mod.so %changelog -* Fri Jul 14 2023 David King - 2.9.7-16.1 -- Fix CVE-2023-28484 (#2186691) -- Fix CVE-2023-29469 (#2186691) +* Thu Sep 14 2023 David King - 2.9.7-18 +- Fix CVE-2023-39615 (RHEL-5179) + +* Fri Jul 14 2023 David King - 2.9.7-17 +- Fix CVE-2023-28484 (#2186692) +- Fix CVE-2023-29469 (#2186692) * Wed Nov 02 2022 David King - 2.9.7-16 - Fix CVE-2022-40303 (#2136563)