Skip to content

Commit

Permalink
deps: upgrade to c-ares v1.14.0
Browse files Browse the repository at this point in the history
 * Fix patch for CVE-2017-1000381 to not be overly aggressive.
 * win32: Preserve DNS server order returned by Windows when sorting and
   exclude DNS servers in legacy subnets.
 * win32: Support most recent Visual Studio 2017.
 * gethostbyaddr should fail with ECANCELLED not ENOTFOUND when
   ares_cancel is called.
 * win32: Exclude legacy ipv6 subnets.
 * android: Applications compiled for Oreo can no longer use
   __system_property_get and must use Java calls to retrieve DNS
   servers.
 * win32: Force use of ANSI functions.
 * CMake minimum version is now 3.1.
 * ares_gethostbyname.3: fix callback status values.
 * docs: Document WSAStartup requirement.
 * Fix a typo in init_by_resolv_conf.
 * Android JNI code leaks local references in some cases.
 * Force using the ANSI versions of WinAPI functions.

The most important changes have already been included via

 * 50e580d deps: cherry-pick 0ef4a0c64b6 from c-ares upstream
 * 9a0631d deps: cherry-pick 18ea996 from c-ares upstream

PR-URL: #19939
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
rvagg authored and jasnell committed Apr 16, 2018
1 parent 010587b commit b82f905
Show file tree
Hide file tree
Showing 15 changed files with 653 additions and 165 deletions.
1 change: 1 addition & 0 deletions deps/cares/cares.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'include/ares_rules.h',
'include/ares_version.h',
'include/nameser.h',
'src/ares_android.c',
'src/ares_cancel.c',
'src/ares__close_sockets.c',
'src/ares_create_query.c',
Expand Down
10 changes: 10 additions & 0 deletions deps/cares/include/ares.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
# include <netinet/in.h>
#endif

#if defined(ANDROID) || defined(__ANDROID__)
#include <jni.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif
Expand Down Expand Up @@ -307,6 +311,12 @@ CARES_EXTERN int ares_library_init_mem(int flags,
void (*afree)(void *ptr),
void *(*arealloc)(void *ptr, size_t size));

#if defined(ANDROID) || defined(__ANDROID__)
CARES_EXTERN void ares_library_init_jvm(JavaVM *jvm);
CARES_EXTERN int ares_library_init_android(jobject connectivity_manager);
CARES_EXTERN int ares_library_android_initialized(void);
#endif

CARES_EXTERN int ares_library_initialized(void);

CARES_EXTERN void ares_library_cleanup(void);
Expand Down
12 changes: 5 additions & 7 deletions deps/cares/include/ares_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,14 @@
/* Data type definition of ares_ssize_t. */
#ifdef _WIN32
# ifdef _WIN64
typedef __int64 ares_ssize_t;
# define CARES_TYPEOF_ARES_SSIZE_T __int64
# else
typedef long ares_ssize_t;
# define CARES_TYPEOF_ARES_SSIZE_T long
# endif
#else
# ifdef CARES_TYPEOF_ARES_SSIZE_T
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
# else
typedef ssize_t ares_ssize_t;
# endif
# define CARES_TYPEOF_ARES_SSIZE_T ssize_t
#endif

typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;

#endif /* __CARES_BUILD_H */
6 changes: 3 additions & 3 deletions deps/cares/include/ares_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#define ARES__VERSION_H

/* This is the global package copyright */
#define ARES_COPYRIGHT "2004 - 2016 Daniel Stenberg, <daniel@haxx.se>."
#define ARES_COPYRIGHT "2004 - 2017 Daniel Stenberg, <daniel@haxx.se>."

#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 13
#define ARES_VERSION_MINOR 14
#define ARES_VERSION_PATCH 0
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.13.0"
#define ARES_VERSION_STR "1.14.0"

