mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 00:32:14 +02:00
(From OE-Core rev: 8546fada29f2c8ec0111a15fe50d90d3f2518d52) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
From 69030714cde66d525a8884bda01b9e8f0abf8e1e Mon Sep 17 00:00:00 2001
|
|
From: David Drysdale <drysdale@google.com>
|
|
Date: Fri, 20 Nov 2015 11:13:45 +0800
|
|
Subject: [PATCH] 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
|
|
|
|
Upstream-Status: Backport
|
|
|
|
CVE-2015-5312
|
|
|
|
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
|
|
|
---
|
|
parser.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
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 */
|
|
--
|
|
2.3.5
|
|
|