Control: tags 863186 + pending

Dear maintainer,

I've prepared an NMU for libtasn1-6 (versioned as 4.10-1.1) and
uploaded it to DELAYED/5. Please feel free to tell me if I
should delay it longer (or reschedule to earlier, or cancel if you
would like to do an upload on your own).

Regards,
Salvatore
diff -Nru libtasn1-6-4.10/debian/changelog libtasn1-6-4.10/debian/changelog
--- libtasn1-6-4.10/debian/changelog	2017-01-17 19:13:39.000000000 +0100
+++ libtasn1-6-4.10/debian/changelog	2017-05-25 10:25:56.000000000 +0200
@@ -1,3 +1,11 @@
+libtasn1-6 (4.10-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * asn1_find_node: added safety check on asn1_find_node() (CVE-2017-6891)
+    (Closes: #863186)
+
+ -- Salvatore Bonaccorso <car...@debian.org>  Thu, 25 May 2017 10:25:56 +0200
+
 libtasn1-6 (4.10-1) unstable; urgency=medium
 
   * New upstream version.
diff -Nru libtasn1-6-4.10/debian/patches/0001-asn1_find_node-added-safety-check-on-asn1_find_node.patch libtasn1-6-4.10/debian/patches/0001-asn1_find_node-added-safety-check-on-asn1_find_node.patch
--- libtasn1-6-4.10/debian/patches/0001-asn1_find_node-added-safety-check-on-asn1_find_node.patch	1970-01-01 01:00:00.000000000 +0100
+++ libtasn1-6-4.10/debian/patches/0001-asn1_find_node-added-safety-check-on-asn1_find_node.patch	2017-05-25 10:25:56.000000000 +0200
@@ -0,0 +1,43 @@
+From 5520704d075802df25ce4ffccc010ba1641bd484 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <n...@redhat.com>
+Date: Thu, 18 May 2017 18:03:34 +0200
+Subject: [PATCH] asn1_find_node: added safety check on asn1_find_node()
+
+This prevents a stack overflow in asn1_find_node() which
+is triggered by too long variable names in the definitions
+files. That means that applications have to deliberately
+pass a too long 'name' constant to asn1_write_value()
+and friends.  Reported by Jakub Jirasek.
+
+Signed-off-by: Nikos Mavrogiannopoulos <n...@redhat.com>
+---
+ lib/parser_aux.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/lib/parser_aux.c b/lib/parser_aux.c
+index b4a7370..976ab38 100644
+--- a/lib/parser_aux.c
++++ b/lib/parser_aux.c
+@@ -120,6 +120,9 @@ asn1_find_node (asn1_node pointer, const char *name)
+       if (n_end)
+ 	{
+ 	  nsize = n_end - n_start;
++	  if (nsize >= sizeof(n))
++		return NULL;
++
+ 	  memcpy (n, n_start, nsize);
+ 	  n[nsize] = 0;
+ 	  n_start = n_end;
+@@ -158,6 +161,9 @@ asn1_find_node (asn1_node pointer, const char *name)
+       if (n_end)
+ 	{
+ 	  nsize = n_end - n_start;
++	  if (nsize >= sizeof(n))
++		return NULL;
++
+ 	  memcpy (n, n_start, nsize);
+ 	  n[nsize] = 0;
+ 	  n_start = n_end;
+-- 
+2.11.0
+
diff -Nru libtasn1-6-4.10/debian/patches/series libtasn1-6-4.10/debian/patches/series
--- libtasn1-6-4.10/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libtasn1-6-4.10/debian/patches/series	2017-05-25 10:25:56.000000000 +0200
@@ -0,0 +1 @@
+0001-asn1_find_node-added-safety-check-on-asn1_find_node.patch

Reply via email to