diff options
author | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-11-30 18:45:04 +0000 |
---|---|---|
committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-11-30 18:45:04 +0000 |
commit | d56eb40d135517e8d71c863657e7c0579a003d6c (patch) | |
tree | 44095bac4932a27d6f40239487cb8a607a8e2d6a /textproc/libxml2/files/patch-CVE-2020-24977 | |
parent | Upgrade to v0.10.0. (diff) |
textproc/libxml2: ship patches via files/ due to gitlab
- gitlab has a tendency to change checksum of patches due to metadata changes
- switch to including the patches in the tree directly instead of using PATCH_FILES
PR: 251040
Submitted by: daniel.engberg.lists@pyret.net
Reported by: David Armstrong <bink19th@pm.me>
Notes
Notes:
svn path=/head/; revision=556670
Diffstat (limited to 'textproc/libxml2/files/patch-CVE-2020-24977')
-rw-r--r-- | textproc/libxml2/files/patch-CVE-2020-24977 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/textproc/libxml2/files/patch-CVE-2020-24977 b/textproc/libxml2/files/patch-CVE-2020-24977 new file mode 100644 index 000000000000..b3121d980864 --- /dev/null +++ b/textproc/libxml2/files/patch-CVE-2020-24977 @@ -0,0 +1,36 @@ +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. +--- + xmllint.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/xmllint.c b/xmllint.c +index f6a8e463..c647486f 100644 +--- xmllint.c ++++ 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); +-- +GitLab + |