#if (ARES_VERSION >= 0x010700)
# define CARES_HAVE_ARES_LIBRARY_INIT 1
Expand Down
2 changes: 2 additions & 0 deletions deps/cares/src/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Frederic Germain
Geert Uytterhoeven
George Neill
Gisle Vanem
Google LLC
Gregor Jasny
Guenter Knauf
Guilherme Balena Versiani
Expand All @@ -45,6 +46,7 @@ Henrik Stoerner
Jakub Hrozek
James Bursa
Jérémy Lal
John Schember
Keith Shaw
Lei Shi
Marko Kreen
Expand Down
1 change: 1 addition & 0 deletions deps/cares/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ c-ares
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/03i7151772eq3wn3/branch/master?svg=true)](https://ci.appveyor.com/project/c-ares/c-ares)
[![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)
[![Releases](https://coderelease.io/badge/c-ares/c-ares)](https://coderelease.io/github/repository/c-ares/c-ares)

This is c-ares, an asynchronous resolver library. It is intended for
applications which need to perform DNS queries without blocking, or need to
Expand Down
76 changes: 35 additions & 41 deletions deps/cares/src/RELEASE-NOTES
Original file line number Diff line number Diff line change
@@ -1,53 +1,47 @@
c-ares version 1.13.0
c-ares version 1.14.0

Changes:

o cmake build system support added
o Add virtual function set for socket IO: ares_set_socket_functions [5]
o android: Introduce new ares_library_init_android() call for Oreo support. [5]

Bug fixes:

o CVE-2017-1000381: c-ares NAPTR parser out of bounds access [1]
o macos: do not set HAVE_CLOCK_GETTIME_MONOTONIC
o test: check ares_create_query with too-long name
o dist: add ares_library_initialized.* to the tarball
o fix build on OpenBSD
o dist: ship msvc_ver.inc too [2]
o test: Add gTest/gMock files to SOURCES
o test: add fuzz entrypoint for ares_create_query()
o configure: clock_gettime workaround [3]
o docs: convert INSTALL to MarkDown & tweak [4]
o ares_process: fix return type of socket_create function (win32 warning)
o docs: fixed references to ares_set_local_ip4 and ares_set_local_ip6
o Windows DNS server sorting [6]
o Use ares_socklen_t instead of socket_t [7]
o ares_create_query: use ares_free not naked free
o msvc_ver.inc support most recent Visual Studio 2017 [8]
o acountry: Convert char from ISO-8859-1 to UTF-8 [9]
o ares_expand_name: limit number of indirections
o configure: do not check for ar if specified manually [10]
o Added support for Windows DNS Suffix Search List [11]
o ares.h: support compiling with QNX [12]
o Fix patch for CVE-2017-1000381 to not be overly aggressive. [1]
o win32: Preserve DNS server order returned by Windows when sorting and exclude
DNS servers in legacy subnets. [2] [4]
o win32: Support most recent Visual Studio 2017
o gethostbyaddr should fail with ECANCELLED not ENOTFOUND when ares_cancel
is called. [3]
o win32: Exclude legacy ipv6 subnets [4]
o android: Applications compiled for Oreo can no longer use
__system_property_get and must use Java calls to retrieve DNS servers.
[5] [7]
o win32: Force use of ANSI functions [6]
o CMake minimum version is now 3.1
o ares_gethostbyname.3: fix callback status values [8]
o docs: Document WSAStartup requirement [9]
o Fix a typo in init_by_resolv_conf [10]
o Android JNI code leaks local references in some cases [11]
o Force using the ANSI versions of WinAPI functions [12]

Thanks go to these friendly people for their efforts and contributions:

Aaron Bieber, Andrew Sullivan, Brad House, Bruce Stephens, Calle Wilund,
Chris Araman, Christian Ammer, Daniel Stenberg, David Drysdale, David Hotham,
Dionna Glaze, Gregor Jasny, Michael Osei, Mulle kybernetiK, noiz at github,
Sergii Pylypenko, Stephen Sorley, Thomas Köckerbauer,
AC Thompson, Anna Henningsen, Antonio Tajuelo, Brad House, Brad Spencer,
Christian Ammer, Daniel Stenberg, David Drysdale, David Hotham, Felix Yan,
Gergely Nagy, Gregor Jasny, Jakub Hrozek, John Schember,
Konstantinos Sofokleous, Roman Teterin, Sergey Kolomenkin, Sheel Bedi,
(18 contributors)

References to bug reports and discussions on issues:

[1] = https://c-ares.haxx.se/adv_20170620.html
[2] = https://github.com/c-ares/c-ares/issues/69
[3] = https://github.com/c-ares/c-ares/issues/71
[4] = https://github.com/c-ares/c-ares/issues/83
[5] = https://github.com/c-ares/c-ares/issues/72
[6] = https://github.com/c-ares/c-ares/issues/81
[7] = https://github.com/c-ares/c-ares/issues/92
[8] = https://github.com/c-ares/c-ares/issues/101
[9] = https://github.com/c-ares/c-ares/issues/97
[10] = https://github.com/c-ares/c-ares/issues/62
[11] = https://github.com/c-ares/c-ares/issues/93
[12] = https://github.com/c-ares/c-ares/issues/113
[1] = https://github.com/c-ares/c-ares/commit/18ea99
[2] = https://github.com/c-ares/c-ares/issues/150
[3] = https://github.com/c-ares/c-ares/pull/138
[4] = https://github.com/c-ares/c-ares/pull/144
[5] = https://github.com/c-ares/c-ares/pull/148
[6] = https://github.com/c-ares/c-ares/pull/142
[7] = https://github.com/c-ares/c-ares/pull/175
[8] = https://c-ares.haxx.se/mail/c-ares-archive-2011-06/0012.shtml
[9] = https://github.com/c-ares/c-ares/pull/180
[10] = https://github.com/c-ares/c-ares/pull/160
[11] = https://github.com/c-ares/c-ares/pull/175
[12] = https://github.com/c-ares/c-ares/pull/142
Loading

0 comments on commit b82f905

Please sign in to comment.