Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDtfn-0004ys-JS for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jun 2016 13:18:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDtfm-0005FG-Em for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jun 2016 13:18:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDtfl-0005EF-MS for pgsql-bugs@postgresql.org; Fri, 17 Jun 2016 13:18:57 +0000 Received: from mail.toco-domains.de ([2a01:4f8:150:50a5::6] helo=toco-domains.de) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDtfi-0005Of-7w for pgsql-bugs@postgresql.org; Fri, 17 Jun 2016 13:18:57 +0000 Received: from [0.0.0.0] (mail.toco-domains.de [IPv6:2a01:4f8:150:50a5::6]) by toco-domains.de (Postfix) with ESMTPA id 665F41AAF017 for ; Fri, 17 Jun 2016 15:18:48 +0200 (CEST) Subject: Re: BUG #14198: IPv6 address validation broken To: pgsql-bugs@postgresql.org References: <20160616182222.5798.959@wrigleys.postgresql.org> <9523.1466111152@sss.pgh.pa.us> From: Torsten Zuehlsdorff Message-ID: Date: Fri, 17 Jun 2016 15:18:48 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <9523.1466111152@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 16.06.2016 23:05, Tom Lane wrote: > stefan@kaltenbrunner.cc writes: >> IPv6 address validation seems to be a "tad" broken in all current >> releases: > > Hmm, looks like we need this at inet_net_pton.c:499: > > else if (*src == '\0') > goto enoent; > if (tp + NS_INT16SZ > endp) > - return (0); > + goto enoent; > *tp++ = (u_char) (val >> 8) & 0xff; > *tp++ = (u_char) val & 0xff; > saw_xdigit = 0; > > A bit of googling suggests that this is equally broken in assorted > BSD distributions, which is likely where we got the code from > originally. I wonder who we can report it to? For FreeBSD there is a bugtracker: https://bugs.freebsd.org/bugzilla/enter_bug.cgi If you are unsure what to fill in, i can do this for you. Greetings, Torsten -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs