Your message dated Fri, 02 Jun 2017 00:04:32 +0000
with message-id <e1dga4u-000dgj...@fasolo.debian.org>
and subject line Bug#863811: fixed in zookeeper 3.4.9-3
has caused the Debian Bug report #863811,
regarding CVE-2017-5637
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
863811: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863811
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: zookeeper
Severity: grave
Tags: security

Please see https://issues.apache.org/jira/browse/ZOOKEEPER-2693

Fix is referenced here: https://github.com/apache/zookeeper/pull/183

I'm also attaching the debdiff I'll be using for jessie for reference.

Cheers,
        Moritz
    
diff -Nru zookeeper-3.4.5+dfsg/debian/changelog 
zookeeper-3.4.5+dfsg/debian/changelog
--- zookeeper-3.4.5+dfsg/debian/changelog       2016-10-01 20:02:51.000000000 
+0200
+++ zookeeper-3.4.5+dfsg/debian/changelog       2017-05-31 11:29:29.000000000 
+0200
@@ -1,3 +1,9 @@
+zookeeper (3.4.5+dfsg-2+deb8u2) jessie-security; urgency=medium
+
+  * CVE-2017-5637
+
+ -- Moritz Mühlenhoff <j...@debian.org>  Wed, 31 May 2017 11:28:54 +0200
+
 zookeeper (3.4.5+dfsg-2+deb8u1) jessie; urgency=high
 
   * Team upload.
