[poky][sumo][PATCH] libxml2: add patch for CVE-2019-19956
From: Rahul Taya <hidden>
Date: 2021-01-06 10:53:33
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Rahul Taya <redacted> Fixes memory leak. https://security-tracker.debian.org/tracker/CVE-2019-19956 https://gitlab.gnome.org/GNOME/libxml2/commit/5a02583c7e683896d84878bd90641d8d9b0d0549 Signed-off-by: Rahul.Taya <redacted> --- .../libxml/libxml2/CVE-2019-19956.patch | 29 +++++++++++++++++++ meta/recipes-core/libxml/libxml2_2.9.7.bb | 1 + 2 files changed, 30 insertions(+) create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2019-19956.patch
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2019-19956.patch b/meta/recipes-core/libxml/libxml2/CVE-2019-19956.patch
new file mode 100644
index 0000000000..8dd9dd82db
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/CVE-2019-19956.patch@@ -0,0 +1,29 @@ +Fix memory leak in xmlParseBalancedChunkMemoryRecover + +When doc is NULL, namespace created in xmlTreeEnsureXMLDecl +is bind to newDoc->oldNs, in this case, set newDoc->oldNs to +NULL and free newDoc will cause a memory leak. + +Found with libFuzzer. + +Closes #82. + +https://security-tracker.debian.org/tracker/CVE-2019-19956 +https://gitlab.gnome.org/GNOME/libxml2/commit/5a02583c7e683896d84878bd90641d8d9b0d0549 + +Upstream-Status: Backport [http://security.debian.org/debian-security/pool/updates/main/libx/libxml2/libxml2_2.9.1+dfsg1-5+deb8u8.debian.tar.xz] + +CVE: CVE-2019-19956 + +--- libxml2-2.9.1+dfsg1.orig/parser.c ++++ libxml2-2.9.1+dfsg1/parser.c +@@ -13892,7 +13892,8 @@ xmlParseBalancedChunkMemoryRecover(xmlDo + xmlFreeParserCtxt(ctxt); + newDoc->intSubset = NULL; + newDoc->extSubset = NULL; +- newDoc->oldNs = NULL; ++ if(doc != NULL) ++ newDoc->oldNs = NULL; + xmlFreeDoc(newDoc); + + return(ret);
diff --git a/meta/recipes-core/libxml/libxml2_2.9.7.bb b/meta/recipes-core/libxml/libxml2_2.9.7.bb
index c749a81657..7c1fa4ceb3 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.7.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.7.bb@@ -22,6 +22,7 @@ SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \ file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \ file://fix-execution-of-ptests.patch \ file://CVE-2018-14404.patch \ + file://CVE-2019-19956.patch \ " SRC_URI[libtar.md5sum] = "896608641a08b465098a40ddf51cefba" --
2.17.1 This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.