Skip to content

Commit 35d4efb

Browse files
committed
deps: update c-ares to 1.19.1
PR-URL: #48115 Backport-PR-URL: nodejs-private/node-private#437 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 392dfed commit 35d4efb

37 files changed

+2792
-986
lines changed

deps/cares/CHANGES

+227-73
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,232 @@
11
Changelog for the c-ares project. Generated with git2changes.pl
22

3+
Version 1.19.1 (22 May 2023)
4+
5+
bradh352 (22 May 2023)
6+
- Makefile.inc Windows requires tabs not spaces for nmake
7+
8+
GitHub (22 May 2023)
9+
- [Daniel Stenberg brought this change]
10+
11+
ares_expand_name: fix compiler warnings (#522)
12+
13+
Fix some compiler warnings (not introduced in this release)
14+
15+
Fix By: Daniel Stenberg (@bagder)
16+
17+
bradh352 (22 May 2023)
18+
- windows MSVC compiler fix on 32bit
19+
20+
- update security advisory links
21+
22+
- minor CI issues fixes for imported inet_net_pton
23+
24+
- ares_rand static analysis fixes from CI
25+
26+
- windows build fix
27+
28+
- security release notes
29+
30+
GitHub (22 May 2023)
31+
- [Brad House brought this change]
32+
33+
Merge pull request from GHSA-9g78-jv2r-p7vc
34+
35+
- [Brad House brought this change]
36+
37+
Merge pull request from GHSA-x6mf-cxr9-8q6v
38+
39+
* Merged latest OpenBSD changes for inet_net_pton_ipv6() into c-ares.
40+
* Always use our own IP conversion functions now, do not delegate to OS
41+
so we can have consistency in testing and fuzzing.
42+
* Removed bogus test cases that never should have passed.
43+
* Add new test case for crash bug found.
44+
45+
Fix By: Brad House (@bradh352)
46+
47+
- [Brad House brought this change]
48+
49+
Merge pull request from GHSA-8r8p-23f3-64c2
50+
51+
* segment random number generation into own file
52+
53+
* abstract random code to make it more modular so we can have multiple backends
54+
55+
* rand: add support for arc4random_buf() and also direct CARES_RANDOM_FILE reading
56+
57+
* autotools: fix detection of arc4random_buf
58+
59+
* rework initial rc4 seed for PRNG as last fallback
60+
61+
* rc4: more proper implementation, simplified for clarity
62+
63+
* clarifications
64+
65+
bradh352 (20 May 2023)
66+
- add public release note information
67+
68+
- bump version to 1.19.1
69+
70+
GitHub (6 May 2023)
71+
- [Gregor Jasny brought this change]
72+
73+
test: fix warning about uninitialized memory (#515)
74+
75+
fix warning in tests
76+
77+
Fix By: Gregor Jasny (@gjasny)
78+
79+
- [lifenjoiner brought this change]
80+
81+
Turn off IPV6_V6ONLY on Windows if it is supported (#520)
82+
83+
Turn off IPV6_V6ONLY on Windows if it is supported, support for IPv4-mapped IPv6 addresses.
84+
85+
IPV6_V6ONLY refs:
86+
https://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses
87+
https://github.com/golang/go/blob/master/src/net/ipsock_posix.go
88+
https://en.wikipedia.org/wiki/Unix-like
89+
off:
90+
https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html#proc-sys-net-ipv6-variables
91+
https://man.netbsd.org/inet6.4
92+
https://man.freebsd.org/cgi/man.cgi?query=inet6
93+
https://github.com/apple-oss-distributions/xnu/blob/main/bsd/man/man4/inet6.4
94+
on:
95+
https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options
96+
acts like off, but returns 1 and dummy setting:
97+
https://man.dragonflybsd.org/?command=inet6
98+
https://man.dragonflybsd.org/?command=ip6
99+
unsupported and read-only returns 1:
100+
https://man.openbsd.org/inet6.4
101+
102+
default value refs:
103+
https://datatracker.ietf.org/doc/html/rfc3493#section-5.3
104+
https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html#proc-sys-net-ipv6-variables
105+
106+
- [Brad House brought this change]
107+
108+
Merge pull request from GHSA-54xr-f67r-4pc4
109+
110+
* CARES_RANDOM_FILE should always default to /dev/urandom
111+
112+
During cross-compilation, CARES_RANDOM_FILE may not be able to be appropriately
113+
detected, therefore we should always set it to /dev/urandom and allow the
114+
entity requesting compilation override the value. The code does appropriately
115+
fall back if CARES_RANDOM_FILE cannot be opened.
116+
117+
* use set not option
118+
119+
bradh352 (18 Mar 2023)
120+
- ares_getaddrinfo using service of "0" should be allowed
121+
122+
As per #517 glibc allows a service/servname of "0" to be treated the
123+
same as if NULL was provided. Also, add a sanity check to ensure
124+
the port number is in range instead of a blind cast.
125+
126+
Fixes: #517
127+
Fix By: Brad House (@bradh352)
128+
129+
GitHub (10 Feb 2023)
130+
- [Nikolaos Chatzikonstantinou brought this change]
131+
132+
fix memory leak in ares_send (#511)
133+
134+
When the condition channel->nservers < 1 holds, the function returns
135+
prematurely, without deallocating query->tcpbuf. We rearrange the
136+
check to be done prior to the allocations, avoiding the memory
137+
leak. In this way, we also avoid unnecessary allocations if
138+
channel->nservers < 1 holds.
139+
140+
Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
141+
142+
- [Nikolaos Chatzikonstantinou brought this change]
143+
144+
change comment style to old-style (#513)
145+
146+
Following the README.md guidelines,
147+
148+
"Comments must be written in the old-style"
149+
150+
the comment is changed to the old style.
151+
152+
Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
153+
154+
- [Nikolaos Chatzikonstantinou brought this change]
155+
156+
use strncasecmp in ares__strsplit (#512)
157+
158+
strncasecmp on platforms that don't already have it is already #define'd to a private implementation. There is no need to have OS-specific logic. Also removes ares__strsplit.h as a header as ares_private.h already includes it.
159+
160+
Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
161+
162+
- [Yijie Ma brought this change]
163+
164+
Fix a typo in ares_init_options.3 (#510)
165+
166+
that -> than
167+
168+
Fix By: Yijie Ma (@yijiem)
169+
170+
- [Douglas R. Reno brought this change]
171+
172+
Watcom Portability Improvements (#509)
173+
174+
- Modify the Watcom Makefile for the source code reorganization (#352)
175+
- Add *.map files into .gitignore
176+
- Fix build errors with Watcom's builtin Windows SDK (which is rather
177+
outdated). It's smart enough to understand Windows Vista, but doesn't
178+
have PMIB_UNICASTIPADDRESS_TABLE or MIB_IPFORWARD_ROW2.
179+
180+
It may be possible to use a different Windows SDK with the Watcom
181+
compiler, such as the most recent Windows 10 SDK. Alternatively the SDK
182+
in OpenWatcom 2.0 (which is in development) should fix this.
183+
184+
I have no problems testing this Makefile prior to releases, just give me
185+
a ping.
186+
187+
Tested with Windows Vista, Windows 7, and Windows 10 using 'adig',
188+
'acountry', and 'ahost'. This also seems to work on Windows XP, though
189+
this is likely due to the compiler in use.
190+
191+
Fix By: Douglas R. Reno (@renodr)
192+
Fixes Bug: #352
193+
194+
- [Jay Freeman (saurik) brought this change]
195+
196+
ignore aminclude_static.am, as generated by AX_AM_MACROS_STATIC (#508)
197+
198+
Fix By: Jay Freeman (@saurik)
199+
200+
- [Jay Freeman (saurik) brought this change]
201+
202+
sync ax_pthread.m4 with upstream (#507)
203+
204+
The version in the repository is many years old so this PR simply pulls in the latest
205+
available revision from:
206+
http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=tree;f=m4
207+
208+
Fix By: Jay Freeman (@saurik)
209+
210+
- [Chilledheart brought this change]
211+
212+
Windows: Invalid stack variable out of scope for HOSTS file path (#502)
213+
214+
In some conditions Windows might try to use a stack address that has gone out of scope when determining where to read the hosts data from for file lookups.
215+
216+
Fix By: @Chilledheart
217+
218+
- [Brad House brought this change]
219+
220+
sync ax_cxx_compile_stdcxx_11.m4 with upstream (#505)
221+
222+
It was reported that ax_cxx_compile_stdcxx_11.m4 was not compatible with uclibc.
223+
The version in the repository is many years old so this PR simply pulls in the latest
224+
available revision from:
225+
http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=tree;f=m4
226+
227+
Fixes Bug: #504
228+
Fix By: Brad House (@bradh352)
229+
3230
Version 1.19.0 (18 Jan 2023)
4231

5232
bradh352 (18 Jan 2023)
@@ -5325,76 +5552,3 @@ Daniel Stenberg (23 Mar 2010)
53255552
- git now, not CVS
53265553

53275554
- ignore lots of generated files
5328-
5329-
- [Daniel Johnson brought this change]
5330-
5331-
Fix warnings for clang
5332-
5333-
Yang Tse (17 Mar 2010)
5334-
- replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing
5335-
5336-
- update outdated serial number
5337-
5338-
- fix compiler warning
5339-
5340-
- watt32 compilation fix
5341-
5342-
- Added another VS10 version string
5343-
5344-
- fix line break
5345-
5346-
- removed usage of 's6_addr', fixing compilation issue triggered with no
5347-
longer using 'in6_addr' but only our 'ares_in6_addr' struct
5348-
5349-
Daniel Stenberg (5 Mar 2010)
5350-
- Daniel Johnson provided fixes for building with the clang compiler
5351-
5352-
Yang Tse (5 Mar 2010)
5353-
- Added IPv6 name servers support
5354-
5355-
Gisle Vanem (5 Mar 2010)
5356-
- Ops!. Readded ares_nowarn.h.
5357-
5358-
- Added ares_nowarn.c.
5359-
5360-
Yang Tse (28 Feb 2010)
5361-
- Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems
5362-
5363-
- Added ares_nowarn.* to VC6 project file
5364-
5365-
- Added SIZEOF_INT definition
5366-
5367-
- fix compiler warning
5368-
5369-
- fix compiler warning
5370-
5371-
- fix compiler warning
5372-
5373-
Daniel Stenberg (17 Feb 2010)
5374-
- ares_reinit()
5375-
5376-
- To allow an app to force a re-read of /etc/resolv.conf etc, pretty much
5377-
like the res_init() resolver function offers
5378-
5379-
- - Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't
5380-
check for broken connections like ares_process() did. Based on that, I
5381-
merged the two functions into a single generic one with two front-ends.
5382-
5383-
Yang Tse (30 Dec 2009)
5384-
- VMS specific preprocessor symbol checking adjustments
5385-
5386-
- Mention last changes
5387-
5388-
- - Fix configure_socket() to use ares_socket_t instead of int data type.
5389-
5390-
- - Where run-time error checks enabling compiler option /GZ was used it is now
5391-
replaced with equivalent /RTCsu for Visual Studio 2003 and newer versions.
5392-
5393-
- Compiler option /GX is now replaced with equivalent /EHsc for all versions.
5394-
5395-
- - Ingmar Runge noticed that Windows config-win32.h configuration file
5396-
did not include a definition for HAVE_CLOSESOCKET which resulted in
5397-
function close() being inappropriately used to close sockets.
5398-
5399-
Daniel Stenberg (30 Nov 2009)
5400-
- start working on 1.7.1

deps/cares/CMakeLists.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ INCLUDE (CheckCSourceCompiles)
88
INCLUDE (CheckStructHasMember)
99
INCLUDE (CheckLibraryExists)
1010

11-
PROJECT (c-ares LANGUAGES C VERSION "1.19.0" )
11+
PROJECT (c-ares LANGUAGES C VERSION "1.19.1" )
1212

1313
# Set this version before release
14-
SET (CARES_VERSION "1.19.0")
14+
SET (CARES_VERSION "1.19.1")
1515

1616
INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are wrong.
1717

@@ -26,7 +26,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
2626
# For example, a version of 4:0:2 would generate output such as:
2727
# libname.so -> libname.so.2
2828
# libname.so.2 -> libname.so.2.2.0
29-
SET (CARES_LIB_VERSIONINFO "8:0:6")
29+
SET (CARES_LIB_VERSIONINFO "8:1:6")
3030

3131

3232
OPTION (CARES_STATIC "Build as a static library" OFF)
@@ -36,6 +36,8 @@ OPTION (CARES_STATIC_PIC "Build the static library as PIC (position independent)
3636
OPTION (CARES_BUILD_TESTS "Build and run tests" OFF)
3737
OPTION (CARES_BUILD_CONTAINER_TESTS "Build and run container tests (implies CARES_BUILD_TESTS, Linux only)" OFF)
3838
OPTION (CARES_BUILD_TOOLS "Build tools" ON)
39+
SET (CARES_RANDOM_FILE "/dev/urandom" CACHE STRING "Suitable File / Device Path for entropy, such as /dev/urandom")
40+
3941

4042
# Tests require static to be enabled on Windows to be able to access otherwise hidden symbols
4143
IF (CARES_BUILD_TESTS AND (NOT CARES_STATIC) AND WIN32)
@@ -391,6 +393,8 @@ CHECK_SYMBOL_EXISTS (strncasecmp "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNCAS
391393
CHECK_SYMBOL_EXISTS (strncmpi "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNCMPI)
392394
CHECK_SYMBOL_EXISTS (strnicmp "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNICMP)
393395
CHECK_SYMBOL_EXISTS (writev "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_WRITEV)
396+
CHECK_SYMBOL_EXISTS (arc4random_buf "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_ARC4RANDOM_BUF)
397+
394398

395399
# On Android, the system headers may define __system_property_get(), but excluded
396400
# from libc. We need to perform a link test instead of a header/symbol test.
@@ -402,10 +406,6 @@ SET (CMAKE_REQUIRED_DEFINITIONS)
402406
SET (CMAKE_REQUIRED_LIBRARIES)
403407

404408

405-
find_file(CARES_RANDOM_FILE urandom /dev)
406-
mark_as_advanced(CARES_RANDOM_FILE)
407-
408-
409409
################################################################################
410410
# recv, recvfrom, send, getnameinfo, gethostname
411411
# ARGUMENTS AND RETURN VALUES

0 commit comments

Comments
 (0)