[Bug network/20018] getaddrinfo should reject IP addresses with trailing characters (CVE-2016-10739)

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Mon Jan 21 20:27:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=20018

--- Comment #12 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  108bc4049f8ae82710aec26a92ffdb4b439c83fd (commit)
      from  5165de69c0908e28a380cbd4bb054e55ea4abc95 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=108bc4049f8ae82710aec26a92ffdb4b439c83fd

commit 108bc4049f8ae82710aec26a92ffdb4b439c83fd
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Jan 21 21:26:03 2019 +0100

    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.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |   33 ++++++++++
 NEWS                           |    4 +
 include/arpa/inet.h            |    6 +-
 nscd/gai.c                     |    1 -
 nscd/gethstbynm3_r.c           |    2 -
 nss/digits_dots.c              |    3 +-
 resolv/Makefile                |    7 ++
 resolv/Versions                |    1 +
 resolv/inet_addr.c             |   62 ++++++++++++------
 resolv/res_init.c              |   17 +++--
 resolv/tst-aton.c              |   35 ++++++++--
 resolv/tst-inet_aton_exact.c   |   47 ++++++++++++++
 resolv/tst-resolv-nondecimal.c |  139 ++++++++++++++++++++++++++++++++++++++++
 resolv/tst-resolv-trailing.c   |  136 +++++++++++++++++++++++++++++++++++++++
 sysdeps/posix/getaddrinfo.c    |    2 +-
 15 files changed, 455 insertions(+), 40 deletions(-)
 create mode 100644 resolv/tst-inet_aton_exact.c
 create mode 100644 resolv/tst-resolv-nondecimal.c
 create mode 100644 resolv/tst-resolv-trailing.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list