mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 03:32:13 +02:00
libxml2: fix CVE-2021-3516
Fixes use-after-free in xmlEncodeEntitiesInternal() in entities.c
CVE: CVE-2021-3516
Upstream-Status: Backport [1358d157d0]
(From OE-Core rev: 490cddd7baf1aacb814128b611aabf82fda3e77b)
Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
bbc1b0ebf7
commit
cb3bc91a03
36
meta/recipes-core/libxml/libxml2/CVE-2021-3516.patch
Normal file
36
meta/recipes-core/libxml/libxml2/CVE-2021-3516.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From b76718876953e11bbd73dc6c9457323fd5aeda2e Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Wed, 21 Apr 2021 13:23:27 +0200
|
||||
Subject: [PATCH 2/3] Fix use-after-free with `xmllint --html --push`
|
||||
|
||||
Call htmlCtxtUseOptions to make sure that names aren't stored in
|
||||
dictionaries.
|
||||
|
||||
Note that this issue only affects xmllint using the HTML push parser.
|
||||
|
||||
Fixes #230.
|
||||
|
||||
CVE: CVE-2021-3516
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/1358d157d0bd83be1dfe356a69213df9fac0b539]
|
||||
|
||||
Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
|
||||
---
|
||||
xmllint.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xmllint.c b/xmllint.c
|
||||
index c0712674..ba66676b 100644
|
||||
--- a/xmllint.c
|
||||
+++ b/xmllint.c
|
||||
@@ -2204,7 +2204,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
||||
if (res > 0) {
|
||||
ctxt = htmlCreatePushParserCtxt(NULL, NULL,
|
||||
chars, res, filename, XML_CHAR_ENCODING_NONE);
|
||||
- xmlCtxtUseOptions(ctxt, options);
|
||||
+ htmlCtxtUseOptions(ctxt, options);
|
||||
while ((res = fread(chars, 1, pushsize, f)) > 0) {
|
||||
htmlParseChunk(ctxt, chars, res, 0);
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -25,6 +25,7 @@ SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
|
||||
file://CVE-2020-24977.patch \
|
||||
file://fix-python39.patch \
|
||||
file://CVE-2021-3517.patch \
|
||||
file://CVE-2021-3516.patch \
|
||||
"
|
||||
|
||||
SRC_URI[libtar.md5sum] = "10942a1dc23137a8aa07f0639cbfece5"
|
||||
|
||||
Reference in New Issue
Block a user