pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14198: IPv6 address validation broken
3+ messages / 3 participants
[nested] [flat]
* BUG #14198: IPv6 address validation broken
@ 2016-06-16 18:22 stefan@kaltenbrunner.cc
2016-06-16 21:05 ` Re: BUG #14198: IPv6 address validation broken Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: stefan@kaltenbrunner.cc @ 2016-06-16 18:22 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14198
Logged by: Stefan Kaltenbrunner
Email address: stefan@kaltenbrunner.cc
PostgreSQL version: 9.5.3
Operating system: Debian Linux
Description:
Hi all!
IPv6 address validation seems to be a "tad" broken in all current
releases:
mastermind=# select '99:99:99:99::99:99:99:99:99:zz'::inet;
inet
::/0
(1 row)
mastermind=# select '99:99:99:99::99:99:99:99:aa::99'::inet;
inet
::/0
(1 row)
mastermind=# select '99:99:99:99::99:99:99:99:99::99'::inet;
inet
::/0
(1 row)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #14198: IPv6 address validation broken
2016-06-16 18:22 BUG #14198: IPv6 address validation broken stefan@kaltenbrunner.cc
@ 2016-06-16 21:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-17 13:18 ` Re: BUG #14198: IPv6 address validation broken Torsten Zuehlsdorff <mailinglists@toco-domains.de>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2016-06-16 21:05 UTC (permalink / raw)
To: stefan@kaltenbrunner.cc; +Cc: pgsql-bugs
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #14198: IPv6 address validation broken
2016-06-16 18:22 BUG #14198: IPv6 address validation broken stefan@kaltenbrunner.cc
2016-06-16 21:05 ` Re: BUG #14198: IPv6 address validation broken Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-17 13:18 ` Torsten Zuehlsdorff <mailinglists@toco-domains.de>
0 siblings, 0 replies; 3+ messages in thread
From: Torsten Zuehlsdorff @ 2016-06-17 13:18 UTC (permalink / raw)
To: pgsql-bugs
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2016-06-17 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-16 18:22 BUG #14198: IPv6 address validation broken stefan@kaltenbrunner.cc
2016-06-16 21:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-06-17 13:18 ` Torsten Zuehlsdorff <mailinglists@toco-domains.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox