diff options
author | jeff <jhatch@multitech.com> | 2023-01-24 09:37:57 -0600 |
---|---|---|
committer | jeff <jhatch@multitech.com> | 2023-01-24 09:37:57 -0600 |
commit | c94c9986362ebf4084734a3963415c5d894cf3a6 (patch) | |
tree | 1f5d79df115e23318d93bfc9e99dddecf9be8748 /recipes-core/libxml/libxml2/CVE-2020-24977.patch | |
parent | 8400520cffdd3c133c684eac60ab438a7ecaa050 (diff) | |
parent | 2eaa3fd064097eb221b56d5df0e7136ba705a0cd (diff) | |
download | meta-mlinux-c94c9986362ebf4084734a3963415c5d894cf3a6.tar.gz meta-mlinux-c94c9986362ebf4084734a3963415c5d894cf3a6.tar.bz2 meta-mlinux-c94c9986362ebf4084734a3963415c5d894cf3a6.zip |
Merge branch 'md/cve-fixes2-squashed' into 6
Diffstat (limited to 'recipes-core/libxml/libxml2/CVE-2020-24977.patch')
-rw-r--r-- | recipes-core/libxml/libxml2/CVE-2020-24977.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes-core/libxml/libxml2/CVE-2020-24977.patch b/recipes-core/libxml/libxml2/CVE-2020-24977.patch new file mode 100644 index 0000000..8224346 --- /dev/null +++ b/recipes-core/libxml/libxml2/CVE-2020-24977.patch @@ -0,0 +1,41 @@ +From 50f06b3efb638efb0abd95dc62dca05ae67882c2 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer <wellnhofer@aevum.de> +Date: Fri, 7 Aug 2020 21:54:27 +0200 +Subject: [PATCH] Fix out-of-bounds read with 'xmllint --htmlout' + +Make sure that truncated UTF-8 sequences don't cause an out-of-bounds +array access. + +Thanks to @SuhwanSong and the Agency for Defense Development (ADD) for +the report. + +Fixes #178. + +CVE: CVE-2020-24977 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/50f06b3efb638efb0abd95dc62dca05ae67882c2] + +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> +--- + xmllint.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/xmllint.c b/xmllint.c +index f6a8e463..c647486f 100644 +--- a/xmllint.c ++++ b/xmllint.c +@@ -528,6 +528,12 @@ static void + xmlHTMLEncodeSend(void) { + char *result; + ++ /* ++ * xmlEncodeEntitiesReentrant assumes valid UTF-8, but the buffer might ++ * end with a truncated UTF-8 sequence. This is a hack to at least avoid ++ * an out-of-bounds read. ++ */ ++ memset(&buffer[sizeof(buffer)-4], 0, 4); + result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer); + if (result) { + xmlGenericError(xmlGenericErrorContext, "%s", result); +-- +2.17.1 + |