]> git.ipfire.org Git - thirdparty/glibc.git/commit
CVE-2016-10739: getaddrinfo: Fully parse IPv4 address strings [BZ #20018]
authorFlorian Weimer <fweimer@redhat.com>
Mon, 21 Jan 2019 20:26:03 +0000 (21:26 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 21 Jan 2019 20:26:03 +0000 (21:26 +0100)
commit108bc4049f8ae82710aec26a92ffdb4b439c83fd
tree8028ac534476871bac578df4435bf0bf7388f672
parent5165de69c0908e28a380cbd4bb054e55ea4abc95
CVE-2016-10739: getaddrinfo: Fully parse IPv4 address strings [BZ #20018]

The IPv4 address parser in the getaddrinfo function is changed so that
it does not ignore trailing whitespace and all characters after it.
For backwards compatibility, the getaddrinfo function still recognizes
legacy name syntax, such as 192.000.002.010 interpreted as 192.0.2.8
(octal).

This commit does not change the behavior of inet_addr and inet_aton.
gethostbyname already had additional sanity checks (but is switched
over to the new __inet_aton_exact function for completeness as well).

To avoid sending the problematic query names over DNS, commit
6ca53a2453598804a2559a548a08424fca96434a ("resolv: Do not send queries
for non-host-names in nss_dns [BZ #24112]") is needed.
15 files changed:
ChangeLog
NEWS
include/arpa/inet.h
nscd/gai.c
nscd/gethstbynm3_r.c
nss/digits_dots.c
resolv/Makefile
resolv/Versions
resolv/inet_addr.c
resolv/res_init.c
resolv/tst-aton.c
resolv/tst-inet_aton_exact.c [new file with mode: 0644]
resolv/tst-resolv-nondecimal.c [new file with mode: 0644]
resolv/tst-resolv-trailing.c [new file with mode: 0644]
sysdeps/posix/getaddrinfo.c