diff --git a/backport-CVE-2025-11731-End-function-node-ancestor-search-at-document.patch b/backport-CVE-2025-11731-End-function-node-ancestor-search-at-document.patch deleted file mode 100644 index cdd6b5d7fcd2ea7f543e645d5f8b41e7272418a7..0000000000000000000000000000000000000000 --- a/backport-CVE-2025-11731-End-function-node-ancestor-search-at-document.patch +++ /dev/null @@ -1,36 +0,0 @@ -From fe508f201efb9ea37bfbe95413b8b28251497de3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= -Date: Wed, 27 Aug 2025 14:28:40 +0300 -Subject: [PATCH] End function node ancestor search at document - -Avoids dereferencing a non-existent ->ns property on an -XML_DOCUMENT_NODE pointer. - -Fixes #151. ---- - libexslt/functions.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/libexslt/functions.c b/libexslt/functions.c -index 8d35a7ae..a54ee70c 100644 ---- a/libexslt/functions.c -+++ b/libexslt/functions.c -@@ -617,8 +617,13 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst, - * instanciation of a func:result element. - */ - for (test = inst->parent; test != NULL; test = test->parent) { -- if (IS_XSLT_ELEM(test) && -- IS_XSLT_NAME(test, "stylesheet")) { -+ if (/* Traversal has reached the top-level document without -+ * finding a func:function ancestor. */ -+ (test != NULL && test->type == XML_DOCUMENT_NODE) || -+ /* Traversal reached a stylesheet-namespace node, -+ * and has left the function namespace. */ -+ (IS_XSLT_ELEM(test) && -+ IS_XSLT_NAME(test, "stylesheet"))) { - xsltGenericError(xsltGenericErrorContext, - "func:result element not a descendant " - "of a func:function\n"); --- -2.33.0 - diff --git a/backport-CVE-2025-7424.patch b/backport-CVE-2025-7424.patch deleted file mode 100644 index 62a34fa61d397ce697ecca77654258ba5d9a1af7..0000000000000000000000000000000000000000 --- a/backport-CVE-2025-7424.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 345d6826d0eae6f0a962456b8ed6f6a1bad0877d Mon Sep 17 00:00:00 2001 -From: David Kilzer -Date: Sat, 24 May 2025 15:06:42 -0700 -Subject: [PATCH] libxslt: Type confusion in xmlNode.psvi between stylesheet - and source nodes - -* libxslt/functions.c: -(xsltDocumentFunctionLoadDocument): -- Implement fix suggested by Ivan Fratric. This copies the xmlDoc, - calls xsltCleanupSourceDoc() to remove pvsi fields, then adds the - xmlDoc to tctxt->docList. -- Add error handling for functions that may return NULL. -* libxslt/transform.c: -- Remove static keyword so this can be called from - xsltDocumentFunctionLoadDocument(). -* libxslt/transformInternals.h: Add. -(xsltCleanupSourceDoc): Add declaration. - -Fixes #139. ---- - libxslt/functions.c | 16 +++++++++++++++- - libxslt/transform.c | 3 ++- - libxslt/transformInternals.h | 9 +++++++++ - 3 files changed, 26 insertions(+), 2 deletions(-) - create mode 100644 libxslt/transformInternals.h - -diff --git a/libxslt/functions.c b/libxslt/functions.c -index 72a58dc4..11ec039f 100644 ---- a/libxslt/functions.c -+++ b/libxslt/functions.c -@@ -34,6 +34,7 @@ - #include "numbersInternals.h" - #include "keys.h" - #include "documents.h" -+#include "transformInternals.h" - - #ifdef WITH_XSLT_DEBUG - #define WITH_XSLT_DEBUG_FUNCTION -@@ -125,7 +126,20 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, - /* - * This selects the stylesheet's doc itself. - */ -- doc = tctxt->style->doc; -+ doc = xmlCopyDoc(tctxt->style->doc, 1); -+ if (doc == NULL) { -+ xsltTransformError(tctxt, NULL, NULL, -+ "document() : failed to copy style doc\n"); -+ goto out_fragment; -+ } -+ xsltCleanupSourceDoc(doc); /* Remove psvi fields. */ -+ idoc = xsltNewDocument(tctxt, doc); -+ if (idoc == NULL) { -+ xsltTransformError(tctxt, NULL, NULL, -+ "document() : failed to create xsltDocument\n"); -+ xmlFreeDoc(doc); -+ goto out_fragment; -+ } - } else { - goto out_fragment; - } -diff --git a/libxslt/transform.c b/libxslt/transform.c -index 54ef821b..38c2dce6 100644 ---- a/libxslt/transform.c -+++ b/libxslt/transform.c -@@ -43,6 +43,7 @@ - #include "xsltlocale.h" - #include "pattern.h" - #include "transform.h" -+#include "transformInternals.h" - #include "variables.h" - #include "numbersInternals.h" - #include "namespaces.h" -@@ -5757,7 +5758,7 @@ xsltCountKeys(xsltTransformContextPtr ctxt) - * - * Resets source node flags and ids stored in 'psvi' member. - */ --static void -+void - xsltCleanupSourceDoc(xmlDocPtr doc) { - xmlNodePtr cur = (xmlNodePtr) doc; - void **psviPtr; -diff --git a/libxslt/transformInternals.h b/libxslt/transformInternals.h -new file mode 100644 -index 00000000..d0f42823 ---- /dev/null -+++ b/libxslt/transformInternals.h -@@ -0,0 +1,9 @@ -+/* -+ * Summary: set of internal interfaces for the XSLT engine transformation part. -+ * -+ * Copy: See Copyright for the status of this software. -+ * -+ * Author: David Kilzer -+ */ -+ -+void xsltCleanupSourceDoc(xmlDocPtr doc); --- -2.39.5 (Apple Git-154) - diff --git a/huawei-add-autogen.sh-for-fuzz-compile.patch b/huawei-add-autogen.sh-for-fuzz-compile.patch deleted file mode 100644 index 58a7b6c28857d45d274ce659ac404b27b3aa9758..0000000000000000000000000000000000000000 --- a/huawei-add-autogen.sh-for-fuzz-compile.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 732d799ff0ce3ad15ddb7b6d2fb6ad6706d2d9fc Mon Sep 17 00:00:00 2001 -From: jinsaihang -Date: Wed, 23 Jul 2025 11:18:43 +0800 -Subject: [PATCH] add autogen.sh for fuzz compile - ---- - autogen.sh | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 77 insertions(+) - create mode 100644 autogen.sh - -diff --git a/autogen.sh b/autogen.sh -new file mode 100644 -index 0000000..9c1c466 ---- /dev/null -+++ b/autogen.sh -@@ -0,0 +1,77 @@ -+#!/bin/sh -+# Run this to generate all the initial makefiles, etc. -+ -+srcdir=`dirname $0` -+test -z "$srcdir" && srcdir=. -+ -+THEDIR=`pwd` -+cd $srcdir -+DIE=0 -+ -+(autoconf --version) < /dev/null > /dev/null 2>&1 || { -+ echo -+ echo "You must have autoconf installed to compile libxslt." -+ echo "Download the appropriate package for your distribution," -+ echo "or see http://www.gnu.org/software/autoconf" -+ DIE=1 -+} -+ -+(libtoolize --version) < /dev/null > /dev/null 2>&1 || -+(glibtoolize --version) < /dev/null > /dev/null 2>&1 || { -+ echo -+ echo "You must have libtool installed to compile libxslt." -+ echo "Download the appropriate package for your distribution," -+ echo "or see http://www.gnu.org/software/libtool" -+ DIE=1 -+} -+ -+(automake --version) < /dev/null > /dev/null 2>&1 || { -+ echo -+ DIE=1 -+ echo "You must have automake installed to compile libxslt." -+ echo "Download the appropriate package for your distribution," -+ echo "or see http://www.gnu.org/software/automake" -+} -+ -+if test "$DIE" -eq 1; then -+ exit 1 -+fi -+ -+test -f libxslt/xslt.h || { -+ echo "You must run this script in the top-level libxslt directory" -+ exit 1 -+} -+ -+if test -z "$NOCONFIGURE" && test -z "$*"; then -+ echo "I am going to run $srcdir/configure with no arguments - if you wish " -+ echo "to pass any to it, please specify them on the $0 command line." -+fi -+ -+autoreconf -if -Wall -+ -+cd $THEDIR -+ -+if test x$OBJ_DIR != x; then -+ mkdir -p "$OBJ_DIR" -+ cd "$OBJ_DIR" -+fi -+ -+EXTRA_ARGS= -+if test "x$1" = "x--system"; then -+ shift -+ prefix=/usr -+ libdir=$prefix/lib -+ sysconfdir=/etc -+ localstatedir=/var -+ if [ -d /usr/lib64 ]; then -+ libdir=$prefix/lib64 -+ fi -+ EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir" -+fi -+ -+if test -z "$NOCONFIGURE"; then -+ echo "Running configure $EXTRA_ARGS $*" ... -+ $srcdir/configure $EXTRA_ARGS "$@" -+ echo -+ echo "Now type 'make' to compile libxslt." -+fi --- -2.43.0 - diff --git a/libxslt-1.1.43.tar.xz b/libxslt-1.1.43.tar.xz deleted file mode 100644 index 324fcb06c1a09fd349134be6dc91e3901324ef7f..0000000000000000000000000000000000000000 Binary files a/libxslt-1.1.43.tar.xz and /dev/null differ diff --git a/libxslt-1.1.45.tar.xz b/libxslt-1.1.45.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..a33eb2ef6af08a7cbb17d4ad2a856894ac92e0a7 Binary files /dev/null and b/libxslt-1.1.45.tar.xz differ diff --git a/libxslt-downgrade-libxml2-req.patch b/libxslt-downgrade-libxml2-req.patch new file mode 100644 index 0000000000000000000000000000000000000000..a6ba2355b9e442a5670bb6d73716506d0c1adad3 --- /dev/null +++ b/libxslt-downgrade-libxml2-req.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index 4a12495..21636f3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ LIBXSLT_MICRO_VERSION=MICRO_VERSION + LIBEXSLT_MAJOR_VERSION=0 + LIBEXSLT_MINOR_VERSION=8 + LIBEXSLT_MICRO_VERSION=25 +-LIBXML_REQUIRED_VERSION=2.15.1 ++LIBXML_REQUIRED_VERSION=2.6.27 + + + LIBXSLT_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION.$LIBXSLT_MICRO_VERSION diff --git a/libxslt.spec b/libxslt.spec index 479491a9e63a6d28154c19270193f6d32e4a02b8..a7ef5aa4b7f30b485d109afabd56f731e102abaf 100644 --- a/libxslt.spec +++ b/libxslt.spec @@ -1,21 +1,19 @@ Name: libxslt -Version: 1.1.43 -Release: 5 +Version: 1.1.45 +Release: 1 Summary: XSLT Transformation Library License: MIT URL: https://gitlab.gnome.org/GNOME/libxslt Source0: https://download.gnome.org/sources/%{name}/1.1/%{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM bug-fix https://github.com/GNOME/libxslt/ Patch0: CVE-2015-9019.patch -Patch1: backport-CVE-2025-7424.patch Patch2: backport-CVE-2025-10911.patch -Patch3: backport-CVE-2025-11731-End-function-node-ancestor-search-at-document.patch -Patch9001:huawei-add-autogen.sh-for-fuzz-compile.patch +Patch9001: libxslt-downgrade-libxml2-req.patch BuildRequires: gcc make libtool autoconf automake libgcrypt-devel pkgconfig(libxml-2.0) >= 2.6.27 cmake-rpm-macros Provides: xsltproc = %{version}-%{release} -Requires: libxml2 >= %(rpm -q --queryformat="%%{VERSION}" libxml2) +Requires: libxml2 >= %{installed_version_of libxml2} %description Libxslt is the XSLT C library developed for the GNOME project @@ -63,7 +61,7 @@ autoreconf -vfi pushd $RPM_BUILD_ROOT/%{_includedir}/%{name}; touch -m --reference=xslt.h ../../bin/xslt-config;popd %check -%make_build tests +%make_build check %files %doc NEWS README.md FEATURES AUTHORS @@ -98,6 +96,9 @@ pushd $RPM_BUILD_ROOT/%{_includedir}/%{name}; touch -m --reference=xslt.h ../../ %{_mandir}/man3/* %changelog +* Sun Nov 30 2025 Funda Wang - 1.1.45-1 +- update to 1.1.45 + * Tue Oct 14 2025 fuanan - 1.1.43-5 - fix CVE-2025-11731