Unverified Commit 8a82960e authored by David Drysdale's avatar David Drysdale Committed by Myles Borins
Browse files

deps: cherry-pick 9478908a49 from cares upstream

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: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
parent b5bf5e80
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment