Blame SOURCES/libxml2-CVE-2015-5312-Another-entity-expansion-issue.patch

6dedca
From 4e1ea576167520bbc2bad50797119983e133af74 Mon Sep 17 00:00:00 2001
6dedca
From: David Drysdale <drysdale@google.com>
6dedca
Date: Fri, 20 Nov 2015 11:13:45 +0800
6dedca
Subject: [PATCH] CVE-2015-5312 Another entity expansion issue
6dedca
To: libvir-list@redhat.com
6dedca
6dedca
For https://bugzilla.gnome.org/show_bug.cgi?id=756733
6dedca
It is one case where the code in place to detect entities expansions
6dedca
failed to exit when the situation was detected, leading to DoS
6dedca
Problem reported by Kostya Serebryany @ Google
6dedca
Patch provided by David Drysdale @ Google
6dedca
6dedca
Signed-off-by: Daniel Veillard <veillard@redhat.com>
6dedca
---
6dedca
 parser.c | 4 ++++
6dedca
 1 file changed, 4 insertions(+)
6dedca
6dedca
diff --git a/parser.c b/parser.c
6dedca
index a58dda3..e536e54 100644
6dedca
--- a/parser.c
6dedca
+++ b/parser.c
6dedca
@@ -2801,6 +2801,10 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
6dedca
 			                      0, 0, 0);
6dedca
 		ctxt->depth--;
6dedca
 
6dedca
+		if ((ctxt->lastError.code == XML_ERR_ENTITY_LOOP) ||
6dedca
+		    (ctxt->lastError.code == XML_ERR_INTERNAL_ERROR))
6dedca
+		    goto int_error;
6dedca
+
6dedca
 		if (rep != NULL) {
6dedca
 		    current = rep;
6dedca
 		    while (*current != 0) { /* non input consuming loop */
6dedca
-- 
6dedca
2.5.0
6dedca