Control: tags 792571 + pending

Dear maintainer,

I've prepared an NMU for tidy (versioned as 20091223cvs-1.5) and
uploaded it to DELAYED/2, based on the debdiff which Alessandro
prepared for the jessie-security upload. Please feel free to tell me
if I should delay it longer.

Regards,
Salvatore
diff -u tidy-20091223cvs/debian/changelog tidy-20091223cvs/debian/changelog
--- tidy-20091223cvs/debian/changelog
+++ tidy-20091223cvs/debian/changelog
@@ -1,3 +1,11 @@
+tidy (20091223cvs-1.5) unstable; urgency=high
+
+  [ Alessandro Ghedini ]
+  * Fix heap buffer overflow and memory saturation on invalid HTML input
+    as per CVE-2015-5522 and CVE-2015-5523 (Closes: #792571)
+
+ -- Salvatore Bonaccorso <car...@debian.org>  Mon, 20 Jul 2015 16:33:00 +0200
+
 tidy (20091223cvs-1.4) unstable; urgency=medium
 
   * Non-maintainer upload.
only in patch2:
unchanged:
--- tidy-20091223cvs.orig/debian/patches/11CVE-2015-5522.patch
+++ tidy-20091223cvs/debian/patches/11CVE-2015-5522.patch
@@ -0,0 +1,34 @@
+From c18f27a58792f7fbd0b30a0ff50d6b40a82f940d Mon Sep 17 00:00:00 2001
+From: Geoff McLane <ubu...@geoffair.info>
+Date: Wed, 3 Jun 2015 20:26:03 +0200
+Subject: [PATCH] Issue #217 - avoid len going negative, ever...
+
+---
+ src/lexer.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/lexer.c b/src/lexer.c
+index 376a3d8..664f806 100644
+--- a/src/lexer.c
++++ b/src/lexer.c
+@@ -3739,16 +3740,17 @@ static tmbstr ParseValue( TidyDocImpl* doc, ctmbstr name,
+         /* and prompts attributes unless --literal-attributes is set to yes      */
+         /* #994841 - Whitespace is removed from value attributes                 */
+ 
+-        if (munge &&
++        /* Issue #217 - Also only if/while (len > 0) - MUST NEVER GO NEGATIVE! */
++        if ((len > 0) && munge &&
+             TY_(tmbstrcasecmp)(name, "alt") &&
+             TY_(tmbstrcasecmp)(name, "title") &&
+             TY_(tmbstrcasecmp)(name, "value") &&
+             TY_(tmbstrcasecmp)(name, "prompt"))
+         {
+-            while (TY_(IsWhite)(lexer->lexbuf[start+len-1]))
++            while (TY_(IsWhite)(lexer->lexbuf[start+len-1]) && (len > 0))
+                 --len;
+ 
+-            while (TY_(IsWhite)(lexer->lexbuf[start]) && start < len)
++            while (TY_(IsWhite)(lexer->lexbuf[start]) && (start < len) && (len > 0))
+             {
+                 ++start;
+                 --len;

Reply via email to