Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 514E6200C1E for ; Fri, 17 Feb 2017 19:33:28 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4FE21160B57; Fri, 17 Feb 2017 18:33:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BF49E160B46 for ; Fri, 17 Feb 2017 19:33:27 +0100 (CET) Received: (qmail 74009 invoked by uid 500); 17 Feb 2017 18:33:26 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 73998 invoked by uid 99); 17 Feb 2017 18:33:26 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2017 18:33:26 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 62FB3DFBD3; Fri, 17 Feb 2017 18:33:26 +0000 (UTC) From: arshadmohammad To: dev@zookeeper.apache.org Reply-To: dev@zookeeper.apache.org References: In-Reply-To: Subject: [GitHub] zookeeper pull request #179: ZOOKEEPER-2693: DOS attack on wchp/wchc four le... Content-Type: text/plain Message-Id: <20170217183326.62FB3DFBD3@git1-us-west.apache.org> Date: Fri, 17 Feb 2017 18:33:26 +0000 (UTC) archived-at: Fri, 17 Feb 2017 18:33:28 -0000 Github user arshadmohammad commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/179#discussion_r101818292 --- Diff: src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java --- @@ -479,7 +479,7 @@ private boolean checkFourLetterWord(final SelectionKey k, final int len) // 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 = FourLetterCommands.getCmdMapView().get(len); - if (cmd == null) { + if (cmd == null || !FourLetterCommands.getWhiteListedCmdView().contains(cmd)) { --- End diff -- if request is for 4lw command, it should be processed in that way only. If false is returned from here, the request will proceed as the normal request. This is major issue in the current patch --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---