From 109730a80d0e6a30a69069558af9c69b93ff3345 Mon Sep 17 00:00:00 2001 From: Sergey Chernyshev Date: Wed, 24 Apr 2024 23:38:28 +0200 Subject: [PATCH] deps: update c-ares to 1.20.1 PR-URL: https://github.com/nodejs/node/pull/50082 Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli --- graal-nodejs/deps/cares/CHANGES | 69 +++++++++++-------- graal-nodejs/deps/cares/CMakeLists.txt | 6 +- graal-nodejs/deps/cares/README.md | 4 +- graal-nodejs/deps/cares/RELEASE-NOTES | 16 ++++- graal-nodejs/deps/cares/aminclude_static.am | 2 +- graal-nodejs/deps/cares/configure | 22 +++--- graal-nodejs/deps/cares/configure.ac | 4 +- .../deps/cares/include/ares_version.h | 4 +- .../deps/cares/src/lib/ares_process.c | 13 ++-- .../maintaining/maintaining-dependencies.md | 6 +- 10 files changed, 85 insertions(+), 61 deletions(-) diff --git a/graal-nodejs/deps/cares/CHANGES b/graal-nodejs/deps/cares/CHANGES index 82caeb70cdc..6523436d3af 100644 --- a/graal-nodejs/deps/cares/CHANGES +++ b/graal-nodejs/deps/cares/CHANGES @@ -1,5 +1,45 @@ Changelog for the c-ares project. Generated with git2changes.pl +Version 1.20.1 (8 Oct 2023) + +GitHub (8 Oct 2023) +- [Daniel Stenberg brought this change] + + ares-test: silence warning (#564) + + warning: comparison of integer expressions of different signedness + + Fix By: Daniel Stenberg (@bagder) + +Brad House (8 Oct 2023) +- fix README.md + +GitHub (8 Oct 2023) +- [Brad House brought this change] + + 1.20.1 release (#563) + +- [Brad House brought this change] + + fix reference to freed memory (#562) + + Issue #561 shows free'd memory could be accessed in some error conditions. + + Fixes Issue #561 + Fix By: Brad House (@bradh352) + +Brad House (8 Oct 2023) +- reported build/test systems may timeout on intensive tests. reduce test case to still be relevant but to reduce false positive errors + +GitHub (8 Oct 2023) +- [Gregor Jasny brought this change] + + Regression: Fix typo in fuzzcheck target name (#559) + + This seems to be a vim'esque typo introduced with c1b00c41. + + Fix By: Gregor Jasny (@gjasny) + Version 1.20.0 (6 Oct 2023) Brad House (6 Oct 2023) @@ -5665,32 +5705,3 @@ Ben Greear (30 Jul 2010) - ipv6: Fix some build issues related to the local-bind feature. Signed-off-by: Ben Greear - -Guenter Knauf (29 Jul 2010) -- Replaced uint32_t with unsigned int to fix broken builds on a couple of platforms. - -Daniel Stenberg (18 Jul 2010) -- [Ben Greear brought this change] - - local-bind: Support binding to local interface/IPs - - Add 3 new functions to set the local binding for the out-going - socket connection, and add ares_set_servers_csv() to set a - list of servers at once as a comma-separated string. - - Signed-off-by: Ben Greear - -- version: now start on 1.7.4 - -- [Andrew C. Morrow brought this change] - - fix memory leak in ares_getnameinfo - -Version 1.7.3 (11 Jun 2010) - -Daniel Stenberg (11 Jun 2010) -- changelogs: updated for 1.7.3 - -- [BogDan Vatra brought this change] - - init: allow c-ares to work on Android OS diff --git a/graal-nodejs/deps/cares/CMakeLists.txt b/graal-nodejs/deps/cares/CMakeLists.txt index 9a855503fc9..bd901733626 100644 --- a/graal-nodejs/deps/cares/CMakeLists.txt +++ b/graal-nodejs/deps/cares/CMakeLists.txt @@ -10,10 +10,10 @@ INCLUDE (CheckCSourceCompiles) INCLUDE (CheckStructHasMember) INCLUDE (CheckLibraryExists) -PROJECT (c-ares LANGUAGES C VERSION "1.20.0" ) +PROJECT (c-ares LANGUAGES C VERSION "1.20.1" ) # Set this version before release -SET (CARES_VERSION "1.20.0") +SET (CARES_VERSION "1.20.1") INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are wrong. @@ -28,7 +28,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w # For example, a version of 4:0:2 would generate output such as: # libname.so -> libname.so.2 # libname.so.2 -> libname.so.2.2.0 -SET (CARES_LIB_VERSIONINFO "9:0:7") +SET (CARES_LIB_VERSIONINFO "9:1:7") OPTION (CARES_STATIC "Build as a static library" OFF) diff --git a/graal-nodejs/deps/cares/README.md b/graal-nodejs/deps/cares/README.md index b507a5c288e..40d3c08114e 100644 --- a/graal-nodejs/deps/cares/README.md +++ b/graal-nodejs/deps/cares/README.md @@ -6,7 +6,6 @@ c-ares [![Coverage Status](https://coveralls.io/repos/github/c-ares/c-ares/badge.svg)](https://coveralls.io/github/c-ares/c-ares) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/291/badge)](https://bestpractices.coreinfrastructure.org/projects/291) [![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) -[![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 @@ -22,8 +21,7 @@ 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: https://lists.haxx.se/listinfo/c-ares -c-ares is of course distributed under the same MIT-style license as the -original ares. +c-ares is distributed the MIT license. You'll find all c-ares details and news here: https://c-ares.org/ diff --git a/graal-nodejs/deps/cares/RELEASE-NOTES b/graal-nodejs/deps/cares/RELEASE-NOTES index 062f7a73e22..169a39fcb33 100644 --- a/graal-nodejs/deps/cares/RELEASE-NOTES +++ b/graal-nodejs/deps/cares/RELEASE-NOTES @@ -1,4 +1,16 @@ -c-ares version 1.20.0 +c-ares version 1.20.1 + +This release resolves a significant issue in the 1.20.0 release. + +Bug fixes: + o Resolve use-after-free issue when TCP connection is terminated before a + response is returned [17] + o Reduce number of queries for a load test case to prevent overloading some + build systems + o Fix fuzz test build target [18] + + +c-ares 1.20.0 notes below: This is a feature and bugfix release with some significant internal changes. @@ -58,3 +70,5 @@ References to bug reports and discussions on issues: [14] = https://github.com/c-ares/c-ares/pull/526 [15] = https://github.com/c-ares/c-ares/pull/525 [16] = https://github.com/c-ares/c-ares/pull/524 + [17] = https://github.com/c-ares/c-ares/pull/562 + [18] = https://github.com/c-ares/c-ares/pull/559 diff --git a/graal-nodejs/deps/cares/aminclude_static.am b/graal-nodejs/deps/cares/aminclude_static.am index 01a565d7710..d35c73b8f4b 100644 --- a/graal-nodejs/deps/cares/aminclude_static.am +++ b/graal-nodejs/deps/cares/aminclude_static.am @@ -1,6 +1,6 @@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Sat Oct 7 13:50:28 CEST 2023 +# from AX_AM_MACROS_STATIC on Sun Oct 8 23:23:39 CEST 2023 # Code coverage diff --git a/graal-nodejs/deps/cares/configure b/graal-nodejs/deps/cares/configure index 63c917a937e..ebaa43c2df2 100755 --- a/graal-nodejs/deps/cares/configure +++ b/graal-nodejs/deps/cares/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for c-ares 1.20.0. +# Generated by GNU Autoconf 2.71 for c-ares 1.20.1. # # Report bugs to . # @@ -855,8 +855,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='c-ares' PACKAGE_TARNAME='c-ares' -PACKAGE_VERSION='1.20.0' -PACKAGE_STRING='c-ares 1.20.0' +PACKAGE_VERSION='1.20.1' +PACKAGE_STRING='c-ares 1.20.1' PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares' PACKAGE_URL='' @@ -1650,7 +1650,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures c-ares 1.20.0 to adapt to many kinds of systems. +\`configure' configures c-ares 1.20.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1721,7 +1721,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of c-ares 1.20.0:";; + short | recursive ) echo "Configuration of c-ares 1.20.1:";; esac cat <<\_ACEOF @@ -1861,7 +1861,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -c-ares configure 1.20.0 +c-ares configure 1.20.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2453,7 +2453,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by c-ares $as_me 1.20.0, which was +It was created by c-ares $as_me 1.20.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3426,7 +3426,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -CARES_VERSION_INFO="9:0:7" +CARES_VERSION_INFO="9:1:7" @@ -7060,7 +7060,7 @@ fi # Define the identity of the package. PACKAGE='c-ares' - VERSION='1.20.0' + VERSION='1.20.1' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -35354,7 +35354,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by c-ares $as_me 1.20.0, which was +This file was extended by c-ares $as_me 1.20.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -35422,7 +35422,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -c-ares config.status 1.20.0 +c-ares config.status 1.20.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/graal-nodejs/deps/cares/configure.ac b/graal-nodejs/deps/cares/configure.ac index 9f0b5a87097..e3b73faa124 100644 --- a/graal-nodejs/deps/cares/configure.ac +++ b/graal-nodejs/deps/cares/configure.ac @@ -20,10 +20,10 @@ ############################################################# AC_PREREQ([2.60]) -AC_INIT([c-ares], [1.20.0], +AC_INIT([c-ares], [1.20.1], [c-ares mailing list: http://lists.haxx.se/listinfo/c-ares]) -CARES_VERSION_INFO="9:0:7" +CARES_VERSION_INFO="9:1:7" dnl This flag accepts an argument of the form current[:revision[:age]]. So, dnl passing -version-info 3:12:1 sets current to 3, revision to 12, and age to dnl 1. diff --git a/graal-nodejs/deps/cares/include/ares_version.h b/graal-nodejs/deps/cares/include/ares_version.h index fa83494fd4e..34784e2ed44 100644 --- a/graal-nodejs/deps/cares/include/ares_version.h +++ b/graal-nodejs/deps/cares/include/ares_version.h @@ -32,11 +32,11 @@ #define ARES_VERSION_MAJOR 1 #define ARES_VERSION_MINOR 20 -#define ARES_VERSION_PATCH 0 +#define ARES_VERSION_PATCH 1 #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ (ARES_VERSION_MINOR<<8)|\ (ARES_VERSION_PATCH)) -#define ARES_VERSION_STR "1.20.0" +#define ARES_VERSION_STR "1.20.1" #if (ARES_VERSION >= 0x010700) # define CARES_HAVE_ARES_LIBRARY_INIT 1 diff --git a/graal-nodejs/deps/cares/src/lib/ares_process.c b/graal-nodejs/deps/cares/src/lib/ares_process.c index 2b951a73fc0..06e71216019 100644 --- a/graal-nodejs/deps/cares/src/lib/ares_process.c +++ b/graal-nodejs/deps/cares/src/lib/ares_process.c @@ -444,7 +444,7 @@ static void read_udp_packets_fd(ares_channel channel, continue; handle_error(conn, now); - + return; #ifdef HAVE_RECVFROM } else if (!same_address(&from.sa, &conn->server->addr)) { /* The address the response comes from does not match the address we @@ -682,9 +682,10 @@ static void process_answer(ares_channel channel, const unsigned char *abuf, static void handle_error(struct server_connection *conn, struct timeval *now) { - ares_channel channel = conn->server->channel; - ares__llist_t *list_copy; - ares__llist_node_t *node; + ares_channel channel = conn->server->channel; + struct server_state *server = conn->server; + ares__llist_t *list_copy; + ares__llist_node_t *node; /* We steal the list from the connection then close the connection, then * iterate across the list to requeue any inflight queries with the broken @@ -697,8 +698,8 @@ static void handle_error(struct server_connection *conn, while ((node = ares__llist_node_first(list_copy)) != NULL) { struct query *query = ares__llist_node_val(node); - assert(query->server == (int)conn->server->idx); - skip_server(channel, query, conn->server); + assert(query->server == (int)server->idx); + skip_server(channel, query, server); /* next_server will remove the current node from the list */ next_server(channel, query, now); } diff --git a/graal-nodejs/doc/contributing/maintaining/maintaining-dependencies.md b/graal-nodejs/doc/contributing/maintaining/maintaining-dependencies.md index 90ed71eb028..a359c59556b 100644 --- a/graal-nodejs/doc/contributing/maintaining/maintaining-dependencies.md +++ b/graal-nodejs/doc/contributing/maintaining/maintaining-dependencies.md @@ -12,7 +12,7 @@ This a list of all the dependencies: * [ada 2.7.2][] * [base64][] * [brotli][] -* [c-ares 1.20.0][] +* [c-ares 1.20.1][] * [cjs-module-lexer][] * [corepack][] * [googletest][] @@ -165,7 +165,7 @@ length-delimited strings. The [brotli](https://github.com/google/brotli) dependency is used for the homonym generic-purpose lossless compression algorithm. -### c-ares 1.20.0 +### c-ares 1.20.1 The [c-ares](https://github.com/c-ares/c-ares) is a C library for asynchronous DNS requests. @@ -315,7 +315,7 @@ performance improvements not currently available in standard zlib. [ada 2.7.2]: #ada-272 [base64]: #base64 [brotli]: #brotli -[c-ares 1.20.0]: #c-ares-1200 +[c-ares 1.20.1]: #c-ares-1200 [cjs-module-lexer]: #cjs-module-lexer [corepack]: #corepack [dependency-update-action]: ../../../.github/workflows/tools.yml