Skip to content

Commit b82f905

Browse files
rvaggjasnell
authored andcommitted
deps: upgrade to c-ares v1.14.0
* 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>
1 parent 010587b commit b82f905

15 files changed

+653
-165
lines changed

deps/cares/cares.gyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
'include/ares_rules.h',
4141
'include/ares_version.h',
4242
'include/nameser.h',
43+
'src/ares_android.c',
4344
'src/ares_cancel.c',
4445
'src/ares__close_sockets.c',
4546
'src/ares_create_query.c',

deps/cares/include/ares.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@
6868
# include <netinet/in.h>
6969
#endif
7070

71+
#if defined(ANDROID) || defined(__ANDROID__)
72+
#include <jni.h>
73+
#endif
74+
7175
#ifdef __cplusplus
7276
extern "C" {
7377
#endif
@@ -307,6 +311,12 @@ CARES_EXTERN int ares_library_init_mem(int flags,
307311
void (*afree)(void *ptr),
308312
void *(*arealloc)(void *ptr, size_t size));
309313

314+
#if defined(ANDROID) || defined(__ANDROID__)
315+
CARES_EXTERN void ares_library_init_jvm(JavaVM *jvm);
316+
CARES_EXTERN int ares_library_init_android(jobject connectivity_manager);
317+
CARES_EXTERN int ares_library_android_initialized(void);
318+
#endif
319+
310320
CARES_EXTERN int ares_library_initialized(void);
311321

312322
CARES_EXTERN void ares_library_cleanup(void);

deps/cares/include/ares_build.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,14 @@
194194
/* Data type definition of ares_ssize_t. */
195195
#ifdef _WIN32
196196
# ifdef _WIN64
197-
typedef __int64 ares_ssize_t;
197+
# define CARES_TYPEOF_ARES_SSIZE_T __int64
198198
# else
199-
typedef long ares_ssize_t;
199+
# define CARES_TYPEOF_ARES_SSIZE_T long
200200
# endif
201201
#else
202-
# ifdef CARES_TYPEOF_ARES_SSIZE_T
203-
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
204-
# else
205-
typedef ssize_t ares_ssize_t;
206-
# endif
202+
# define CARES_TYPEOF_ARES_SSIZE_T ssize_t
207203
#endif
208204

205+
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
206+
209207
#endif /* __CARES_BUILD_H */

deps/cares/include/ares_version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
#define ARES__VERSION_H
44

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

88
#define ARES_VERSION_MAJOR 1
9-
#define ARES_VERSION_MINOR 13
9+
#define ARES_VERSION_MINOR 14
1010
#define ARES_VERSION_PATCH 0
1111
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
1212
(ARES_VERSION_MINOR<<8)|\
1313
(ARES_VERSION_PATCH))
14-
#define ARES_VERSION_STR "1.13.0"
14+
#define ARES_VERSION_STR "1.14.0"
1515

1616
#if (ARES_VERSION >= 0x010700)
1717
# define CARES_HAVE_ARES_LIBRARY_INIT 1

deps/cares/src/AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Frederic Germain
3737
Geert Uytterhoeven
3838
George Neill
3939
Gisle Vanem
40+
Google LLC
4041
Gregor Jasny
4142
Guenter Knauf
4243
Guilherme Balena Versiani
@@ -45,6 +46,7 @@ Henrik Stoerner
4546
Jakub Hrozek
4647
James Bursa
4748
Jérémy Lal
49+
John Schember
4850
Keith Shaw
4951
Lei Shi
5052
Marko Kreen

deps/cares/src/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ c-ares
55
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/03i7151772eq3wn3/branch/master?svg=true)](https://ci.appveyor.com/project/c-ares/c-ares)
66
[![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)
77
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/291/badge)](https://bestpractices.coreinfrastructure.org/projects/291)
8+
[![Releases](https://coderelease.io/badge/c-ares/c-ares)](https://coderelease.io/github/repository/c-ares/c-ares)
89

910
This is c-ares, an asynchronous resolver library. It is intended for
1011
applications which need to perform DNS queries without blocking, or need to

deps/cares/src/RELEASE-NOTES

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,47 @@
1-
c-ares version 1.13.0
1+
c-ares version 1.14.0
22

33
Changes:
4-
5-
o cmake build system support added
6-
o Add virtual function set for socket IO: ares_set_socket_functions [5]
4+
o android: Introduce new ares_library_init_android() call for Oreo support. [5]
75

86
Bug fixes:
97

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

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

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

4034
References to bug reports and discussions on issues:
4135

42-
[1] = https://c-ares.haxx.se/adv_20170620.html
43-
[2] = https://github.com/c-ares/c-ares/issues/69
44-
[3] = https://github.com/c-ares/c-ares/issues/71
45-
[4] = https://github.com/c-ares/c-ares/issues/83
46-
[5] = https://github.com/c-ares/c-ares/issues/72
47-
[6] = https://github.com/c-ares/c-ares/issues/81
48-
[7] = https://github.com/c-ares/c-ares/issues/92
49-
[8] = https://github.com/c-ares/c-ares/issues/101
50-
[9] = https://github.com/c-ares/c-ares/issues/97
51-
[10] = https://github.com/c-ares/c-ares/issues/62
52-
[11] = https://github.com/c-ares/c-ares/issues/93
53-
[12] = https://github.com/c-ares/c-ares/issues/113
36+
[1] = https://github.com/c-ares/c-ares/commit/18ea99
37+
[2] = https://github.com/c-ares/c-ares/issues/150
38+
[3] = https://github.com/c-ares/c-ares/pull/138
39+
[4] = https://github.com/c-ares/c-ares/pull/144
40+
[5] = https://github.com/c-ares/c-ares/pull/148
41+
[6] = https://github.com/c-ares/c-ares/pull/142
42+
[7] = https://github.com/c-ares/c-ares/pull/175
43+
[8] = https://c-ares.haxx.se/mail/c-ares-archive-2011-06/0012.shtml
44+
[9] = https://github.com/c-ares/c-ares/pull/180
45+
[10] = https://github.com/c-ares/c-ares/pull/160
46+
[11] = https://github.com/c-ares/c-ares/pull/175
47+
[12] = https://github.com/c-ares/c-ares/pull/142

0 commit comments

Comments
 (0)