summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libxslt
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
commit8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch)
treeefdc32587159d0050a69009bdf2330a531727d95 /meta/recipes-support/libxslt
parentd412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff)
downloadpoky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz
The poky repository master branch is no longer being updated.
You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libxslt')
-rw-r--r--meta/recipes-support/libxslt/files/gnome-libxslt-bug-139-apple-fix.diff103
-rw-r--r--meta/recipes-support/libxslt/libxslt_1.1.43.bb57
2 files changed, 0 insertions, 160 deletions
diff --git a/meta/recipes-support/libxslt/files/gnome-libxslt-bug-139-apple-fix.diff b/meta/recipes-support/libxslt/files/gnome-libxslt-bug-139-apple-fix.diff
deleted file mode 100644
index c7220ab954..0000000000
--- a/meta/recipes-support/libxslt/files/gnome-libxslt-bug-139-apple-fix.diff
+++ /dev/null
@@ -1,103 +0,0 @@
1From 345d6826d0eae6f0a962456b8ed6f6a1bad0877d Mon Sep 17 00:00:00 2001
2From: David Kilzer <ddkilzer@apple.com>
3Date: Sat, 24 May 2025 15:06:42 -0700
4Subject: [PATCH] libxslt: Type confusion in xmlNode.psvi between stylesheet
5 and source nodes
6
7* libxslt/functions.c:
8(xsltDocumentFunctionLoadDocument):
9- Implement fix suggested by Ivan Fratric. This copies the xmlDoc,
10 calls xsltCleanupSourceDoc() to remove pvsi fields, then adds the
11 xmlDoc to tctxt->docList.
12- Add error handling for functions that may return NULL.
13* libxslt/transform.c:
14- Remove static keyword so this can be called from
15 xsltDocumentFunctionLoadDocument().
16* libxslt/transformInternals.h: Add.
17(xsltCleanupSourceDoc): Add declaration.
18
19Fixes #139.
20
21CVE: CVE-2025-7424
22Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/libxslt/-/issues/139]
23Signed-off-by: Ross Burton <ross.burton@arm.com>
24---
25 libxslt/functions.c | 16 +++++++++++++++-
26 libxslt/transform.c | 3 ++-
27 libxslt/transformInternals.h | 9 +++++++++
28 3 files changed, 26 insertions(+), 2 deletions(-)
29 create mode 100644 libxslt/transformInternals.h
30
31diff --git a/libxslt/functions.c b/libxslt/functions.c
32index 72a58dc4..11ec039f 100644
33--- a/libxslt/functions.c
34+++ b/libxslt/functions.c
35@@ -34,6 +34,7 @@
36 #include "numbersInternals.h"
37 #include "keys.h"
38 #include "documents.h"
39+#include "transformInternals.h"
40
41 #ifdef WITH_XSLT_DEBUG
42 #define WITH_XSLT_DEBUG_FUNCTION
43@@ -125,7 +126,20 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt,
44 /*
45 * This selects the stylesheet's doc itself.
46 */
47- doc = tctxt->style->doc;
48+ doc = xmlCopyDoc(tctxt->style->doc, 1);
49+ if (doc == NULL) {
50+ xsltTransformError(tctxt, NULL, NULL,
51+ "document() : failed to copy style doc\n");
52+ goto out_fragment;
53+ }
54+ xsltCleanupSourceDoc(doc); /* Remove psvi fields. */
55+ idoc = xsltNewDocument(tctxt, doc);
56+ if (idoc == NULL) {
57+ xsltTransformError(tctxt, NULL, NULL,
58+ "document() : failed to create xsltDocument\n");
59+ xmlFreeDoc(doc);
60+ goto out_fragment;
61+ }
62 } else {
63 goto out_fragment;
64 }
65diff --git a/libxslt/transform.c b/libxslt/transform.c
66index 54ef821b..38c2dce6 100644
67--- a/libxslt/transform.c
68+++ b/libxslt/transform.c
69@@ -43,6 +43,7 @@
70 #include "xsltlocale.h"
71 #include "pattern.h"
72 #include "transform.h"
73+#include "transformInternals.h"
74 #include "variables.h"
75 #include "numbersInternals.h"
76 #include "namespaces.h"
77@@ -5757,7 +5758,7 @@ xsltCountKeys(xsltTransformContextPtr ctxt)
78 *
79 * Resets source node flags and ids stored in 'psvi' member.
80 */
81-static void
82+void
83 xsltCleanupSourceDoc(xmlDocPtr doc) {
84 xmlNodePtr cur = (xmlNodePtr) doc;
85 void **psviPtr;
86diff --git a/libxslt/transformInternals.h b/libxslt/transformInternals.h
87new file mode 100644
88index 00000000..d0f42823
89--- /dev/null
90+++ b/libxslt/transformInternals.h
91@@ -0,0 +1,9 @@
92+/*
93+ * Summary: set of internal interfaces for the XSLT engine transformation part.
94+ *
95+ * Copy: See Copyright for the status of this software.
96+ *
97+ * Author: David Kilzer <ddkilzer@apple.com>
98+ */
99+
100+void xsltCleanupSourceDoc(xmlDocPtr doc);
101--
1022.39.5 (Apple Git-154)
103
diff --git a/meta/recipes-support/libxslt/libxslt_1.1.43.bb b/meta/recipes-support/libxslt/libxslt_1.1.43.bb
deleted file mode 100644
index 3393be7ebe..0000000000
--- a/meta/recipes-support/libxslt/libxslt_1.1.43.bb
+++ /dev/null
@@ -1,57 +0,0 @@
1SUMMARY = "GNOME XSLT library"
2DESCRIPTION = "libxslt is the XSLT C parser and toolkit developed for the Gnome project. \
3XSLT itself is a an XML language to define transformation for XML. Libxslt is based on \
4libxml2 the XML C library developed for the GNOME project. It also implements most of \
5the EXSLT set of processor-portable extensions functions and some of Saxon's evaluate \
6and expressions extensions."
7HOMEPAGE = "http://xmlsoft.org/XSLT/"
8BUGTRACKER = "https://bugzilla.gnome.org/"
9
10LICENSE = "MIT"
11LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
12
13SECTION = "libs"
14DEPENDS = "libxml2"
15
16SRC_URI = "https://download.gnome.org/sources/libxslt/1.1/libxslt-${PV}.tar.xz \
17 file://gnome-libxslt-bug-139-apple-fix.diff"
18
19SRC_URI[sha256sum] = "5a3d6b383ca5afc235b171118e90f5ff6aa27e9fea3303065231a6d403f0183a"
20
21UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
22
23S = "${UNPACKDIR}/libxslt-${PV}"
24
25BINCONFIG = "${bindir}/xslt-config"
26
27inherit autotools pkgconfig binconfig-disabled lib_package multilib_header
28
29do_configure:prepend () {
30 # We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header.
31 # This can be removed when upgrading to 1.1.34.
32 sed -i -e 's/ansidecl.h//' ${S}/configure.ac
33
34 # The timestamps in the 1.1.28 tarball are messed up causing this file to
35 # appear out of date. Touch it so that we don't try to regenerate it.
36 touch ${S}/doc/xsltproc.1
37}
38
39EXTRA_OECONF = "--without-python --without-debug --without-crypto"
40# older versions of this recipe had ${PN}-utils
41RPROVIDES:${PN}-bin += "${PN}-utils"
42RCONFLICTS:${PN}-bin += "${PN}-utils"
43RREPLACES:${PN}-bin += "${PN}-utils"
44
45# This is only needed until libxml can load the relocated catalog itself
46do_install:append:class-native () {
47 create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog
48}
49
50do_install:append () {
51 oe_multilib_header libxslt/xsltconfig.h
52}
53
54FILES:${PN} += "${libdir}/libxslt-plugins"
55FILES:${PN}-dev += "${libdir}/xsltConf.sh"
56
57BBCLASSEXTEND = "native nativesdk"