[zookeeper] 01/02: Add CVE-2016-5017

Markus Koschany apo at moszumanska.debian.org
Sat Oct 1 18:15:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

apo pushed a commit to branch jessie
in repository zookeeper.

commit 60a932d5e8b685da29eccac04cd253a2ef56aaaf
Author: Markus Koschany <apo at debian.org>
Date:   Tue Sep 20 21:30:03 2016 +0200

    Add CVE-2016-5017
---
 debian/changelog                   | 12 ++++++++++++
 debian/patches/CVE-2016-5017.patch | 37 +++++++++++++++++++++++++++++++++++++
 debian/patches/series              |  1 +
 3 files changed, 50 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 257efaf..f7a684d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+zookeeper (3.4.5+dfsg-2+deb8u1) jessie; urgency=high
+
+  * Team upload.
+  * Fix CVE-2016-5017:
+    Lyon Yang discovered that the C client shells cli_st and cli_mt of Apache
+    Zookeeper, a high-performance coordination service for distributed
+    applications, were affected by a buffer overflow vulnerability associated
+    with parsing of the input command when using the "cmd:" batch mode syntax.
+    If the command string exceeds 1024 characters a buffer overflow will occur.
+
+ -- Markus Koschany <apo at debian.org>  Sun, 18 Sep 2016 20:14:02 +0200
+
 zookeeper (3.4.5+dfsg-2) unstable; urgency=high
 
   [ tony mancill ]
diff --git a/debian/patches/CVE-2016-5017.patch b/debian/patches/CVE-2016-5017.patch
new file mode 100644
index 0000000..8d0a2b2
--- /dev/null
+++ b/debian/patches/CVE-2016-5017.patch
@@ -0,0 +1,37 @@
+From: Markus Koschany <apo at debian.org>
+Date: Sun, 18 Sep 2016 19:57:53 +0200
+Subject: CVE-2016-5017
+
+Lyon Yang discovered that the C client shells cli_st and cli_mt of Apache
+Zookeeper, a high-performance coordination service for distributed
+applications, were affected by a buffer overflow vulnerability associated with
+parsing of the input command when using the "cmd:" batch mode syntax. If the
+command string exceeds 1024 characters a buffer overflow will occur.
+
+
+Origin: https://git-wip-us.apache.org/repos/asf?p=zookeeper.git;a=commitdiff;h=27ecf981a15554dc8e64a28630af7a5c9e2bdf4f
+---
+ src/c/src/cli.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/c/src/cli.c b/src/c/src/cli.c
+index c4538a6..959dd99 100644
+--- a/src/c/src/cli.c
++++ b/src/c/src/cli.c
+@@ -486,7 +486,15 @@ int main(int argc, char **argv) {
+     }
+     if (argc > 2) {
+       if(strncmp("cmd:",argv[2],4)==0){
+-        strcpy(cmd,argv[2]+4);
++        size_t cmdlen = strlen(argv[2]);
++        if (cmdlen > sizeof(cmd)) {
++            fprintf(stderr,
++                    "Command length %zu exceeds max length of %zu\n",
++                    cmdlen,
++                    sizeof(cmd));
++            return 2;
++        }
++        strncpy(cmd, argv[2]+4, sizeof(cmd));
+         batchMode=1;
+         fprintf(stderr,"Batch mode: %s\n",cmd);
+       }else{
diff --git a/debian/patches/series b/debian/patches/series
index 9f3321f..8398bc7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ debian/disable-cygwin-detection
 fixes/ZOOKEEPER-705
 ftbfs-gcc-4.7.diff
 fixes/ZOOKEEPER-770
+CVE-2016-5017.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/zookeeper.git



More information about the pkg-java-commits mailing list