diff options
author | David Drysdale <drysdale@google.com> | 2015-11-20 11:13:45 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2015-11-20 11:18:22 +0800 |
commit | 69030714cde66d525a8884bda01b9e8f0abf8e1e (patch) | |
tree | 4be55248d4d6820c92cbe70fe4e37d3ca3beae27 | |
parent | 6360a31a84efe69d155ed96306b9a931a40beab9 (diff) | |
download | android_external_libxml2-69030714cde66d525a8884bda01b9e8f0abf8e1e.tar.gz android_external_libxml2-69030714cde66d525a8884bda01b9e8f0abf8e1e.tar.bz2 android_external_libxml2-69030714cde66d525a8884bda01b9e8f0abf8e1e.zip |
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
-rw-r--r-- | parser.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 */ |