Skip to content

Commit 9ecba3f

Browse files
nodejs-github-botrichardlau
authored andcommitted
deps: update c-ares to 1.34.7
1 parent cac1a9f commit 9ecba3f

66 files changed

Lines changed: 1141 additions & 371 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deps/cares/CMakeLists.txt

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles)
1212
INCLUDE (CheckStructHasMember)
1313
INCLUDE (CheckLibraryExists)
1414

15-
PROJECT (c-ares LANGUAGES C VERSION "1.34.6" )
15+
PROJECT (c-ares LANGUAGES C VERSION "1.34.7" )
1616

1717
# Set this version before release
1818
SET (CARES_VERSION "${PROJECT_VERSION}")
@@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
3030
# For example, a version of 4:0:2 would generate output such as:
3131
# libname.so -> libname.so.2
3232
# libname.so.2 -> libname.so.2.2.0
33-
SET (CARES_LIB_VERSIONINFO "21:5:19")
33+
SET (CARES_LIB_VERSIONINFO "21:6:19")
3434

3535

3636
OPTION (CARES_STATIC "Build as a static library" OFF)
@@ -43,6 +43,7 @@ OPTION (CARES_BUILD_TOOLS "Build tools"
4343
OPTION (CARES_SYMBOL_HIDING "Hide private symbols in shared libraries" OFF)
4444
OPTION (CARES_THREADS "Build with thread-safety support" ON)
4545
OPTION (CARES_COVERAGE "Build for code coverage" OFF)
46+
OPTION (CARES_WERROR "Treat compiler warnings on the c-ares library as errors" OFF)
4647
SET (CARES_RANDOM_FILE "/dev/urandom" CACHE STRING "Suitable File / Device Path for entropy, such as /dev/urandom")
4748

4849
# Tests require static to be enabled on Windows to be able to access otherwise hidden symbols
@@ -54,6 +55,30 @@ ENDIF ()
5455

5556
INCLUDE (EnableWarnings)
5657

58+
# Optionally treat warnings as errors for the c-ares library itself. This is
59+
# applied per-target (see cares_set_werror() usage) rather than globally so it
60+
# does not affect the test/fuzz harnesses (which carry their own warnings) or
61+
# CMake's own compiler feature checks. Enabled in CI only on toolchains known
62+
# to be free of spurious warnings at our high warning levels.
63+
FUNCTION (cares_set_werror target)
64+
IF (NOT CARES_WERROR)
65+
RETURN ()
66+
ENDIF ()
67+
IF (MSVC)
68+
TARGET_COMPILE_OPTIONS (${target} PRIVATE /WX)
69+
ELSE ()
70+
TARGET_COMPILE_OPTIONS (${target} PRIVATE -Werror)
71+
# Modern libc headers (e.g. glibc <string.h>) use the C11 _Generic
72+
# keyword for const-correctness of strchr()/memchr()/etc. Clang flags
73+
# that as a C11 extension under our C90 + -Wpedantic build even though it
74+
# originates in a system header at our call sites. It is not something
75+
# we can fix in our own code, so warn but do not fail on it.
76+
IF (CMAKE_C_COMPILER_ID MATCHES "Clang")
77+
TARGET_COMPILE_OPTIONS (${target} PRIVATE -Wno-error=c11-extensions)
78+
ENDIF ()
79+
ENDIF ()
80+
ENDFUNCTION ()
81+
5782
IF (MSVC)
5883
# allow linking against the static runtime library in msvc
5984
OPTION (CARES_MSVC_STATIC_RUNTIME "Link against the static runtime library" OFF)

deps/cares/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# [![c-ares logo](https://c-ares.org/art/c-ares-logo.svg)](https://c-ares.org/)
22

3-
[![Build Status](https://api.cirrus-ci.com/github/c-ares/c-ares.svg?branch=main)](https://cirrus-ci.com/github/c-ares/c-ares)
4-
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/aevgc5914tm72pvs/branch/main?svg=true)](https://ci.appveyor.com/project/c-ares/c-ares/branch/main)
3+
[![Build Status](https://github.com/c-ares/c-ares/actions/workflows/ubuntu-latest.yml/badge.svg?branch=main)](https://github.com/c-ares/c-ares/actions/workflows/ubuntu-latest.yml)
4+
[![Windows Build Status](https://github.com/c-ares/c-ares/actions/workflows/windows.yml/badge.svg?branch=main)](https://github.com/c-ares/c-ares/actions/workflows/windows.yml)
55
[![Coverage Status](https://coveralls.io/repos/github/c-ares/c-ares/badge.svg?branch=main)](https://coveralls.io/github/c-ares/c-ares?branch=main)
66
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/291/badge)](https://bestpractices.coreinfrastructure.org/projects/291)
77
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/c-ares.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:c-ares)

deps/cares/RELEASE-NOTES.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,93 @@
1+
## c-ares version 1.34.7 - July 6 2026
2+
3+
This is a security release.
4+
5+
Security:
6+
* CVE-2026-33630. Use-after-free / double-free in c-ares' query-completion
7+
handling, remotely triggerable via ares_getaddrinfo() over TCP. Please see
8+
https://github.com/c-ares/c-ares/security/advisories/GHSA-6wfj-rwm7-3542
9+
* CPU-exhaustion denial of service via unbounded DNS name compression pointer
10+
chains. Please see
11+
https://github.com/c-ares/c-ares/security/advisories/GHSA-pjmc-gx33-gc76
12+
* Memory-amplification denial of service via unvalidated DNS header record
13+
counts. Please see
14+
https://github.com/c-ares/c-ares/security/advisories/GHSA-jv8r-gqr9-68wj
15+
16+
Changes:
17+
* `ares_getaddrinfo()`: handle a NULL node per POSIX and implement
18+
`ARES_AI_PASSIVE`. [PR #1186](https://github.com/c-ares/c-ares/pull/1186)
19+
* Mark parameters in callbacks as const.
20+
[PR #1060](https://github.com/c-ares/c-ares/pull/1060)
21+
* Correct `ARES_CLASS_HESOID` misspelling to `ARES_CLASS_HESIOD`.
22+
[PR #1092](https://github.com/c-ares/c-ares/pull/1092)
23+
24+
Bugfixes:
25+
* Fix sticky server recovery when all servers have failures. [PR #1192](https://github.com/c-ares/c-ares/pull/1192)
26+
* Fix UDP socket exhaustion regression: retire connections per-connection, not via server failure count. [PR #1197](https://github.com/c-ares/c-ares/pull/1197)
27+
* Guard DNS record binary length overflow. [PR #1168](https://github.com/c-ares/c-ares/pull/1168)
28+
* Prevent integer overflow in allocation size calculations. [PR #1147](https://github.com/c-ares/c-ares/pull/1147)
29+
* Prevent overflow in ares_array allocation size calculations. [PR #1117](https://github.com/c-ares/c-ares/pull/1117)
30+
* Prevent integer overflow in buffer size calculation. [PR #1116](https://github.com/c-ares/c-ares/pull/1116)
31+
* Add overflow checks to ares_buf_ensure_space(). [PR #1094](https://github.com/c-ares/c-ares/pull/1094)
32+
* Skip name compression offsets beyond the 14-bit pointer limit. [PR #1159](https://github.com/c-ares/c-ares/pull/1159)
33+
* ares_dns_parse: reject name compression in RDATA where not permitted (RFC 3597). [PR #1190](https://github.com/c-ares/c-ares/pull/1190)
34+
* ares_dns_parse: reject responses with more than one OPT record (RFC 6891). [PR #1189](https://github.com/c-ares/c-ares/pull/1189)
35+
* Discard oversized UDP datagrams instead of truncating the length frame. [PR #1161](https://github.com/c-ares/c-ares/pull/1161)
36+
* Route numeric config parsing through range-checked ares_str_parse_uint. [PR #1158](https://github.com/c-ares/c-ares/pull/1158)
37+
* Replace atoi-based port parsing with validated helper. [PR #1097](https://github.com/c-ares/c-ares/pull/1097)
38+
* Defer TCP connection error handling until DNS responses are parsed. [PR #1138](https://github.com/c-ares/c-ares/pull/1138)
39+
* Prevent undefined-behavior left shift in ares_calc_query_timeout(). [PR #1151](https://github.com/c-ares/c-ares/pull/1151)
40+
* Use unsigned type for ares_round_up_pow2_u64 to avoid undefined behavior. [PR #1107](https://github.com/c-ares/c-ares/pull/1107)
41+
* Fix undefined behavior in ares_buf_replace() pointer arithmetic. [PR #1099](https://github.com/c-ares/c-ares/pull/1099)
42+
* ares_array: reset offset when array becomes empty. [PR #1165](https://github.com/c-ares/c-ares/pull/1165)
43+
* ares_iface_ips: add ARES_IFACE_IP_NONE zero enum value. [PR #1187](https://github.com/c-ares/c-ares/pull/1187)
44+
* ares_sysconfig_files: recognize AIX netsvc.conf bind4/local4 tokens. [PR #1188](https://github.com/c-ares/c-ares/pull/1188)
45+
* Use safe string construction in Windows sysconfig join path. [PR #1143](https://github.com/c-ares/c-ares/pull/1143)
46+
* Fix zero-length RAW_RR losing type metadata during parsing. [PR #1129](https://github.com/c-ares/c-ares/pull/1129)
47+
* Fix RAW_RR type tostr/fromstr roundtrip mismatch. [PR #1123](https://github.com/c-ares/c-ares/pull/1123)
48+
* Fix NULL dereference for ifa netmask. [PR #1120](https://github.com/c-ares/c-ares/pull/1120)
49+
* adig: fix negated option prefix parsing. [PR #1135](https://github.com/c-ares/c-ares/pull/1135)
50+
* Use UnregisterWaitEx to prevent use-after-free on Win32. [PR #1111](https://github.com/c-ares/c-ares/pull/1111)
51+
* Add NULL check after ares_malloc_zero in Windows UTF8 conversion. [PR #1121](https://github.com/c-ares/c-ares/pull/1121)
52+
* Fix NULL dereference after ares_malloc_zero in Win32 IOCP event add. [PR #1132](https://github.com/c-ares/c-ares/pull/1132)
53+
* Fix microsecond overflow in ares_queue_wait_empty timeout. [PR #1122](https://github.com/c-ares/c-ares/pull/1122)
54+
* Fix NULL dereference in ares_buf_replace() on NULL buf. [PR #1124](https://github.com/c-ares/c-ares/pull/1124)
55+
* Initialize *read_bytes in ares_socket_recvfrom(). [PR #1125](https://github.com/c-ares/c-ares/pull/1125)
56+
* Fix memory leak of binbuf in ares_buf_parse_dns_binstr_int. [PR #1126](https://github.com/c-ares/c-ares/pull/1126)
57+
* Fix memory leak of qcache entry on key allocation failure. [PR #1127](https://github.com/c-ares/c-ares/pull/1127)
58+
* Fix memory leak of buf in ares_dns_multistring_combined() on OOM. [PR #1110](https://github.com/c-ares/c-ares/pull/1110)
59+
* Fix memory leaks on error paths in two functions. [PR #1109](https://github.com/c-ares/c-ares/pull/1109)
60+
* Fix memory leak of buckets in ares_htable_dict_keys() error path. [PR #1108](https://github.com/c-ares/c-ares/pull/1108)
61+
* Fix memory leak of bucket->key in ares_htable_dict_insert error path. [PR #1105](https://github.com/c-ares/c-ares/pull/1105)
62+
* Fix additional memory leaks. [PR #1091](https://github.com/c-ares/c-ares/pull/1091) [PR #1078](https://github.com/c-ares/c-ares/pull/1078)
63+
* Prevent corrupt addrinfo nodes on sockaddr allocation failure. [PR #1112](https://github.com/c-ares/c-ares/pull/1112)
64+
* Fix two logic bugs in DNS cookie handling. [PR #1103](https://github.com/c-ares/c-ares/pull/1103)
65+
* Fix linked list INSERT_BEFORE corruption and array insertdata_first ordering. [PR #1101](https://github.com/c-ares/c-ares/pull/1101)
66+
* Fix HASH_IDX macro missing parentheses. [PR #1128](https://github.com/c-ares/c-ares/pull/1128)
67+
* Fix malloc(0) in ares_htable_all_buckets on empty table. [PR #1131](https://github.com/c-ares/c-ares/pull/1131)
68+
* Fix wrong sizeof in QNX confstr() call truncating domain names. [PR #1130](https://github.com/c-ares/c-ares/pull/1130)
69+
* Clear probe pending flag after timeout. [PR #1059](https://github.com/c-ares/c-ares/pull/1059)
70+
* Fix incorrect check for empty wide string. [PR #1064](https://github.com/c-ares/c-ares/pull/1064)
71+
* Handle strdup failure. [PR #1077](https://github.com/c-ares/c-ares/pull/1077)
72+
* doc: reference ares_free_string(), not ares_free(). [PR #1084](https://github.com/c-ares/c-ares/pull/1084)
73+
74+
Thanks go to these friendly people for their efforts and contributions for this
75+
release:
76+
77+
* (@Alb3e3)
78+
* Brad House (@bradh352)
79+
* (@dankmeme01)
80+
* David Hotham (@dimbleby)
81+
* Tom Flynn (@Flynnzaa)
82+
* (@jmestwa-coder)
83+
* (@kodareef5)
84+
* Kaixuan Li (@MarkLee131)
85+
* (@lifenjoiner)
86+
* (@metsw24-max)
87+
* Song Li (@SongTonyLi)
88+
* (@uwezkhan)
89+
90+
191
## c-ares version 1.34.6 - December 8 2025
292

393
This is a security release.

deps/cares/aminclude_static.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# aminclude_static.am generated automatically by Autoconf
3-
# from AX_AM_MACROS_STATIC on Mon Dec 8 16:21:41 UTC 2025
3+
# from AX_AM_MACROS_STATIC on Mon Jul 6 17:28:08 UTC 2026
44

55

66
# Code coverage

deps/cares/configure

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for c-ares 1.34.6.
3+
# Generated by GNU Autoconf 2.71 for c-ares 1.34.7.
44
#
55
# Report bugs to <c-ares mailing list: http://lists.haxx.se/listinfo/c-ares>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='c-ares'
623623
PACKAGE_TARNAME='c-ares'
624-
PACKAGE_VERSION='1.34.6'
625-
PACKAGE_STRING='c-ares 1.34.6'
624+
PACKAGE_VERSION='1.34.7'
625+
PACKAGE_STRING='c-ares 1.34.7'
626626
PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares'
627627
PACKAGE_URL=''
628628

@@ -1430,7 +1430,7 @@ if test "$ac_init_help" = "long"; then
14301430
# Omit some internal or obsolete options to make the list less imposing.
14311431
# This message is too long to be a string in the A/UX 3.1 sh.
14321432
cat <<_ACEOF
1433-
\`configure' configures c-ares 1.34.6 to adapt to many kinds of systems.
1433+
\`configure' configures c-ares 1.34.7 to adapt to many kinds of systems.
14341434

14351435
Usage: $0 [OPTION]... [VAR=VALUE]...
14361436

@@ -1501,7 +1501,7 @@ fi
15011501

15021502
if test -n "$ac_init_help"; then
15031503
case $ac_init_help in
1504-
short | recursive ) echo "Configuration of c-ares 1.34.6:";;
1504+
short | recursive ) echo "Configuration of c-ares 1.34.7:";;
15051505
esac
15061506
cat <<\_ACEOF
15071507

@@ -1647,7 +1647,7 @@ fi
16471647
test -n "$ac_init_help" && exit $ac_status
16481648
if $ac_init_version; then
16491649
cat <<\_ACEOF
1650-
c-ares configure 1.34.6
1650+
c-ares configure 1.34.7
16511651
generated by GNU Autoconf 2.71
16521652

16531653
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2271,7 +2271,7 @@ cat >config.log <<_ACEOF
22712271
This file contains any messages produced by compilers while
22722272
running configure, to aid debugging if configure makes a mistake.
22732273

2274-
It was created by c-ares $as_me 1.34.6, which was
2274+
It was created by c-ares $as_me 1.34.7, which was
22752275
generated by GNU Autoconf 2.71. Invocation command line was
22762276

22772277
$ $0$ac_configure_args_raw
@@ -3245,7 +3245,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32453245

32463246

32473247

3248-
CARES_VERSION_INFO="21:5:19"
3248+
CARES_VERSION_INFO="21:6:19"
32493249

32503250

32513251

@@ -6818,7 +6818,7 @@ fi
68186818

68196819
# Define the identity of the package.
68206820
PACKAGE='c-ares'
6821-
VERSION='1.34.6'
6821+
VERSION='1.34.7'
68226822

68236823

68246824
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -28238,7 +28238,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2823828238
# report actual input values of CONFIG_FILES etc. instead of their
2823928239
# values after options handling.
2824028240
ac_log="
28241-
This file was extended by c-ares $as_me 1.34.6, which was
28241+
This file was extended by c-ares $as_me 1.34.7, which was
2824228242
generated by GNU Autoconf 2.71. Invocation command line was
2824328243

2824428244
CONFIG_FILES = $CONFIG_FILES
@@ -28306,7 +28306,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2830628306
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2830728307
ac_cs_config='$ac_cs_config_escaped'
2830828308
ac_cs_version="\\
28309-
c-ares config.status 1.34.6
28309+
c-ares config.status 1.34.7
2831028310
configured by $0, generated by GNU Autoconf 2.71,
2831128311
with options \\"\$ac_cs_config\\"
2831228312

deps/cares/configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ dnl Copyright (C) The c-ares project and its contributors
22
dnl SPDX-License-Identifier: MIT
33
AC_PREREQ([2.69])
44

5-
AC_INIT([c-ares], [1.34.6],
5+
AC_INIT([c-ares], [1.34.7],
66
[c-ares mailing list: http://lists.haxx.se/listinfo/c-ares])
77

8-
CARES_VERSION_INFO="21:5:19"
8+
CARES_VERSION_INFO="21:6:19"
99
dnl This flag accepts an argument of the form current[:revision[:age]]. So,
1010
dnl passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
1111
dnl 1.

deps/cares/docs/ares_dns_record.3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ DNS Classes for requests and responses:
140140
.B ARES_CLASS_CHAOS
141141
- CHAOS
142142
.br
143-
.B ARES_CLASS_HESOID
143+
.B ARES_CLASS_HESIOD
144144
- Hesoid [Dyer 87]
145145
.br
146146
.B ARES_CLASS_NONE

deps/cares/docs/ares_getaddrinfo.3

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ The
2727
and
2828
.I service
2929
parameters give the hostname and service as NULL-terminated C strings.
30+
Either
31+
.I name
32+
or
33+
.I service
34+
may be NULL, but not both. If
35+
.I name
36+
is NULL, the returned addresses are synthesized from
37+
.IR service :
38+
the wildcard address (0.0.0.0 or ::) is returned when
39+
.B ARES_AI_PASSIVE
40+
is set in
41+
.IR ai_flags ,
42+
otherwise the loopback address (127.0.0.1 or ::1) is returned.
3043
The
3144
.I hints
3245
parameter is an
@@ -63,6 +76,16 @@ If this option is set
6376
.I service
6477
field will be treated as a numeric value.
6578
.TP 19
79+
.B ARES_AI_PASSIVE
80+
If this option is set and
81+
.I name
82+
is NULL, the returned addresses will use the wildcard address (0.0.0.0 or ::),
83+
suitable for
84+
.BR bind (2)ing
85+
a socket that will accept connections. If not set and
86+
.I name
87+
is NULL, the loopback address (127.0.0.1 or ::1) is returned instead.
88+
.TP 19
6689
.B ARES_AI_CANONNAME
6790
The ares_addrinfo structure will return a canonical names list.
6891
.TP 19

deps/cares/docs/ares_gethostbyaddr.3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ares_gethostbyaddr \- Initiate a host query by address
1111

1212
typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP,
1313
int \fItimeouts\fP,
14-
struct hostent *\fIhostent\fP)
14+
const struct hostent *\fIhostent\fP)
1515

1616
void ares_gethostbyaddr(ares_channel_t *\fIchannel\fP, const void *\fIaddr\fP,
1717
int \fIaddrlen\fP, int \fIfamily\fP,

deps/cares/docs/ares_gethostbyname.3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ares_gethostbyname \- Initiate a host query by name
1111

1212
typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP,
1313
int \fItimeouts\fP,
14-
struct hostent *\fIhostent\fP)
14+
const struct hostent *\fIhostent\fP)
1515

1616
void ares_gethostbyname(ares_channel_t *\fIchannel\fP, const char *\fIname\fP,
1717
int \fIfamily\fP, ares_host_callback \fIcallback\fP,

0 commit comments

Comments
 (0)