Bug 1484034
Summary: | glibc: Stricter IPv6 address parser | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Florian Weimer <fweimer> |
Component: | glibc | Assignee: | Florian Weimer <fweimer> |
Status: | CLOSED ERRATA | QA Contact: | Sergey Kolosov <skolosov> |
Severity: | unspecified | Docs Contact: | Vladimír Slávik <vslavik> |
Priority: | unspecified | ||
Version: | 7.5 | CC: | ashankar, codonell, fweimer, mnewsome, pfrankli, skolosov, vslavik |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | glibc-2.17-202.el7 | Doc Type: | Bug Fix |
Doc Text: |
Invalid IPv6 scope IDs no longer incorrectly accepted by `getaddrinfo()`
Previously, the GNU C Library ( *glibc* ) function `getaddrinfo()` erroneously accepted invalid IPv6 scope IDs. As a consequence, strings such as `::%-1` or `2001:db8::1%037777777777` were incorrectly parsed as valid IPv6 addresses. The `getaddrinfo()` implementation has been changed to reject such invalid IPv6 scope IDs and return a name resolution failure instead. As a result, such invalid IPv6 address strings are no longer accepted by applications using the `getaddrinfo()` function.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-10 14:00:52 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 677316 |
Description
Florian Weimer
2017-08-22 13:34:11 UTC
I think the change in parsing scope IDs carries very little risk and we should implement it. I'm still undecided about the leading zeros change. Many implementations reject such officially invalid IPv6 addresses: NSPR, various Perl, JQuery and Apache Commons validators, and the ip4r extension for PostgreSQL. However, OpenJDK accepts them because their Java implementation is derived from the same inet_pton6 function originally found in BIND 4.9.4 (so it has the same bug). ip6tables uses the glibc parser as well, so the change could cause ip6tables to reject invalid IPv6 addresses with an error message which would have previously been accepted. (In reply to Florian Weimer from comment #1) > I think the change in parsing scope IDs carries very little risk and we > should implement it. > > I'm still undecided about the leading zeros change. Many implementations > reject such officially invalid IPv6 addresses: NSPR, various Perl, JQuery > and Apache Commons validators, and the ip4r extension for PostgreSQL. > > However, OpenJDK accepts them because their Java implementation is derived > from the same inet_pton6 function originally found in BIND 4.9.4 (so it has > the same bug). > > ip6tables uses the glibc parser as well, so the change could cause ip6tables > to reject invalid IPv6 addresses with an error message which would have > previously been accepted. Without enough data I think we should lean towards being liberal in what we accept. Eventually the upstream parser, as it is, will enter the next major release of RHEL, where expectations can be set more clearly about the strictness of the parser. (In reply to Carlos O'Donell from comment #2) > Without enough data I think we should lean towards being liberal in what we > accept. Agreed. With the version I intend to commit, 2001:db8::00001 is accepted, but 2001:db8::1%037777777777 is rejected. I think this is a reasonable compromise. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0805 |