summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Anusuri <vanusuri@mvista.com>2023-12-18 10:15:57 +0530
committerSteve Sakoman <steve@sakoman.com>2023-12-21 05:17:55 -1000
commit6b9d89ec0b8b1eed39d2c09de1f8b5e059292225 (patch)
treea5a0a73a9a24c472d1a6c6ea6dbf3f9e17af19dc
parentc7fbe91c2a2db78dd7ba44021ef972ec20da8b3a (diff)
downloadpoky-6b9d89ec0b8b1eed39d2c09de1f8b5e059292225.tar.gz
libxml2: Backport fix for CVE-2021-3516
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/1358d157d0bd83be1dfe356a69213df9fac0b539] (From OE-Core rev: 29c182375d91806d1e802b026f84b24e7c5d4b35) Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-core/libxml/libxml2/CVE-2021-3516.patch35
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.10.bb1
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2021-3516.patch b/meta/recipes-core/libxml/libxml2/CVE-2021-3516.patch
new file mode 100644
index 0000000000..200f42091e
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/CVE-2021-3516.patch
@@ -0,0 +1,35 @@
1From 1358d157d0bd83be1dfe356a69213df9fac0b539 Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Wed, 21 Apr 2021 13:23:27 +0200
4Subject: [PATCH] Fix use-after-free with `xmllint --html --push`
5
6Call htmlCtxtUseOptions to make sure that names aren't stored in
7dictionaries.
8
9Note that this issue only affects xmllint using the HTML push parser.
10
11Fixes #230.
12
13Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/1358d157d0bd83be1dfe356a69213df9fac0b539]
14CVE: CVE-2021-3516
15Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
16---
17 xmllint.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/xmllint.c b/xmllint.c
21index 6ca1bf54d..dbef273a8 100644
22--- a/xmllint.c
23+++ b/xmllint.c
24@@ -2213,7 +2213,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
25 if (res > 0) {
26 ctxt = htmlCreatePushParserCtxt(NULL, NULL,
27 chars, res, filename, XML_CHAR_ENCODING_NONE);
28- xmlCtxtUseOptions(ctxt, options);
29+ htmlCtxtUseOptions(ctxt, options);
30 while ((res = fread(chars, 1, pushsize, f)) > 0) {
31 htmlParseChunk(ctxt, chars, res, 0);
32 }
33--
34GitLab
35
diff --git a/meta/recipes-core/libxml/libxml2_2.9.10.bb b/meta/recipes-core/libxml/libxml2_2.9.10.bb
index 5eac864098..aa17cd8cca 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.10.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.10.bb
@@ -41,6 +41,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=te
41 file://CVE-2023-39615-pre.patch \ 41 file://CVE-2023-39615-pre.patch \
42 file://CVE-2023-39615-0001.patch \ 42 file://CVE-2023-39615-0001.patch \
43 file://CVE-2023-39615-0002.patch \ 43 file://CVE-2023-39615-0002.patch \
44 file://CVE-2021-3516.patch \
44 " 45 "
45 46
46SRC_URI[archive.sha256sum] = "593b7b751dd18c2d6abcd0c4bcb29efc203d0b4373a6df98e3a455ea74ae2813" 47SRC_URI[archive.sha256sum] = "593b7b751dd18c2d6abcd0c4bcb29efc203d0b4373a6df98e3a455ea74ae2813"