From dev-return-68655-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Mon Apr 9 12:13:08 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 07673180645 for ; Mon, 9 Apr 2018 12:13:07 +0200 (CEST) Received: (qmail 98263 invoked by uid 500); 9 Apr 2018 10:13:06 -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 98252 invoked by uid 99); 9 Apr 2018 10:13:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2018 10:13:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5684D1A001D for ; Mon, 9 Apr 2018 10:13:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id O0vEWr-pKFLJ for ; Mon, 9 Apr 2018 10:13:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 381515F51F for ; Mon, 9 Apr 2018 10:13:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 70E70E00B8 for ; Mon, 9 Apr 2018 10:13:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 387E021208 for ; Mon, 9 Apr 2018 10:13:00 +0000 (UTC) Date: Mon, 9 Apr 2018 10:13:00 +0000 (UTC) From: "sumit agrawal (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (ZOOKEEPER-3016) Follower QuorumCnxManager$Listener thread died due to incorrect client packet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ZOOKEEPER-3016?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] sumit agrawal resolved ZOOKEEPER-3016. -------------------------------------- Resolution: Fixed > Follower QuorumCnxManager$Listener thread died due to incorrect client pa= cket > -------------------------------------------------------------------------= ---- > > Key: ZOOKEEPER-3016 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3016 > Project: ZooKeeper > Issue Type: Bug > Affects Versions: 3.4.6 > Reporter: sumit agrawal > Priority: Major > > While accepting connection from client, and message is incorrect, this ca= uses=C2=A0NegativeArraySizeException while=C2=A0creating byte array of nega= tive size. > =C2=A0 > ~2018-03-02 23:51:21 [UTC:20180302T235121+0100]|INFO ||/xx.xx.xx.xx:3888h= read|Coordination > Received connection request /yy.yy.yy.yy:18320 (QuorumC= nxManager.java:511)~ > ~2018-03-02 23:51:21 [UTC:20180302T235121+0100]|ERROR||/xx.xx.xx.xx:3888h= read|Coordination > Thread Thread[/xx.xx.xx.xx:3888,5,main] died (NIOServer= CnxnFactory.java:44)~ > ~java.lang.NegativeArraySizeException~ > ~at org.apache.zookeeper.server.quorum.QuorumCnxManager.receiveConnectio= n(QuorumCnxManager.java:242)~ > ~at org.apache.zookeeper.server.quorum.QuorumCnxManager$Listener.run(Quo= rumCnxManager.java:513)~ > =C2=A0 > Below is code reference having the issue. > int num_remaining_bytes =3D din.readInt(); > byte[] b =3D new byte[num_remaining_bytes]; > =C2=A0 > This makes other node in quorum unable to connect to this node. Here clie= nt is security scan app. > =C2=A0 > Check for invalid input must be present to avoid Node crashing and securi= ty. > =C2=A0 > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)