summaryrefslogtreecommitdiff
path: root/textproc/libxml2/files/patch-CVE-2020-7595
diff options
context:
space:
mode:
authorTobias C. Berner <tcberner@FreeBSD.org>2020-11-30 18:45:04 +0000
committerTobias C. Berner <tcberner@FreeBSD.org>2020-11-30 18:45:04 +0000
commitd56eb40d135517e8d71c863657e7c0579a003d6c (patch)
tree44095bac4932a27d6f40239487cb8a607a8e2d6a /textproc/libxml2/files/patch-CVE-2020-7595
parentUpgrade 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-7595')
-rw-r--r--textproc/libxml2/files/patch-CVE-2020-759532
1 files changed, 32 insertions, 0 deletions
diff --git a/textproc/libxml2/files/patch-CVE-2020-7595 b/textproc/libxml2/files/patch-CVE-2020-7595
new file mode 100644
index 000000000000..5bcd916ade7f
--- /dev/null
+++ b/textproc/libxml2/files/patch-CVE-2020-7595
@@ -0,0 +1,32 @@
+From 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 Mon Sep 17 00:00:00 2001
+From: Zhipeng Xie <xiezhipeng1@huawei.com>
+Date: Thu, 12 Dec 2019 17:30:55 +0800
+Subject: [PATCH] Fix infinite loop in xmlStringLenDecodeEntities
+
+When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef
+return NULL which cause a infinite loop in xmlStringLenDecodeEntities
+
+Found with libFuzzer.
+
+Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
+---
+ parser.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/parser.c b/parser.c
+index d1c31963..a34bb6cd 100644
+--- parser.c
++++ parser.c
+@@ -2646,7 +2646,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+ else
+ c = 0;
+ while ((c != 0) && (c != end) && /* non input consuming loop */
+- (c != end2) && (c != end3)) {
++ (c != end2) && (c != end3) &&
++ (ctxt->instate != XML_PARSER_EOF)) {
+
+ if (c == 0) break;
+ if ((c == '&') && (str[1] == '#')) {
+--
+GitLab
+