summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/libxml/libxml2/CVE-2023-39615-0001.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/libxml/libxml2/CVE-2023-39615-0001.patch')
-rw-r--r--meta/recipes-core/libxml/libxml2/CVE-2023-39615-0001.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2023-39615-0001.patch b/meta/recipes-core/libxml/libxml2/CVE-2023-39615-0001.patch
new file mode 100644
index 0000000000..9689cec67d
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/CVE-2023-39615-0001.patch
@@ -0,0 +1,36 @@
1From d0c3f01e110d54415611c5fa0040cdf4a56053f9 Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Sat, 6 May 2023 17:47:37 +0200
4Subject: [PATCH] parser: Fix old SAX1 parser with custom callbacks
5
6For some reason, xmlCtxtUseOptionsInternal set the start and end element
7SAX handlers to the internal DOM builder functions when XML_PARSE_SAX1
8was specified. This means that custom SAX handlers could never work with
9that flag because these functions would receive the wrong user data
10argument and crash immediately.
11
12Fixes #535.
13
14Upstream-Status: Backport from [https://gitlab.gnome.org/GNOME/libxml2/-/commit/d0c3f01e110d54415611c5fa0040cdf4a56053f9]
15CVE: CVE-2023-39615
16Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
17---
18 parser.c | 2 --
19 1 file changed, 2 deletions(-)
20
21diff --git a/parser.c b/parser.c
22index 6e09208..7814e6e 100644
23--- a/parser.c
24+++ b/parser.c
25@@ -15156,8 +15156,6 @@ xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encodi
26 }
27 #ifdef LIBXML_SAX1_ENABLED
28 if (options & XML_PARSE_SAX1) {
29- ctxt->sax->startElement = xmlSAX2StartElement;
30- ctxt->sax->endElement = xmlSAX2EndElement;
31 ctxt->sax->startElementNs = NULL;
32 ctxt->sax->endElementNs = NULL;
33 ctxt->sax->initialized = 1;
34--
352.24.4
36