Sha256: 7771b7b7264d76560a78e4c842786cfe1be96c623f80d167ceb8917ea2a8dd3c

Contents?: true

Size: 1.03 KB

Versions: 12

Compression:

Stored size: 1.03 KB

Contents

From d50faeefb87856fb19aee2029e952ea095300d90 Mon Sep 17 00:00:00 2001
From: David Drysdale <drysdale@google.com>
Date: Fri, 20 Nov 2015 11:13:45 +0800
Subject: [PATCH 14/18] 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 file changed, 4 insertions(+)

diff --git a/parser.c b/parser.c
index c79b4e8..4054ed1 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 */
-- 
2.5.0

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.1/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.1/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.1/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.1/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
nokogiri-1.6.7.2 patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.1/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch
nokogiri-1.6.7.1 patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch