summaryrefslogtreecommitdiff
path: root/deps/cares
AgeCommit message (Collapse)Author
2017-10-02deps: cherry-pick 0ef4a0c64b6 from c-ares upstreamAnna Henningsen
Original commit message: gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()` When `ares_cancel()` was invoked, `ares_gethostbyaddr()` queries would fail with `ENOTFOUND` instead of `ECANCELLED`. It seems appropriate to treat `ares_cancel()` like `ares_destroy()`, but I would appreciate review of the correctness of this change. Ref: https://github.com/nodejs/node/issues/14814 Fixes: https://github.com/nodejs/node/issues/14814 PR-URL: https://github.com/nodejs/node/pull/15023 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-02deps: cherry-pick 18ea996 from c-ares upstreamAnna Henningsen
Original commit message: ares_parse_naptr_reply: make buffer length check more accurate 9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check for records parsed by `ares_parse_naptr_reply()`. However, that function is designed to parse replies which also contain non-NAPTR records; for A records, the `rr_len > 7` check will fail as there are only 4 bytes of payload. In particular, parsing ANY replies for NAPTR records was broken by that patch. Fix that by moving the check into the case in which it is already known that the record is a NAPTR record. Ref: https://github.com/c-ares/c-ares/commit/18ea99693d63f957ecb670045adbd2c1da8a4641 PR-URL: https://github.com/nodejs/node/pull/13883 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-02deps: c-ares float, win ipv6 bad fec0 prefixRod Vagg
Was 72c5458aee: PR-URL: https://github.com/nodejs/node/pull/5090 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reimplemented for c-ares 1.13.0 PR-URL: https://github.com/nodejs/node/pull/15378 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-02deps: c-ares float, manual ares_ssize_t definitionRod Vagg
c-ares switched to using ares_ssize_t for platform-independent ssize_t, our GYP usage to include config/<platform>/ares_config.h causes problems when including gyp as a library in core, i.e. in env.h and cares_wrap.h, where the defines don't get pulled in properly. This, so far, is the easiest approach to just making it work nicely--explicitly defining ares_ssize_t for the different Windows variants and ssize_t for non-Windows where we don't have a configured type from an ares_config.h. In all of our non-Windows platforms it is ssize_t anyway so this is safe. PR-URL: https://github.com/nodejs/node/pull/15378 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-02deps: upgrade to c-ares v1.13.0Rod Vagg
PR-URL: https://github.com/nodejs/node/pull/15378 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-02deps: upgrade to c-ares v1.12.0Rod Vagg
Updated with manual config for Android Updated with automatic for sunos, *bsd, darwin, linux, aix PR-URL: https://github.com/nodejs/node/pull/15378 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-08-29deps: cherry-pick 0ef4a0c64b6 from c-ares upstreamAnna Henningsen
Original commit message: gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()` When `ares_cancel()` was invoked, `ares_gethostbyaddr()` queries would fail with `ENOTFOUND` instead of `ECANCELLED`. It seems appropriate to treat `ares_cancel()` like `ares_destroy()`, but I would appreciate review of the correctness of this change. Ref: https://github.com/nodejs/node/issues/14814 Fixes: https://github.com/nodejs/node/issues/14814 PR-URL: https://github.com/nodejs/node/pull/15023 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-23deps: cherry-pick 18ea996 from c-ares upstreamAnna Henningsen
Original commit message: ares_parse_naptr_reply: make buffer length check more accurate 9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check for records parsed by `ares_parse_naptr_reply()`. However, that function is designed to parse replies which also contain non-NAPTR records; for A records, the `rr_len > 7` check will fail as there are only 4 bytes of payload. In particular, parsing ANY replies for NAPTR records was broken by that patch. Fix that by moving the check into the case in which it is already known that the record is a NAPTR record. Ref: https://github.com/c-ares/c-ares/commit/18ea99693d63f957ecb670045adbd2c1da8a4641 PR-URL: https://github.com/nodejs/node/pull/13883 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-11deps: cherry-pick 9478908a49 from cares upstreamDavid Drysdale
Original commit message: ares_parse_naptr_reply: check sufficient data Check that there is enough data for the required elements of an NAPTR record (2 int16, 3 bytes for string lengths) before processing a record. This patch fixes CVE-2017-1000381 The c-ares function ares_parse_naptr_reply(), which is used for parsing NAPTR responses, could be triggered to read memory outside of the given input buffer if the passed in DNS response packet was crafted in a particular way. Refs: https://c-ares.haxx.se/adv_20170620.html Refs: https://c-ares.haxx.se/CVE-2017-1000381.patch PR-URL: https://github.com/nodejs/node-private/pull/88 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2016-10-28deps: back port OpenBSD fix in c-ares/c-aresAaron Bieber
Original PR: https://github.com/c-ares/c-ares/pull/68 PR-URL: https://github.com/nodejs/node/pull/9232 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-02ares_create_query: avoid single-byte buffer overwriteDaniel Stenberg
Incorrect string length calculation when passing escaped dot. - CVE: CVE-2016-5180 - Upstream bug: https://c-ares.haxx.se/adv_20160929.html PR-URL: https://github.com/nodejs/node/pull/8849 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2016-08-03build: fix dependency on missing header fileBen Noordhuis
Depend on include/ares_rules.h, src/ares_rules.h does not exist. The typo didn't break the build but it made some of the gyp-based tooling complain. PR-URL: https://github.com/nodejs/node/pull/7945 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-04-21cares: Support malloc(0) scenarios for AIXGireesh Punathil
Many places in cares library, when the stream data arrives from the network with respect to dns and reverse dns resolution, they are populated into data structures created dymaically based on the size of the data. Malloc is heavily used for such cases. Often, based on the data length, malloc(0) is invoked. Linux behavior on zero byte allocation is to return a valid pointer where in AIX, it always return NULL. This manifestst as test failure of test/internet/test-dns.js Solution is to build cares with Linux compatible malloc behavior PR-URL: https://github.com/nodejs/node/pull/6305 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
2016-02-11deps: reapply c-ares floating patchBen Noordhuis
PR-URL: https://github.com/nodejs/node/pull/5090 Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-02-11deps: sync with upstream c-ares/c-ares@4ef6817Fedor Indutny
PR-URL: https://github.com/nodejs/node/pull/5199 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-02-08deps: reapply c-ares floating patchBen Noordhuis
PR-URL: https://github.com/nodejs/node/pull/5090 Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-02-08src,deps: replace LoadLibrary by LoadLibraryWCheng Zhao
On Windows, when compiling with `UNICODE` defined, `LoadLibrary` becomes `LoadLibraryW`. When an ASCII string is passed to that function it crashes. PR-URL: https://github.com/iojs/io.js/pull/226 Reviewed-By: Bert Belder <bertbelder@gmail.com>
2016-02-08deps: sync with upstream bagder/c-ares@2bae2d5Fedor Indutny
PR-URL: https://github.com/nodejs/node/pull/5090 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-15build: Updates to enable AIX supportMichael Dawson
These are the core changes that allow AIX to compile. There are still some test failures as there are some patches needed for libuv and npm that we'll need to contribute through those communities but this set allows node to be built on AIX and pass most of the core tests The change in js2c is because AIX does not support $ in identifier names. See the discussion/agreement in https://github.com/nodejs/node/issues/2272 PR-URL: https://github.com/nodejs/node/pull/2364 Reviewed-By: Ben Noordhuis <ben@strongloop.com> Reviewed-By: Rod Vagg <r@va.gg>
2015-05-12src,deps: replace LoadLibrary by LoadLibraryWCheng Zhao
On Windows, when compiling with `UNICODE` defined, `LoadLibrary` becomes `LoadLibraryW`. When an ASCII string is passed to that function it crashes. PR-URL: https://github.com/iojs/io.js/pull/226 Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-05-12deps: provide TXT chunk info in c-aresFedor Indutny
Provide more information in `ares_txt_reply` to coalesce chunks from the same record into one string. fix #7367
2015-05-12deps: sync with upstream bagder/c-ares@bba4dc5Ben Noordhuis
Fixes: https://github.com/iojs/io.js/issues/1676 PR-URL: https://github.com/iojs/io.js/pull/1678 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-07src,deps: replace LoadLibrary by LoadLibraryWCheng Zhao
On Windows, when compiling with `UNICODE` defined, `LoadLibrary` becomes `LoadLibraryW`. When an ASCII string is passed to that function it crashes. PR-URL: https://github.com/iojs/io.js/pull/226 Reviewed-By: Bert Belder <bertbelder@gmail.com>
2014-04-24deps: provide TXT chunk info in c-aresFedor Indutny
Provide more information in `ares_txt_reply` to coalesce chunks from the same record into one string. fix #7367
2013-07-06deps: upgrade c-ares to piscisaureus/cares@805d153Ben Noordhuis
This should fix the Android build.
2013-05-15deps: fix up header files in cares.gypBen Noordhuis
Please msbuild, update the header list.
2013-05-15deps: reapply c-ares floating patchBen Noordhuis
2013-05-14deps: upgrade c-ares to 1.10.0Ben Noordhuis
2012-11-20deps: upgrade cares to 213f2b7Ben Noordhuis
2012-08-07Add c-ares dependencyBert Belder
This is the c-ares code that used to live in the libuv source tree. It is based on c-ares 1.9.0.