Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDeUF-0006cj-4T for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jun 2016 21:06:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDeUE-0007dp-IZ for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jun 2016 21:06:02 +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 1bDeUE-0007dj-9L for pgsql-bugs@postgresql.org; Thu, 16 Jun 2016 21:06:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDeUA-0001km-TH for pgsql-bugs@postgresql.org; Thu, 16 Jun 2016 21:06:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u5GL5q4m009524; Thu, 16 Jun 2016 17:05:53 -0400 From: Tom Lane To: stefan@kaltenbrunner.cc cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14198: IPv6 address validation broken In-reply-to: <20160616182222.5798.959@wrigleys.postgresql.org> References: <20160616182222.5798.959@wrigleys.postgresql.org> Comments: In-reply-to stefan@kaltenbrunner.cc message dated "Thu, 16 Jun 2016 18:22:22 -0000" Date: Thu, 16 Jun 2016 17:05:52 -0400 Message-ID: <9523.1466111152@sss.pgh.pa.us> 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 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? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs