Skip to content

Commit 6e5eda2

Browse files
committed
libxslt: Patch CVE-2025-11731
1 parent b8ce79c commit 6e5eda2

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

textproc/libxslt/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# $NetBSD: Makefile,v 1.136 2024/11/14 22:21:52 wiz Exp $
22

3-
PKGREVISION= 1
3+
PKGREVISION= 2
44
.include "Makefile.common"
55

66
TOOL_DEPENDS+= docbook-xml-[0-9]*:../../textproc/docbook-xml

textproc/libxslt/distinfo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ $NetBSD: distinfo,v 1.74 2024/07/07 15:19:32 gutteridge Exp $
33
BLAKE2s (libxslt-1.1.43.tar.xz) = f5b46cbf27816b93b69f155844d0d08e7b1a2c35b5836012fa48e07f9a347435
44
SHA512 (libxslt-1.1.43.tar.xz) = 96110b0397a8f5791f489127574e2143845feb61bea0581d7b7e3c1101fd0718483bae81a7ce417b971bd678293bfd95daddad0dadd3e256c87d41a69faed85a
55
Size (libxslt-1.1.43.tar.xz) = 1518364 bytes
6+
SHA1 (patch-CVE-2025-11731) = 1cba0cf96ec4c6934a697fbd8136923c45ec2a95
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
$NetBSD$
2+
3+
Subject: [PATCH] End function node ancestor search at document
4+
5+
Avoids dereferencing a non-existent ->ns property on an
6+
XML_DOCUMENT_NODE pointer.
7+
8+
Fixes #151.
9+
10+
--- libexslt/functions.c.orig 2025-03-12 17:57:19.000000000 +0000
11+
+++ libexslt/functions.c
12+
@@ -617,8 +617,13 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodeP
13+
* instanciation of a func:result element.
14+
*/
15+
for (test = inst->parent; test != NULL; test = test->parent) {
16+
- if (IS_XSLT_ELEM(test) &&
17+
- IS_XSLT_NAME(test, "stylesheet")) {
18+
+ if (/* Traversal has reached the top-level document without
19+
+ * finding a func:function ancestor. */
20+
+ (test != NULL && test->type == XML_DOCUMENT_NODE) ||
21+
+ /* Traversal reached a stylesheet-namespace node,
22+
+ * and has left the function namespace. */
23+
+ (IS_XSLT_ELEM(test) &&
24+
+ IS_XSLT_NAME(test, "stylesheet"))) {
25+
xsltGenericError(xsltGenericErrorContext,
26+
"func:result element not a descendant "
27+
"of a func:function\n");

0 commit comments

Comments
 (0)