Skip to content

Commit

Permalink
Merge pull request gevent#1850 from gevent/issue1847
Browse files Browse the repository at this point in the history
Upgrade embedded c-ares to 1.18.1
  • Loading branch information
jamadden authored Dec 15, 2021
2 parents b7ba2f4 + 73f3a7d commit 05e0e37
Show file tree
Hide file tree
Showing 95 changed files with 12,548 additions and 8,973 deletions.
754 changes: 470 additions & 284 deletions deps/c-ares/CHANGES

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions deps/c-ares/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ unpacked the source archive):

./configure
make
make ahost adig acountry (optional)
make install

You probably need to be root when doing the last command.
Expand Down Expand Up @@ -404,7 +403,7 @@ runs on, that isn't listed, please let us know!
Useful URLs
===========

- c-ares: https://c-ares.haxx.se/
- c-ares: https://c-ares.org/
- MingW: http://www.mingw.org/
- MinGW-w64: http://mingw-w64.sourceforge.net/
- OpenWatcom: http://www.openwatcom.org/
2 changes: 1 addition & 1 deletion deps/c-ares/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CLEANFILES = $(PDFPAGES) $(HTMLPAGES)

DISTCLEANFILES = include/ares_build.h

DIST_SUBDIRS = include src
DIST_SUBDIRS = include src test docs

SUBDIRS = @BUILD_SUBDIRS@

Expand Down
41 changes: 25 additions & 16 deletions deps/c-ares/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
Expand Down Expand Up @@ -90,12 +90,18 @@ build_triplet = @build@
host_triplet = @host@
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
$(top_srcdir)/m4/ax_ac_print_to_file.m4 \
$(top_srcdir)/m4/ax_add_am_macro_static.m4 \
$(top_srcdir)/m4/ax_am_macros_static.m4 \
$(top_srcdir)/m4/ax_check_gnu_make.m4 \
$(top_srcdir)/m4/ax_code_coverage.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
$(top_srcdir)/m4/ax_file_escapes.m4 \
$(top_srcdir)/m4/ax_require_defined.m4 \
$(top_srcdir)/m4/cares-compilers.m4 \
$(top_srcdir)/m4/cares-confopts.m4 \
$(top_srcdir)/m4/cares-functions.m4 \
$(top_srcdir)/m4/cares-override.m4 \
$(top_srcdir)/m4/cares-reentrant.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
Expand All @@ -105,9 +111,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
$(top_srcdir)/m4/xc-lt-iface.m4 \
$(top_srcdir)/m4/xc-translit.m4 \
$(top_srcdir)/m4/xc-val-flgs.m4 \
$(top_srcdir)/m4/zz40-xc-ovr.m4 \
$(top_srcdir)/m4/zz50-xc-ovr.m4 \
$(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/zz40-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
Expand Down Expand Up @@ -201,12 +205,9 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libcares.pc.in \
AUTHORS NEWS TODO compile config.guess config.sub install-sh \
ltmain.sh missing
AUTHORS INSTALL.md NEWS README.md TODO compile config.guess \
config.sub depcomp install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
Expand Down Expand Up @@ -245,6 +246,8 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
# Exists only to be overridden by the user if desired.
AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
Expand All @@ -261,17 +264,22 @@ AWK = @AWK@
BUILD_SUBDIRS = @BUILD_SUBDIRS@
CARES_CFLAG_EXTRAS = @CARES_CFLAG_EXTRAS@
CARES_PRIVATE_LIBS = @CARES_PRIVATE_LIBS@
CARES_RANDOM_FILE = @CARES_RANDOM_FILE@
CARES_VERSION_INFO = @CARES_VERSION_INFO@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CARES_SYMBOL_HIDING = @CFLAG_CARES_SYMBOL_HIDING@
CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAG_CARES_STATICLIB = @CPPFLAG_CARES_STATICLIB@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
Expand All @@ -286,6 +294,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCOV = @GCOV@
Expand Down Expand Up @@ -325,7 +334,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANDOM_FILE = @RANDOM_FILE@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down Expand Up @@ -363,6 +371,8 @@ host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
ifGNUmake = @ifGNUmake@
ifnGNUmake = @ifnGNUmake@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
Expand Down Expand Up @@ -582,7 +592,6 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files

distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

Expand Down Expand Up @@ -732,7 +741,7 @@ distcheck: dist
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
Expand Down
2 changes: 1 addition & 1 deletion deps/c-ares/Makefile.m32
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CP = cp -afv
CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -D_WIN32_WINNT=0x0600
CFLAGS += -DCARES_STATICLIB
LDFLAGS = $(CARES_LDFLAG_EXTRAS) -s
LIBS = -lwsock32
LIBS = -lws2_32 -liphlpapi

# Makefile.inc provides the CSOURCES and HHEADERS defines
include src/lib/Makefile.inc
Expand Down
4 changes: 2 additions & 2 deletions deps/c-ares/Makefile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ EX_LIBS_REL = $(WATT_ROOT)\lib\wattcpvc_imp.lib
EX_LIBS_DBG = $(WATT_ROOT)\lib\wattcpvc_imp_d.lib
!ELSE
CFLAGS = /DWIN32 /D_WIN32_WINNT=0x0600
EX_LIBS_REL = ws2_32.lib advapi32.lib kernel32.lib
EX_LIBS_DBG = ws2_32.lib advapi32.lib kernel32.lib
EX_LIBS_REL = ws2_32.lib advapi32.lib kernel32.lib iphlpapi.lib
EX_LIBS_DBG = ws2_32.lib advapi32.lib kernel32.lib iphlpapi.lib
!ENDIF

# -------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion deps/c-ares/README.cares
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ compatible with ares: a new name makes that more obvious to the public.
The original libares was distributed at
ftp://athena-dist.mit.edu:pub/ATHENA/ares (which seems to not be alive
anymore). A local copy of the original ares package is kept here:
https://c-ares.haxx.se/download/ares-1.1.1.tar.gz
https://c-ares.org/download/ares-1.1.1.tar.gz
10 changes: 5 additions & 5 deletions deps/c-ares/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
c-ares
======

