summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/libxml/libxml2/CVE-2022-49043.patch38
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.14.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2022-49043.patch b/meta/recipes-core/libxml/libxml2/CVE-2022-49043.patch
new file mode 100644
index 0000000000..25c7bc847c
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/CVE-2022-49043.patch
@@ -0,0 +1,38 @@
1From 5a19e21605398cef6a8b1452477a8705cb41562b Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Wed, 2 Nov 2022 16:13:27 +0100
4Subject: [PATCH] malloc-fail: Fix use-after-free in xmlXIncludeAddNode
5
6Found with libFuzzer, see #344.
7
8Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/5a19e21605398cef6a8b1452477a8705cb41562b]
9CVE: CVE-2022-49043
10Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
11---
12 xinclude.c | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-)
14
15diff --git a/xinclude.c b/xinclude.c
16index e5fdf0f..36fa8ec 100644
17--- a/xinclude.c
18+++ b/xinclude.c
19@@ -612,14 +612,15 @@ xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
20 }
21 URL = xmlSaveUri(uri);
22 xmlFreeURI(uri);
23- xmlFree(URI);
24 if (URL == NULL) {
25 xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
26 "invalid value URI %s\n", URI);
27 if (fragment != NULL)
28 xmlFree(fragment);
29+ xmlFree(URI);
30 return(-1);
31 }
32+ xmlFree(URI);
33
34 if (xmlStrEqual(URL, ctxt->doc->URL))
35 local = 1;
36--
372.25.1
38
diff --git a/meta/recipes-core/libxml/libxml2_2.9.14.bb b/meta/recipes-core/libxml/libxml2_2.9.14.bb
index 94b3b510ae..ecaae0b436 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.14.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.14.bb
@@ -33,6 +33,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar;subdir=${BP};name=testt
33 file://CVE-2023-45322-2.patch \ 33 file://CVE-2023-45322-2.patch \
34 file://CVE-2024-25062.patch \ 34 file://CVE-2024-25062.patch \
35 file://CVE-2024-34459.patch \ 35 file://CVE-2024-34459.patch \
36 file://CVE-2022-49043.patch \
36 " 37 "
37 38
38SRC_URI[archive.sha256sum] = "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee" 39SRC_URI[archive.sha256sum] = "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee"