已合并
upgrade to upstream v2.12.5 #224
AtomGit-Bot创建于 2024年2月28日
upgrade to upstream v2.12.5 #224
已合并
AtomGit-Bot创建于 2024年2月28日
从refs/pull/224/head合入到master
共 7 个文件变更+8-928
@@ -1,74 +0,0 @@
1-From d39f78069dff496ec865c73aa44d7110e429bce9 Mon Sep 17 00:00:00 2001
2-From: Nick Wellnhofer <wellnhofer@aevum.de>
3-Date: Wed, 23 Aug 2023 20:24:24 +0200
4-Subject: [PATCH] tree: Fix copying of DTDs
5- 
6-- Don't create multiple DTD nodes.
7-- Fix UAF if malloc fails.
8-- Skip DTD nodes if tree module is disabled.
9- 
10-Fixes #583.
11----
12- tree.c | 31 ++++++++++++++++---------------
13- 1 file changed, 16 insertions(+), 15 deletions(-)
14- 
15-diff --git a/tree.c b/tree.c
16-index 6c8a875b..02c1b579 100644
17---- a/tree.c
18-+++ b/tree.c
19-@@ -4386,29 +4386,28 @@ xmlNodePtr
20- xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
21- xmlNodePtr ret = NULL;
22- xmlNodePtr p = NULL,q;
23-+ xmlDtdPtr newSubset = NULL;
24-
25- while (node != NULL) {
26--#ifdef LIBXML_TREE_ENABLED
27- if (node->type == XML_DTD_NODE ) {
28-- if (doc == NULL) {
29-+#ifdef LIBXML_TREE_ENABLED
30-+ if ((doc == NULL) || (doc->intSubset != NULL)) {
31- node = node->next;
32- continue;
33- }
34-- if (doc->intSubset == NULL) {
35-- q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
36-- if (q == NULL) goto error;
37-- q->doc = doc;
38-- q->parent = parent;
39-- doc->intSubset = (xmlDtdPtr) q;
40-- xmlAddChild(parent, q);
41-- } else {
42-- q = (xmlNodePtr) doc->intSubset;
43-- xmlAddChild(parent, q);
44-- }
45-- } else
46-+ q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
47-+ if (q == NULL) goto error;
48-+ q->doc = doc;
49-+ q->parent = parent;
50-+ newSubset = (xmlDtdPtr) q;
51-+#else
52-+ node = node->next;
53-+ continue;
54- #endif /* LIBXML_TREE_ENABLED */
55-+ } else {
56- q = xmlStaticCopyNode(node, doc, parent, 1);
57-- if (q == NULL) goto error;
58-+ if (q == NULL) goto error;
59-+ }
60- if (ret == NULL) {
61- q->prev = NULL;
62- ret = p = q;
63-@@ -4420,6 +4419,8 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
64- }
65- node = node->next;
66- }
67-+ if (newSubset != NULL)
68-+ doc->intSubset = newSubset;
69- return(ret);
70- error:
71- xmlFreeNodeList(ret);
72---
73-2.27.0
74- 
@@ -1,29 +0,0 @@
1-From 2b0aac140d739905c7848a42efc60bfe783a39b7 Mon Sep 17 00:00:00 2001
2-From: Nick Wellnhofer <wellnhofer@aevum.de>
3-Date: Sat, 14 Oct 2023 22:45:54 +0200
4-Subject: [PATCH] [CVE-2024-25062] xmlreader: Don't expand XIncludes when
5- backtracking
6- 
7-Fixes a use-after-free if XML Reader if used with DTD validation and
8-XInclude expansion.
9- 
10-Fixes #604.
11----
12- xmlreader.c | 1 +
13- 1 file changed, 1 insertion(+)
14- 
15-diff --git a/xmlreader.c b/xmlreader.c
16-index 979385a13..fefd68e0b 100644
17---- a/xmlreader.c
18-+++ b/xmlreader.c
19-@@ -1443,6 +1443,7 @@ node_found:
20- * Handle XInclude if asked for
21- */
22- if ((reader->xinclude) && (reader->in_xinclude == 0) &&
23-+ (reader->state != XML_TEXTREADER_BACKTRACK) &&
24- (reader->node != NULL) &&
25- (reader->node->type == XML_ELEMENT_NODE) &&
26- (reader->node->ns != NULL) &&
27---
28-GitLab
29- 
@@ -1,53 +0,0 @@
1-From fa993130f91a09c5b8d1454514a4ad44dd54f116 Mon Sep 17 00:00:00 2001
2-From: Nick Wellnhofer <wellnhofer@aevum.de>
3-Date: Sun, 30 Apr 2023 12:57:09 +0200
4-Subject: [PATCH] xpath: Remove remaining references to valueFrame
5- 
6-Fixes #529.
7----
8- include/libxml/xpath.h | 2 +-
9- include/libxml/xpathInternals.h | 2 +-
10- xpointer.c | 1 -
11- 3 files changed, 2 insertions(+), 3 deletions(-)
12- 
13-diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h
14-index b57985a2..6dae0780 100644
15---- a/include/libxml/xpath.h
16-+++ b/include/libxml/xpath.h
17-@@ -400,7 +400,7 @@ struct _xmlXPathParserContext {
18- int xptr; /* it this an XPointer expression */
19- xmlNodePtr ancestor; /* used for walking preceding axis */
20-
21-- int valueFrame; /* unused */
22-+ int valueFrame; /* always zero for compatibility */
23- };
24-
25- /************************************************************************
26-diff --git a/include/libxml/xpathInternals.h b/include/libxml/xpathInternals.h
27-index cb0991d7..870055f9 100644
28---- a/include/libxml/xpathInternals.h
29-+++ b/include/libxml/xpathInternals.h
30-@@ -297,7 +297,7 @@ XMLPUBFUN void *
31- if (ctxt == NULL) return; \
32- if (nargs != (x)) \
33- XP_ERROR(XPATH_INVALID_ARITY); \
34-- if (ctxt->valueNr < ctxt->valueFrame + (x)) \
35-+ if (ctxt->valueNr < (x)) \
36- XP_ERROR(XPATH_STACK_ERROR);
37-
38- /**
39-diff --git a/xpointer.c b/xpointer.c
40-index d8c18d7a..73514215 100644
41---- a/xpointer.c
42-+++ b/xpointer.c
43-@@ -1248,7 +1248,6 @@ xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) {
44- ctxt->valueNr = 0;
45- ctxt->valueMax = 10;
46- ctxt->value = NULL;
47-- ctxt->valueFrame = 0;
48- }
49- SKIP_BLANKS;
50- if (CUR == '/') {
51---
52-2.27.0
53- 
Binary files do not support preview
Binary files do not support preview
@@ -1,16 +1,12 @@
1Summary: Library providing XML and HTML support1Summary: Library providing XML and HTML support
2Name: libxml22Name: libxml2
3-Version: 2.11.53+Version: 2.12.5
4-Release: 24+Release: 1
5License: MIT5License: MIT
6Group: Development/Libraries6Group: Development/Libraries
7Source: https://download.gnome.org/sources/%{name}/2.11/%{name}-%{version}.tar.xz7Source: https://download.gnome.org/sources/%{name}/2.11/%{name}-%{version}.tar.xz
8 8 
9Patch0: libxml2-multilib.patch9Patch0: libxml2-multilib.patch
10-Patch1: backport-CVE-2023-45322.patch
11-Patch2: backport-xpath-Remove-remaining-references-to-valueFrame.patch
12-Patch3: backport-examples-Don-t-call-xmlCleanupParser-and-xmlMemoryDu.patch
13-Patch4: backport-CVE-2024-25062.patch
14 10 
15BuildRoot: %{_tmppath}/%{name}-%{version}-root11BuildRoot: %{_tmppath}/%{name}-%{version}-root
16BuildRequires: python3-devel12BuildRequires: python3-devel
@@ -162,6 +158,12 @@ rm -fr %{buildroot}
162 158 
163 159 
164%changelog160%changelog
161+* Wed Feb 28 2024 Zhipeng Xie <xiezhipeng1@huawei.com> - 2.12.5-1
162+- Type:enhancement
163+- CVE:NA
164+- SUG:NA
165+- DESC:upgrade to upstream v2.12.5
166+ 
165* Mon Feb 05 2024 Paul Thomas <paulthomas100199@gmail.com> - 2.11.5-2167* Mon Feb 05 2024 Paul Thomas <paulthomas100199@gmail.com> - 2.11.5-2
166- Type:CVE168- Type:CVE
167- CVE:CVE-2024-25062169- CVE:CVE-2024-25062