[![Build Status](https://travis-ci.org/c-ares/c-ares.svg?branch=master)](https://travis-ci.org/c-ares/c-ares)
[![Build Status](https://api.cirrus-ci.com/github/c-ares/c-ares.svg)](https://cirrus-ci.com/github/c-ares/c-ares)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/aevgc5914tm72pvs/branch/master?svg=true)](https://ci.appveyor.com/project/c-ares/c-ares/branch/master)
[![Coverage Status](https://coveralls.io/repos/c-ares/c-ares/badge.svg?branch=master&service=github)](https://coveralls.io/github/c-ares/c-ares?branch=master)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/291/badge)](https://bestpractices.coreinfrastructure.org/projects/291)
Expand All @@ -14,19 +14,19 @@ perform multiple DNS queries in parallel. The primary examples of such
applications are servers which communicate with multiple clients and programs
with graphical user interfaces.

The full source code is available in the ['c-ares' release archives](https://c-ares.haxx.se/download/),
and in a git repository: http://github.com/c-ares/c-ares. See the
The full source code is available in the ['c-ares' release archives](https://c-ares.org/download/),
and in a git repository: https://github.com/c-ares/c-ares. See the
[INSTALL.md](INSTALL.md) file for build information.

If you find bugs, correct flaws, have questions or have comments in general in
regard to c-ares (or by all means the original ares too), get in touch with us
on the c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares
on the c-ares mailing list: https://lists.haxx.se/listinfo/c-ares

c-ares is of course distributed under the same MIT-style license as the
original ares.

You'll find all c-ares details and news here:
https://c-ares.haxx.se/
https://c-ares.org/


Notes for c-ares hackers
Expand Down
126 changes: 71 additions & 55 deletions deps/c-ares/RELEASE-NOTES
Original file line number Diff line number Diff line change
@@ -1,69 +1,85 @@
c-ares version 1.17.1
c-ares version 1.18.1

Due to a packaging issue with 1.17.0, we have released 1.17.1 to address that
issue. See 1.17.0 release notes below..
This is an urgent bugfix release for a regression made in 1.18.0.

Bug fixes:
o ares_getaddrinfo() would return ai_addrlen of 16 for ipv6
adddresses rather than the sizeof(struct sockaddr_in6)


c-ares version 1.17.0

Security:
o avoid read-heap-buffer-overflow in ares_parse_soa_reply found during
fuzzing [2] [3]
o Avoid theoretical buffer overflow in RC4 loop comparison [5]
o Empty hquery->name could lead to invalid memory access [15]
o ares_parse_{a,aaaa}_reply() could return a larger *naddrttls than was
passed in [17]
c-ares version 1.18.0

This is a feature and bugfix release. It addresses a couple of new feature
requests as well as a couple of bug fixes.

Changes:
o Update help information for adig, acountry, and ahost [4]
o Test Suite now uses dynamic system-assigned ports rather than hardcoded
ports to prevent failures in containers [10]
o Detect remote DNS server does not support EDNS using rules from RFC 6891 [12]
o Source tree has been reorganized to use a more modern layout [13]
o Allow parsing of CAA Resource Record [14]
o Add support for URI(Uniform Resource Identifier) records via
ares_parse_uri_reply() [1]
o Provide ares_nameser.h as a public interface as needed by NodeJS [5]
o Update URLs from c-ares.haxx.se to c-ares.org [9]
o During a domain search, treat ARES_ENODATA as ARES_NXDOMAIN so that the
search process will continue to the next domain in the search. [11]
o Turn ares_gethostbyname() into a wrapper for ares_getaddrinfo() as they
followed very similar code paths and ares_gethostbyaddr() has some more
desirable features such as priority sorting and parallel queries for
AF_UNSPEC. [12]
o ares_getaddrinfo() now contains a name element in the address info
structure as the last element. This is not an API or ABI break due to
the structure always being internally allocated and it being the last
element. [12]
o ares_parse_a_reply() and ares_parse_aaaa_reply() were nearly identical, those
now use the same helper functions for parsing rather than having their own
code. [12]
o RFC6761 Section 6.3 says "localhost" lookups need to be special cased to
return loopback addresses, and not forward queries to recursive dns servers.
On Windows this now returns all loopback addresses, on other systems it
returns 127.0.0.1 or ::1 always, and will never forward a request for
"localhost" to outside DNS servers. [13]
o Haiki: port [14]

Bug fixes:
o readaddrinfo bad sizeof() [1]
o Test cases should honor HAVE_WRITEV flag, not depend on WIN32 [6]
o FQDN with trailing period should be queried first [7]
o ares_getaddrinfo() was returning members of the struct as garbage values if
unset, and was not honoring ai_socktype and ai_protocol hints. [8] [9]
o ares_gethostbyname() with AF_UNSPEC and an ip address would fail [11]
o Properly document ares_set_local_ip4() uses host byte order [16]
o add build to .gitignore [2]
o z/OS minor update, add missing semicolon in ares_init.c [3]
o Fix building when latest ax_code_coverage.m4 is imported [4]
o Work around autotools 'error: too many loops' and other newer autotools
import related bugs.
o MinGW cross builds need advapi32 link as lower case [6]
o Cygwin build fix due to containing both socket.h and winsock2.h [7]
o ares_expand_name should allow underscores (_) as SRV records legitimately use
them [8]
o Allow '/' as a valid character for a returned name for CNAME in-addr.arpa
delegation [10]
o ares_getaddrinfo() was not honoring HOSTALIASES [12]
o ares_getaddrinfo() had some test cases disabled due to a bug in the test
framework itself which has now been resolved [12]
o Due to Travis-CI becoming unfriendly to open-source, Cirrus-CI has now been
brought online for automated unit testing.

Thanks go to these friendly people for their efforts and contributions:
@anonymoushelpishere
Anthony Penniston (@apenn-msft)
Biswapriyo Nath (@Biswa96)
Brad House (@bradh352)
Bulat Gaifullin (@bgaifullin)
Daniela Sonnenschein (@lxdicted)
Daniel Bevenius (@danbev)
Daniel Stenberg (@bagder)
David Hotham (@dimbleby)
Fionn Fitzmaurice (@fionn)
Gisle Vanem (@gavenm)
Ivan Baidakou (@basiliscos)
Jonathan Maye-Hobbs (@wheelpharoah)
Łukasz Marszał (@lmarszal)
lutianxiong (@ltx2018)
Seraphime Kirkovski (@Seraphime)
(14 contributors)
Dhrumil Rana (@dhrumilrana)
Felix Yan (@felixonmars)
Jérôme Duval (@korli)
Martin Holeš (@martin-256)
Sinan Kaya
(9 contributors)

References to bug reports and discussions on issues:
[1] = https://github.com/c-ares/c-ares/pull/331
[2] = https://github.com/c-ares/c-ares/pull/332
[3] = https://github.com/c-ares/c-ares/issues/333
[4] = https://github.com/c-ares/c-ares/pull/334
[5] = https://github.com/c-ares/c-ares/pull/336
[6] = https://github.com/c-ares/c-ares/pull/344
[7] = https://github.com/c-ares/c-ares/pull/345
[8] = https://github.com/c-ares/c-ares/issues/343
[9] = https://github.com/c-ares/c-ares/issues/317
[10] = https://github.com/c-ares/c-ares/pull/346
[11] = https://github.com/c-ares/c-ares/pull/204
[12] = https://github.com/c-ares/c-ares/pull/244
[13] = https://github.com/c-ares/c-ares/pull/349
[14] = https://github.com/c-ares/c-ares/pull/360
[15] = https://github.com/c-ares/c-ares/pull/367
[16] = https://github.com/c-ares/c-ares/pull/368
[17] = https://github.com/c-ares/c-ares/issues/371

[1] = https://github.com/c-ares/c-ares/pull/411
[2] = https://github.com/c-ares/c-ares/pull/410
[3] = https://github.com/c-ares/c-ares/pull/414
[4] = https://github.com/c-ares/c-ares/pull/418
[5] = https://github.com/c-ares/c-ares/pull/417
[6] = https://github.com/c-ares/c-ares/pull/420
[7] = https://github.com/c-ares/c-ares/pull/422
[8] = https://github.com/c-ares/c-ares/issues/424
[9] = https://github.com/c-ares/c-ares/issues/423
[10] = https://github.com/c-ares/c-ares/issues/427
[11] = https://github.com/c-ares/c-ares/issues/426
[12] = https://github.com/c-ares/c-ares/pull/428
[13] = https://github.com/c-ares/c-ares/pull/430
[14] = https://github.com/c-ares/c-ares/pull/431
Loading

0 comments on commit 05e0e37

Please sign in to comment.