diff options
Diffstat (limited to 'meta/recipes-core/libxml/libxml2/CVE-2021-3516.patch')
-rw-r--r-- | meta/recipes-core/libxml/libxml2/CVE-2021-3516.patch | 36 |
1 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..287a171924 --- /dev/null +++ b/meta/recipes-core/libxml/libxml2/CVE-2021-3516.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From b76718876953e11bbd73dc6c9457323fd5aeda2e Mon Sep 17 00:00:00 2001 | ||
2 | From: Nick Wellnhofer <wellnhofer@aevum.de> | ||
3 | Date: Wed, 21 Apr 2021 13:23:27 +0200 | ||
4 | Subject: [PATCH 2/3] Fix use-after-free with `xmllint --html --push` | ||
5 | |||
6 | Call htmlCtxtUseOptions to make sure that names aren't stored in | ||
7 | dictionaries. | ||
8 | |||
9 | Note that this issue only affects xmllint using the HTML push parser. | ||
10 | |||
11 | Fixes #230. | ||
12 | |||
13 | CVE: CVE-2021-3516 | ||
14 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/1358d157d0bd83be1dfe356a69213df9fac0b539] | ||
15 | |||
16 | Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> | ||
17 | --- | ||
18 | xmllint.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/xmllint.c b/xmllint.c | ||
22 | index c0712674..ba66676b 100644 | ||
23 | --- a/xmllint.c | ||
24 | +++ b/xmllint.c | ||
25 | @@ -2204,7 +2204,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { | ||
26 | if (res > 0) { | ||
27 | ctxt = htmlCreatePushParserCtxt(NULL, NULL, | ||
28 | chars, res, filename, XML_CHAR_ENCODING_NONE); | ||
29 | - xmlCtxtUseOptions(ctxt, options); | ||
30 | + htmlCtxtUseOptions(ctxt, options); | ||
31 | while ((res = fread(chars, 1, pushsize, f)) > 0) { | ||
32 | htmlParseChunk(ctxt, chars, res, 0); | ||
33 | } | ||
34 | -- | ||
35 | 2.25.1 | ||
36 | |||