diff -Nru zookeeper-3.4.5+dfsg/debian/patches/CVE-2017-5637.patch 
zookeeper-3.4.5+dfsg/debian/patches/CVE-2017-5637.patch
--- zookeeper-3.4.5+dfsg/debian/patches/CVE-2017-5637.patch     1970-01-01 
01:00:00.000000000 +0100
+++ zookeeper-3.4.5+dfsg/debian/patches/CVE-2017-5637.patch     2017-05-31 
11:28:32.000000000 +0200
@@ -0,0 +1,593 @@
+From 835377f0e1cd215e791ed29c0bcff95e625f299c Mon Sep 17 00:00:00 2001
+From: Michael Han <h...@apache.org>
+Date: Tue, 7 Mar 2017 17:34:34 +0530
+Subject: [PATCH] ZOOKEEPER-2693: DOS attack on wchp/wchc four letter words
+ (4lw)
+
+Similar as pull request 179, this PR introduces new property 
zookeeper.4lw.commands.whitelist to branch-3.4.
+Unlike branch-3.5 where all 4lw (with few exceptions) is disabled by default, 
for branch-3.4 only "wchp" and "wchc" are disabled by default - since 4lw is 
widely used and there is no alternatives in branch-3.4 so we just disable the 
exploitable ones.
+
+Author: Michael Han <h...@apache.org>
+
+Reviewers: Rakesh Radhakrishnan <rake...@apache.org>
+
+Closes #183 from hanm/ZOOKEEPER-2693-br-3.4 and squashes the following commits:
+
+d060ddc [Michael Han] update doc.
+2ce4ebd [Michael Han] ZOOKEEPER-2693: DOS attack on wchp/wchc four letter 
words (4lw). Initial commit for branch-3.4.
+---
+ .../documentation/content/xdocs/zookeeperAdmin.xml |  44 ++++
+ .../org/apache/zookeeper/server/NIOServerCnxn.java |  33 ++-
+ .../apache/zookeeper/server/NettyServerCnxn.java   |  32 ++-
+ .../org/apache/zookeeper/server/ServerCnxn.java    |  94 +++++++-
+ src/java/test/org/apache/zookeeper/ZKTestCase.java |   4 +
+ .../test/FourLetterWordsWhiteListTest.java         | 252 +++++++++++++++++++++
+ 6 files changed, 449 insertions(+), 10 deletions(-)
+ create mode 100644 
src/java/test/org/apache/zookeeper/test/FourLetterWordsWhiteListTest.java
+
+diff --git a/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml 
b/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
+index 5aefa9a11..fb00fae24 100644
+--- a/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
++++ b/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
+@@ -1042,6 +1042,40 @@ server.3=zoo3:2888:3888</programlisting>
+               </note>
+             </listitem>
+           </varlistentry>
++
++          <varlistentry>
++            <term>4lw.commands.whitelist</term>
++
++            <listitem>
++              <para>(Java system property: <emphasis
++                      
role="bold">zookeeper.4lw.commands.whitelist</emphasis>)</para>
++
++              <para><emphasis role="bold">New in 3.4.10:</emphasis>
++                This property contains a list of comma separated
++                <ulink url="#sc_4lw">Four Letter Words</ulink> commands. It 
is introduced
++                to provide fine grained control over the set of commands 
ZooKeeper can execute,
++                so users can turn off certain commands if necessary.
++                By default it contains all supported four letter word 
commands except "wchp" and "wchc",
++                if the property is not specified. If the property is 
specified, then only commands listed
++                in the whitelist are enabled.
++              </para>
++
++              <para>Here's an example of the configuration that enables stat, 
ruok, conf, and isro
++                command while disabling the rest of Four Letter Words 
command:</para>
++              <programlisting>
++                4lw.commands.whitelist=stat, ruok, conf, isro
++              </programlisting>
++
++              <para>Users can also use asterisk option so they don't have to 
include every command one by one in the list.
++                As an example, this will enable all four letter word commands:
++              </para>
++              <programlisting>
++                4lw.commands.whitelist=*
++              </programlisting>
++
++            </listitem>
++          </varlistentry>
++
+         </variablelist>
+         <para></para>
+       </section>
+@@ -1667,6 +1701,16 @@ imok
+             usage limit that would cause the system to swap.</para>
+           </listitem>
+         </varlistentry>
++
++        <varlistentry>
++          <term>Publicly accessible deployment</term>
++          <listitem>
++            <para>
++              A ZooKeeper ensemble is expected to operate in a trusted 
computing environment.
++              It is thus recommended to deploy ZooKeeper behind a firewall.
++            </para>
++          </listitem>
++        </varlistentry>
+       </variablelist>
+     </section>
+ 
+diff --git a/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java 
b/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
+index 4ea7fb273..456d4c2f1 100644
+--- a/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
++++ b/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
+@@ -825,18 +825,30 @@ public void commandRun() {
+         }
+     }
+ 
++    private class NopCommand extends CommandThread {
++        private String msg;
++
++        public NopCommand(PrintWriter pw, String msg) {
++            super(pw);
++            this.msg = msg;
++        }
++
++        @Override
++        public void commandRun() {
++            pw.println(msg);
++        }
++    }
++
+     /** Return if four letter word found and responded to, otw false **/
+     private boolean checkFourLetterWord(final SelectionKey k, final int len)
+     throws IOException
+     {
+         // We take advantage of the limited size of the length to look
+         // for cmds. They are all 4-bytes which fits inside of an int
+-        String cmd = cmd2String.get(len);
+-        if (cmd == null) {
++        if (!ServerCnxn.isKnown(len)) {
+             return false;
+         }
+-        LOG.info("Processing " + cmd + " command from "
+-                + sock.socket().getRemoteSocketAddress());
++
+         packetReceived();
+ 
+         /** cancel the selection key to remove the socket handling
+@@ -858,6 +870,19 @@ private boolean checkFourLetterWord(final SelectionKey k, 
final int len)
+ 
+         final PrintWriter pwriter = new PrintWriter(
+                 new BufferedWriter(new SendBufferWriter()));
++
++        String cmd = ServerCnxn.getCommandString(len);
++        // ZOOKEEPER-2693: don't execute 4lw if it's not enabled.
++        if (!ServerCnxn.isEnabled(cmd)) {
++            LOG.debug("Command {} is not executed because it is not in the 
whitelist.", cmd);
++            NopCommand nopCmd = new NopCommand(pwriter, cmd + " is not 
executed because it is not in the whitelist.");
++            nopCmd.start();
++            return true;
++        }
++
++        LOG.info("Processing " + cmd + " command from "
++                + sock.socket().getRemoteSocketAddress());
++
+         if (len == ruokCmd) {
+             RuokCommand ruok = new RuokCommand(pwriter);
+             ruok.start();
+diff --git a/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java 
b/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java
+index 32fc371e6..203f0e60b 100644
+--- a/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java
++++ b/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java
+@@ -618,23 +618,47 @@ public void commandRun() {
+         }
+     }
+ 
++    private class NopCommand extends CommandThread {
++        private String msg;
++
++        public NopCommand(PrintWriter pw, String msg) {
++            super(pw);
++            this.msg = msg;
++        }
++
++        @Override
++        public void commandRun() {
++            pw.println(msg);
++        }
++    }
++
+     /** Return if four letter word found and responded to, otw false **/
+     private boolean checkFourLetterWord(final Channel channel,
+             ChannelBuffer message, final int len) throws IOException
+     {
+         // We take advantage of the limited size of the length to look
+         // for cmds. They are all 4-bytes which fits inside of an int
+-        String cmd = cmd2String.get(len);
+-        if (cmd == null) {
++        if (!ServerCnxn.isKnown(len)) {
+             return false;
+         }
++
+         channel.setInterestOps(0).awaitUninterruptibly();
+-        LOG.info("Processing " + cmd + " command from "
+-                + channel.getRemoteAddress());
+         packetReceived();
+ 
+         final PrintWriter pwriter = new PrintWriter(
+                 new BufferedWriter(new SendBufferWriter()));
++
++        String cmd = ServerCnxn.getCommandString(len);
++        // ZOOKEEPER-2693: don't execute 4lw if it's not enabled.
++        if (!ServerCnxn.isEnabled(cmd)) {
++            LOG.debug("Command {} is not executed because it is not in the 
whitelist.", cmd);
++            NopCommand nopCmd = new NopCommand(pwriter, cmd + " is not 
executed because it is not in the whitelist.");
++            nopCmd.start();
++            return true;
++        }
++
++        LOG.info("Processing " + cmd + " command from " + 
channel.getRemoteAddress());
++
+         if (len == ruokCmd) {
+             RuokCommand ruok = new RuokCommand(pwriter);
+             ruok.start();
+diff --git a/src/java/main/org/apache/zookeeper/server/ServerCnxn.java 
b/src/java/main/org/apache/zookeeper/server/ServerCnxn.java
+index 6dd509b16..6b93e93f1 100644
+--- a/src/java/main/org/apache/zookeeper/server/ServerCnxn.java
++++ b/src/java/main/org/apache/zookeeper/server/ServerCnxn.java
+@@ -26,10 +26,17 @@
+ import java.util.ArrayList;
+ import java.util.Collections;
+ import java.util.Date;
++import java.util.Map;
+ import java.util.HashMap;
++import java.util.Set;
++import java.util.HashSet;
++import java.util.Arrays;
+ import java.util.List;
+ import java.util.concurrent.atomic.AtomicLong;
+ 
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
+ import org.apache.jute.Record;
+ import org.apache.zookeeper.WatchedEvent;
+ import org.apache.zookeeper.Watcher;
+@@ -227,8 +234,91 @@ public String toString() {
+     protected final static int isroCmd = ByteBuffer.wrap("isro".getBytes())
+             .getInt();
+ 
+-    protected final static HashMap<Integer, String> cmd2String =
+-        new HashMap<Integer, String>();
++    protected final static Map<Integer, String> cmd2String = new 
HashMap<Integer, String>();
++
++    private static final String ZOOKEEPER_4LW_COMMANDS_WHITELIST = 
"zookeeper.4lw.commands.whitelist";
++
++    private static final Logger LOG = 
LoggerFactory.getLogger(ServerCnxn.class);
++
++    private static final Set<String> whiteListedCommands = new 
HashSet<String>();
++
++    private static boolean whiteListInitialized = false;
++
++    // @VisibleForTesting
++    public static void resetWhiteList() {
++        whiteListInitialized = false;
++        whiteListedCommands.clear();
++    }
++
++    /**
++     * Return the string representation of the specified command code.
++     */
++    public static String getCommandString(int command) {
++        return cmd2String.get(command);
++    }
++
++    /**
++     * Check if the specified command code is from a known command.
++     *
++     * @param command The integer code of command.
++     * @return true if the specified command is known, false otherwise.
++     */
++    public static boolean isKnown(int command) {
++        return cmd2String.containsKey(command);
++    }
++
++    /**
++     * Check if the specified command is enabled.
++     *
++     * In ZOOKEEPER-2693 we introduce a configuration option to only
++     * allow a specific set of white listed commands to execute.
++     * A command will only be executed if it is also configured
++     * in the white list.
++     *
++     * @param command The command string.
++     * @return true if the specified command is enabled.
++     */
++    public static boolean isEnabled(String command) {
++        if (whiteListInitialized) {
++            return whiteListedCommands.contains(command);
++        }
++
++        String commands = 
System.getProperty(ZOOKEEPER_4LW_COMMANDS_WHITELIST);
++        if (commands != null) {
++            String[] list = commands.split(",");
++            for (String cmd : list) {
++                if (cmd.trim().equals("*")) {
++                    for (Map.Entry<Integer, String> entry : 
cmd2String.entrySet()) {
++                        whiteListedCommands.add(entry.getValue());
++                    }
++                    break;
++                }
++                if (!cmd.trim().isEmpty()) {
++                    whiteListedCommands.add(cmd.trim());
++                }
++            }
++        } else {
++            for (Map.Entry<Integer, String> entry : cmd2String.entrySet()) {
++                String cmd = entry.getValue();
++                if (cmd.equals("wchc") || cmd.equals("wchp")) {
++                    // ZOOKEEPER-2693 / disable these exploitable commands by 
default.
++                    continue;
++                }
++                whiteListedCommands.add(cmd);
++            }
++        }
++
++        // Readonly mode depends on "isro".
++        if (System.getProperty("readonlymode.enabled", 
"false").equals("true")) {
++            whiteListedCommands.add("isro");
++        }
++        // zkServer.sh depends on "srvr".
++        whiteListedCommands.add("srvr");
++        whiteListInitialized = true;
++        LOG.info("The list of known four letter word commands is : {}", 
Arrays.asList(cmd2String));
++        LOG.info("The list of enabled four letter word commands is : {}", 
Arrays.asList(whiteListedCommands));
++        return whiteListedCommands.contains(command);
++    }
+ 
+     // specify all of the commands that are available
+     static {
+diff --git a/src/java/test/org/apache/zookeeper/ZKTestCase.java 
b/src/java/test/org/apache/zookeeper/ZKTestCase.java
+index 97e2db6ee..9098fc47e 100644
+--- a/src/java/test/org/apache/zookeeper/ZKTestCase.java
++++ b/src/java/test/org/apache/zookeeper/ZKTestCase.java
+@@ -52,6 +52,10 @@ protected String getTestName() {
+         @Override
+         public void starting(FrameworkMethod method) {
+             testName = method.getName();
++            // ZOOKEEPER-2693 disables all 4lw by default.
++            // Here we enable the 4lw which ZooKeeper tests depends.
++            System.setProperty("zookeeper.4lw.commands.whitelist", "*");
++
+             LOG.info("STARTING " + testName);
+         }
+ 
+diff --git 
a/src/java/test/org/apache/zookeeper/test/FourLetterWordsWhiteListTest.java 
b/src/java/test/org/apache/zookeeper/test/FourLetterWordsWhiteListTest.java
+new file mode 100644
+index 000000000..613346f2e
+--- /dev/null
++++ b/src/java/test/org/apache/zookeeper/test/FourLetterWordsWhiteListTest.java
+@@ -0,0 +1,252 @@
++/**
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements.  See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership.  The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License.  You may obtain a copy of the License at
++ *
++ *     http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++package org.apache.zookeeper.test;
++
++import java.io.IOException;
++
++import org.apache.zookeeper.TestableZooKeeper;
++import org.apache.zookeeper.server.ServerCnxn;
++import static org.apache.zookeeper.client.FourLetterWordMain.send4LetterWord;
++import org.junit.Assert;
++import org.junit.Rule;
++import org.junit.Test;
++import org.junit.rules.Timeout;
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++public class FourLetterWordsWhiteListTest extends ClientBase {
++    protected static final Logger LOG =
++        LoggerFactory.getLogger(FourLetterWordsTest.class);
++
++    @Rule
++    public Timeout timeout = new Timeout(30000);
++
++    /*
++     * ZOOKEEPER-2693: test white list of four letter words.
++     * For 3.5.x default white list is empty. Verify that is
++     * the case (except 'stat' command which is enabled in ClientBase
++     * which other tests depend on.).
++     */
++    @Test(timeout=30000)
++    public void testFourLetterWordsAllDisabledByDefault() throws Exception {
++        stopServer();
++        ServerCnxn.resetWhiteList();
++        System.setProperty("zookeeper.4lw.commands.whitelist", "stat");
++        startServer();
++
++        // Default white list for 3.5.x is empty, so all command should fail.
++        verifyAllCommandsFail();
++
++        TestableZooKeeper zk = createClient();
++
++        verifyAllCommandsFail();
++
++        zk.getData("/", true, null);
++
++        verifyAllCommandsFail();
++
++        zk.close();
++
++        verifyFuzzyMatch("stat", "Outstanding");
++        verifyAllCommandsFail();
++    }
++
++    @Test(timeout=30000)
++    public void testFourLetterWordsEnableSomeCommands() throws Exception {
++        stopServer();
++        ServerCnxn.resetWhiteList();
++        System.setProperty("zookeeper.4lw.commands.whitelist", "stat, ruok, 
isro");
++        startServer();
++        // stat, ruok and isro are white listed.
++        verifyFuzzyMatch("stat", "Outstanding");
++        verifyExactMatch("ruok", "imok");
++        verifyExactMatch("isro", "rw");
++
++        // Rest of commands fail.
++        verifyExactMatch("conf", generateExpectedMessage("conf"));
++        verifyExactMatch("cons", generateExpectedMessage("cons"));
++        verifyExactMatch("crst", generateExpectedMessage("crst"));
++        verifyExactMatch("dump", generateExpectedMessage("dump"));
++        verifyExactMatch("envi", generateExpectedMessage("envi"));
++        verifyExactMatch("gtmk", generateExpectedMessage("gtmk"));
++        verifyExactMatch("stmk", generateExpectedMessage("stmk"));
++        verifyExactMatch("srst", generateExpectedMessage("srst"));
++        verifyExactMatch("wchc", generateExpectedMessage("wchc"));
++        verifyExactMatch("wchp", generateExpectedMessage("wchp"));
++        verifyExactMatch("wchs", generateExpectedMessage("wchs"));
++        verifyExactMatch("mntr", generateExpectedMessage("mntr"));
++    }
++
++    @Test(timeout=30000)
++    public void testISROEnabledWhenReadOnlyModeEnabled() throws Exception {
++        stopServer();
++        ServerCnxn.resetWhiteList();
++        System.setProperty("zookeeper.4lw.commands.whitelist", "stat");
++        System.setProperty("readonlymode.enabled", "true");
++        startServer();
++        verifyExactMatch("isro", "rw");
++        System.clearProperty("readonlymode.enabled");
++    }
++
++    @Test(timeout=30000)
++    public void testFourLetterWordsInvalidConfiguration() throws Exception {
++        stopServer();
++        ServerCnxn.resetWhiteList();
++        System.setProperty("zookeeper.4lw.commands.whitelist", "foo bar" +
++                " foo,,, " +
++                "bar :.,@#$%^&*() , , , , bar, bar, stat,        ");
++        startServer();
++
++        // Just make sure we are good when admin made some mistakes in config 
file.
++        verifyAllCommandsFail();
++        // But still, what's valid in white list will get through.
++        verifyFuzzyMatch("stat", "Outstanding");
++    }
++
++    @Test(timeout=30000)
++    public void testFourLetterWordsEnableAllCommandsThroughAsterisk() throws 
Exception {
++        stopServer();
++        ServerCnxn.resetWhiteList();
++        System.setProperty("zookeeper.4lw.commands.whitelist", "*");
++        startServer();
++        verifyAllCommandsSuccess();
++    }
++
++    @Test(timeout=30000)
++    public void testFourLetterWordsEnableAllCommandsThroughExplicitList() 
throws Exception {
++        stopServer();
++        ServerCnxn.resetWhiteList();
++        System.setProperty("zookeeper.4lw.commands.whitelist",
++                "ruok, envi, conf, stat, srvr, cons, dump," +
++                        "wchs, wchp, wchc, srst, crst, " +
++                        "mntr, gtmk, isro, stmk");
++        startServer();
++        verifyAllCommandsSuccess();
++    }
++
++    private void verifyAllCommandsSuccess() throws Exception {
++        verifyExactMatch("ruok", "imok");
++        verifyFuzzyMatch("envi", "java.version");
++        verifyFuzzyMatch("conf", "clientPort");
++        verifyFuzzyMatch("stat", "Outstanding");
++        verifyFuzzyMatch("srvr", "Outstanding");
++        verifyFuzzyMatch("cons", "queued");
++        verifyFuzzyMatch("dump", "Session");
++        verifyFuzzyMatch("wchs", "watches");
++        verifyFuzzyMatch("wchp", "");
++        verifyFuzzyMatch("wchc", "");
++
++        verifyFuzzyMatch("srst", "reset");
++        verifyFuzzyMatch("crst", "reset");
++
++        verifyFuzzyMatch("stat", "Outstanding");
++        verifyFuzzyMatch("srvr", "Outstanding");
++        verifyFuzzyMatch("cons", "queued");
++        verifyFuzzyMatch("gtmk", "306");
++        verifyFuzzyMatch("isro", "rw");
++
++        TestableZooKeeper zk = createClient();
++        String sid = getHexSessionId(zk.getSessionId());
++
++        verifyFuzzyMatch("stat", "queued");
++        verifyFuzzyMatch("srvr", "Outstanding");
++        verifyFuzzyMatch("cons", sid);
++        verifyFuzzyMatch("dump", sid);
++
++        zk.getData("/", true, null);
++
++        verifyFuzzyMatch("stat", "queued");
++        verifyFuzzyMatch("srvr", "Outstanding");
++        verifyFuzzyMatch("cons", sid);
++        verifyFuzzyMatch("dump", sid);
++
++        verifyFuzzyMatch("wchs", "watching 1");
++        verifyFuzzyMatch("wchp", sid);
++        verifyFuzzyMatch("wchc", sid);
++        zk.close();
++
++        verifyExactMatch("ruok", "imok");
++        verifyFuzzyMatch("envi", "java.version");
++        verifyFuzzyMatch("conf", "clientPort");
++        verifyFuzzyMatch("stat", "Outstanding");
++        verifyFuzzyMatch("srvr", "Outstanding");
++        verifyFuzzyMatch("cons", "queued");
++        verifyFuzzyMatch("dump", "Session");
++        verifyFuzzyMatch("wchs", "watch");
++        verifyFuzzyMatch("wchp", "");
++        verifyFuzzyMatch("wchc", "");
++
++        verifyFuzzyMatch("srst", "reset");
++        verifyFuzzyMatch("crst", "reset");
++
++        verifyFuzzyMatch("stat", "Outstanding");
++        verifyFuzzyMatch("srvr", "Outstanding");
++        verifyFuzzyMatch("cons", "queued");
++        verifyFuzzyMatch("mntr", "zk_server_state\tstandalone");
++        verifyFuzzyMatch("mntr", "num_alive_connections");
++        verifyFuzzyMatch("stat", "Connections");
++        verifyFuzzyMatch("srvr", "Connections");
++    }
++
++    private void verifyAllCommandsFail() throws Exception {
++        verifyExactMatch("ruok", generateExpectedMessage("ruok"));
++        verifyExactMatch("conf", generateExpectedMessage("conf"));
++        verifyExactMatch("cons", generateExpectedMessage("cons"));
++        verifyExactMatch("crst", generateExpectedMessage("crst"));
++        verifyExactMatch("dump", generateExpectedMessage("dump"));
++        verifyExactMatch("envi", generateExpectedMessage("envi"));
++        verifyExactMatch("gtmk", generateExpectedMessage("gtmk"));
++        verifyExactMatch("stmk", generateExpectedMessage("stmk"));
++        verifyExactMatch("srst", generateExpectedMessage("srst"));
++        verifyExactMatch("wchc", generateExpectedMessage("wchc"));
++        verifyExactMatch("wchp", generateExpectedMessage("wchp"));
++        verifyExactMatch("wchs", generateExpectedMessage("wchs"));
++        verifyExactMatch("mntr", generateExpectedMessage("mntr"));
++        verifyExactMatch("isro", generateExpectedMessage("isro"));
++
++        // srvr is enabled by default due to the sad fact zkServer.sh uses it.
++        verifyFuzzyMatch("srvr", "Outstanding");
++    }
++
++    private void verifyFuzzyMatch(String cmd, String expected) throws 
IOException {
++        String resp = sendRequest(cmd);
++        LOG.info("cmd " + cmd + " expected " + expected + " got " + resp);
++        Assert.assertTrue(resp.contains(expected));
++    }
++
++    private String generateExpectedMessage(String command) {
++        return command + " is not executed because it is not in the 
whitelist.";
++    }
++
++    private void verifyExactMatch(String cmd, String expected) throws 
IOException {
++        String resp = sendRequest(cmd);
++        LOG.info("cmd " + cmd + " expected an exact match of " + expected + 
"; got " + resp);
++        Assert.assertTrue(resp.trim().equals(expected));
++    }
++
++    private String sendRequest(String cmd) throws IOException {
++      HostPort hpobj = ClientBase.parseHostPortList(hostPort).get(0);
++      return send4LetterWord(hpobj.host, hpobj.port, cmd);
++    }
++
++    private String sendRequest(String cmd, int timeout) throws IOException {
++        HostPort hpobj = ClientBase.parseHostPortList(hostPort).get(0);
++        return send4LetterWord(hpobj.host, hpobj.port, cmd, timeout);
++    }
++}
diff -Nru zookeeper-3.4.5+dfsg/debian/patches/series 
zookeeper-3.4.5+dfsg/debian/patches/series
--- zookeeper-3.4.5+dfsg/debian/patches/series  2016-10-01 20:02:51.000000000 
+0200
+++ zookeeper-3.4.5+dfsg/debian/patches/series  2017-05-31 11:28:43.000000000 
+0200
@@ -5,3 +5,4 @@
 ftbfs-gcc-4.7.diff
 fixes/ZOOKEEPER-770
 CVE-2016-5017.patch
+CVE-2017-5637.patch
\ Kein Zeilenumbruch am Dateiende.

--- End Message ---
--- Begin Message ---
Source: zookeeper
Source-Version: 3.4.9-3

We believe that the bug you reported is fixed in the latest version of
zookeeper, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 863...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
tony mancill <tmanc...@debian.org> (supplier of updated zookeeper package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 01 Jun 2017 16:26:44 -0700
Source: zookeeper
Binary: libzookeeper-java zookeeper zookeeperd libzookeeper-java-doc 
libzookeeper-mt2 libzookeeper-st2 libzookeeper2 libzookeeper-mt-dev 
libzookeeper-st-dev zookeeper-bin python-zookeeper
Architecture: source all amd64
Version: 3.4.9-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Java Maintainers 
<pkg-java-maintainers@lists.alioth.debian.org>
Changed-By: tony mancill <tmanc...@debian.org>
Description:
 libzookeeper-java - Core Java libraries for zookeeper
 libzookeeper-java-doc - API Documentation for zookeeper
 libzookeeper-mt-dev - Development files for multi threaded zookeeper C bindings
 libzookeeper-mt2 - Multi threaded C bindings for zookeeper
 libzookeeper-st-dev - Development files for single threaded zookeeper C 
bindings
 libzookeeper-st2 - Single threaded C bindings for zookeeper
 libzookeeper2 - C bindings for zookeeper - transitional package
 python-zookeeper - Python bindings for zookeeper
 zookeeper  - High-performance coordination service for distributed application
 zookeeper-bin - Command line utilities for zookeeper
 zookeeperd - Init control scripts for zookeeper
Closes: 863811
Changes:
 zookeeper (3.4.9-3) unstable; urgency=medium
 .
   * Team upload.
   * Apply patch for CVE-2017-5637 (Closes: #863811)
     "wchp" and "wchc" are now disabled by default.
Checksums-Sha1:
 e35931cd9f28861e664c6bd8c6e5b42c7fbdb34d 3022 zookeeper_3.4.9-3.dsc
 865d0959b3deaae102b2525b26b3ddebdb5b0b19 50420 zookeeper_3.4.9-3.debian.tar.xz
 faceb60e4201e240ddfcf45b11ffcd4966edebf7 359998 
libzookeeper-java-doc_3.4.9-3_all.deb
 0871a00b218dc1217b90785310a51bb6c0bfeec0 1314658 
libzookeeper-java_3.4.9-3_all.deb
 0b1a17e90f321e7e72216dc8531ef11d613a120a 90592 
libzookeeper-mt-dev_3.4.9-3_amd64.deb
 6b5eca9f8336d35a0b77d6354bb098ee35e5a28b 112294 
libzookeeper-mt2-dbgsym_3.4.9-3_amd64.deb
 5e19dbc4d5aaf6afa2ab6c1426cdee3bc903209c 74934 
libzookeeper-mt2_3.4.9-3_amd64.deb
 cac9bef31cd7005aa4025f30b1ea6133d1ed718a 87890 
libzookeeper-st-dev_3.4.9-3_amd64.deb
 18ba238be706a3e0c6ce9f73f378c2d42ffbfc48 105222 
libzookeeper-st2-dbgsym_3.4.9-3_amd64.deb
 4d96a577d363de36a1ad9eb0415d8eac0fb144af 72572 
libzookeeper-st2_3.4.9-3_amd64.deb
 76eecbc2ed448982d0f19189799de2e088816102 40642 libzookeeper2_3.4.9-3_amd64.deb
 893f65ed57e6cc6ad4577b2ade65cef97f406409 32346 
python-zookeeper-dbgsym_3.4.9-3_amd64.deb
 6c57d5837b7851500e74357acb3db9a6fd4fe207 58066 
python-zookeeper_3.4.9-3_amd64.deb
 711f5b7ed83ef249fab37ee5589d09c4d9bfd23f 413432 
zookeeper-bin-dbgsym_3.4.9-3_amd64.deb
 f01cb2e5180d9dc7a87b0badc1594ee4e6ace6e7 94416 zookeeper-bin_3.4.9-3_amd64.deb
 91305d421c49d6576ce4d020db839c7f49d7f6a0 141584 zookeeper_3.4.9-3_all.deb
 2909b3e92fdf03f837f460f1267a40f61be92b43 16168 
zookeeper_3.4.9-3_amd64.buildinfo
 f32a337ecc6235d0ef8095ede26ec9d6225a8b34 43720 zookeeperd_3.4.9-3_all.deb
Checksums-Sha256:
 95cbda8285b2fe3924cbdd78c0a0f93c2789ce6675b973ba5f9d2c5a1d4a8b8f 3022 
zookeeper_3.4.9-3.dsc
 70bff506975ac187b5b52d502517e49774170ff2337123b5b12f2aa71638c238 50420 
zookeeper_3.4.9-3.debian.tar.xz
 17b539a6e1282a91ab8a656e1e10743d875ae9a447b43a3f7999f10686d9b14b 359998 
libzookeeper-java-doc_3.4.9-3_all.deb
 f0e66664ba481fd90050d7351dfec7e8df58305abd3650ad5b453ae61410b7e4 1314658 
libzookeeper-java_3.4.9-3_all.deb
 9341249d9c85705f6bae78f00e1c31accf0ac16702f80aea52715519549975ca 90592 
libzookeeper-mt-dev_3.4.9-3_amd64.deb
 3cc548d1770884f51c181832564f02e9dbee7c999937a2f940e307626bae4f7c 112294 
libzookeeper-mt2-dbgsym_3.4.9-3_amd64.deb
 d21d83b4c18ffa1c363aa90f30795973998a7354c7dc93badaa8c7b7213b538a 74934 
libzookeeper-mt2_3.4.9-3_amd64.deb
 483f691827ec4ed14fbbfc0855e5b170dece81e19135dd453475a8066f9dce29 87890 
libzookeeper-st-dev_3.4.9-3_amd64.deb
 13bfc2d9edc5ebdcd9e8cc5bde68026ee851e1b27bb2032b03025ac72648703c 105222 
libzookeeper-st2-dbgsym_3.4.9-3_amd64.deb
 1c472ae9739d2b50b02762b2c36c21806a442ed33a0b16d48e05c125e1dea7ae 72572 
libzookeeper-st2_3.4.9-3_amd64.deb
 bff2557fe042165882271fa93e46fe412eb6b605a9a2916b534d3956d8bd79e7 40642 
libzookeeper2_3.4.9-3_amd64.deb
 1405220991817e3770be692f58f8aeed0e1d82af7d3d2c39aa135986b00c4880 32346 
python-zookeeper-dbgsym_3.4.9-3_amd64.deb
 25ab789d6b961b01edf516b390443b1a093845c08f403bc0ee0b5ea48c0bbafd 58066 
python-zookeeper_3.4.9-3_amd64.deb
 028b73a98da27b843ac28e426d80fc9a3c82a5482508be74da4da85b35b8fc12 413432 
zookeeper-bin-dbgsym_3.4.9-3_amd64.deb
 f8d0eb34a78bafb6aa5ef9023bdab11ae23a44e15785ba55f3977c0915a10bfc 94416 
zookeeper-bin_3.4.9-3_amd64.deb
 620551242a9464321d786ee9fdf719ccd3029c69644804bf6d76ffcaee25f5c1 141584 
zookeeper_3.4.9-3_all.deb
 b61a905890079956062a3efda0748e2d02c13e92d54b070861ac4be958b6118f 16168 
zookeeper_3.4.9-3_amd64.buildinfo
 ec89c567423a660d232cc26e7d83c3d6e9d7d4bb1d7301f85ba55a8474234ccf 43720 
zookeeperd_3.4.9-3_all.deb
Files:
 425f44aebf57794564b6071b8ab54c73 3022 java optional zookeeper_3.4.9-3.dsc
 e5900f6a0f11fbc56bae4c9e481bae8b 50420 java optional 
zookeeper_3.4.9-3.debian.tar.xz
 655c3dbbada3672e66bbd2c2fdd3266c 359998 doc optional 
libzookeeper-java-doc_3.4.9-3_all.deb
 b2f3f80502f4c961e917dd82124fd9a1 1314658 java optional 
libzookeeper-java_3.4.9-3_all.deb
 5e6efecd80484532ea2b9b7f12fd829e 90592 libdevel optional 
libzookeeper-mt-dev_3.4.9-3_amd64.deb
 cec3facf35a486ce064b9d342e4a7f9a 112294 debug extra 
libzookeeper-mt2-dbgsym_3.4.9-3_amd64.deb
 326944e958a166f7ebf8b1c17cfad826 74934 libs optional 
libzookeeper-mt2_3.4.9-3_amd64.deb
 1d0ba43f59ff62f03b3ebbe5ed996119 87890 libdevel optional 
libzookeeper-st-dev_3.4.9-3_amd64.deb
 6d7323758f414c4ec4571d7bdeed8e73 105222 debug extra 
libzookeeper-st2-dbgsym_3.4.9-3_amd64.deb
 ff72eb6d7c145b2613e06c4ec18c1a7c 72572 libs optional 
libzookeeper-st2_3.4.9-3_amd64.deb
 d40230aacc9ef4f349936ccb81ad21a7 40642 oldlibs extra 
libzookeeper2_3.4.9-3_amd64.deb
 e9aa20b84dca480997ce2c399cb97f2b 32346 debug extra 
python-zookeeper-dbgsym_3.4.9-3_amd64.deb
 84afb6a8085e731b0417621e159f0d6b 58066 python optional 
python-zookeeper_3.4.9-3_amd64.deb
 87bc3bb26792ad3283c65f5397832811 413432 debug extra 
zookeeper-bin-dbgsym_3.4.9-3_amd64.deb
 5c00abd035b3914398a0b3d0069f8c8c 94416 misc optional 
zookeeper-bin_3.4.9-3_amd64.deb
 a8d585bd329b9deaf93da09660fc5976 141584 java optional zookeeper_3.4.9-3_all.deb
 48bf5b04cdb02c94dc88b7efcca15465 16168 java optional 
zookeeper_3.4.9-3_amd64.buildinfo
 b04958180aed20e22198a745e53ab597 43720 java optional zookeeperd_3.4.9-3_all.deb

-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEE5Qr9Va3SequXFjqLIdIFiZdLPpYFAlkwqOIUHHRtYW5jaWxs
QGRlYmlhbi5vcmcACgkQIdIFiZdLPpY9ZA//afKF7yN6yN04GmmDDqPac8Lv49qG
a9thuOcfekLLCx4a7RTaXBaWm9ALQ+9IlYPoKP6JtzWh9tiJZ3yXclX9TNupgn55
iby8qpuau/C10UOuz07A2LJ6oaKsvNjAWaIkbD5AXaqVFVuRRrYnMiYaASGvMgN8
yUzLd0EXiyYVZXeZVKkg7wP5xfYV6O5eHyKs1R6GHCb3YgxId/1nfLIk8OK6JwpV
FwqbSGO5LCGwHKT+I/8Fv7VV04PWFJzu/Uo/8Ez+VpRKrg/F1gHy9f8qcEnx/FRC
rxQIZBXBQvFRkVzZIh5qBcVkzIqEJ7RQd1OjgJL0r9Xv/y4eTROg9HfcIc+4hIYD
vIyiq79chpnea4UH2COvfLTvygnWd91U7Yd7NrLL9NUr+6rGNE/B4wA6MFA0j2zK
qEJQrnnsQQ2CFTOaHvF1TXwNsq0bCmuq480pBLQnkFaz67iXyiygbTnTocWZ4jZj
zKWbzXRA/9Dt8uzh7XDXBJgs3uQNeryKFSmJuY5jDqYCpJVvxwPOPxQ33QtS0dHI
3jCb6G9zcK2SzSK547RaV3NVytPfdBSkAzK21Izk/KahJf16CeTaf6cELdlUVNsW
bWCkza4uXEUv5JwfLynL75eQ5uMwBn3C7VwDm8mTWhZPYjbYXRLtvU3UxmEzFdJt
4svISUadW7Ljv/Q=
=iyf8
-----END PGP SIGNATURE-----

--- End Message ---
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to