[libxml2] CVE-2015-5312 Another entity expansion issue
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] CVE-2015-5312 Another entity expansion issue
- Date: Fri, 20 Nov 2015 09:57:08 +0000 (UTC)
commit 69030714cde66d525a8884bda01b9e8f0abf8e1e
Author: David Drysdale <drysdale google com>
Date: Fri Nov 20 11:13:45 2015 +0800
CVE-2015-5312 Another entity expansion issue
For https://bugzilla.gnome.org/show_bug.cgi?id=756733
It is one case where the code in place to detect entities expansions
failed to exit when the situation was detected, leading to DoS
Problem reported by Kostya Serebryany @ Google
Patch provided by David Drysdale @ Google
parser.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/parser.c b/parser.c
index b7b6668..da6e729 100644
--- a/parser.c
+++ b/parser.c
@@ -2806,6 +2806,10 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
0, 0, 0);
ctxt->depth--;
+ if ((ctxt->lastError.code == XML_ERR_ENTITY_LOOP) ||
+ (ctxt->lastError.code == XML_ERR_INTERNAL_ERROR))
+ goto int_error;
+
if (rep != NULL) {
current = rep;
while (*current != 0) { /* non input consuming loop */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]