Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255408 - <net-dns/c-ares-1.5.3 affected by CVE-2008-1447
Summary: <net-dns/c-ares-1.5.3 affected by CVE-2008-1447
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Security
URL:
Whiteboard: B3 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-18 17:36 UTC by Peter Volkov (RETIRED)
Modified: 2014-05-31 19:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Volkov (RETIRED) gentoo-dev 2009-01-18 17:36:07 UTC
Just noticed that <net-dns/c-ares-1.5.3 is affected by vulnerability CVE-2008-1447. There is thread in upstream mailing list:

http://www.mail-archive.com/c-ares@cool.haxx.se/msg00059.html

This item in the CHANGES:

* Aug 4 2008 (Daniel Stenberg)
- Fix by Tofu Linden:

  The symptom:
  * Users (usually, but not always) on 2-Wire routers and the Comcast service
  and a wired connection to their router would find that the second and
  subsequent DNS lookups from fresh processes using c-ares to resolve the same
  address would cause the process to never see a reply (it keeps polling for
  around 1m15s before giving up).

  The repro:
  * On such a machine (and yeah, it took us a lot of QA to find the systems
  that reproduce such a specific problem!), do 'ahost www.secondlife.com',
  then do it again.  The first process's lookup will work, subsequent lookups
  will time-out and fail.

  The cause:
  * init_id_key() was calling randomize_key() *before* it initialized
  key->state, meaning that the randomness generated by randomize_key() is
  immediately overwritten with deterministic values. (/dev/urandom was also
  being read incorrectly in the c-ares version we were using, but this was
  fixed in a later version.)
  * This makes the stream of generated query-IDs from any new c-ares process
  be an identical and predictable sequence of IDs.
  * This makes the 2-Wire's default built-in DNS server detect these queries
  as probable-duplicates and (erroneously) not respond at all.

And this is fixed in c-ares-1.5.3. I think it's time to stabilize c-ares-1.5.3.
Comment 1 Tomas Hoger 2009-01-22 14:26:14 UTC
Well, not sure CVE-2008-1447 should be used here.  CVE-2008-1447 is about a new way to make cache poisoning of caching resolvers easier (once success in a race hijacks whole domain), proving that fixed / predictable source ports are not secure enough.

Comment #0 points out 2 issue:
- Mailing list thread is about recv -> recvfrom change.  This change does not see to have a big security impact, as 1) DNS is UDP, and 2) when someone is trying to poison, crafted packets with spoofed source address are used anyway.

- Changelog entry is about incorrect PRNG seeding, resulting in fixed / predictable transaction ID stream.  So not too close to -1447 as well, probably closer to Amit Klein's work from 2007 (iirc).  Quick testing with ahost, this seems to be fixed in 1.5.3.

Also testing with ahost (as ahost host1 host2 host3 ...), all requests seem to use the same source port even in 1.5.3 (i.e. similarity to fixes/mitigations for -1447), but as c-ares is stub resolver (similar to glibc) and does not seem to do any caching, the impact much lower (one race win -> single resolution poisoned).
Comment 2 Daniel Black (RETIRED) gentoo-dev 2009-01-22 21:50:15 UTC
wow - thanks Tomas for the analysis.

stable request for 1.5.3 (1.6.0 is a ABI bump)
Comment 3 Brent Baude (RETIRED) gentoo-dev 2009-01-23 15:16:02 UTC
ppc64 done
Comment 4 Markus Meier gentoo-dev 2009-01-23 21:43:16 UTC
amd64/x86 stable
Comment 5 Tobias Scherbaum (RETIRED) gentoo-dev 2009-01-24 18:38:57 UTC
ppc stable
Comment 6 Tobias Klausmann (RETIRED) gentoo-dev 2009-01-25 13:49:08 UTC
Stable on alpha.
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2009-01-26 01:17:42 UTC
mips is ~arch only.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2009-01-26 04:39:26 UTC
Stable for HPPA.
Comment 9 Raúl Porcel (RETIRED) gentoo-dev 2009-02-04 21:34:54 UTC
arm/ia64/s390/sh/sparc stable
Comment 10 Tobias Heinlein (RETIRED) gentoo-dev 2009-03-05 20:36:27 UTC
Rating as B3 as discussed on IRC.
Comment 11 Robert Buchholz (RETIRED) gentoo-dev 2009-03-09 14:12:09 UTC
I vote YES, easy attack vector and this should be documented in a GLSA.
Comment 12 Stefan Behte (RETIRED) gentoo-dev Security 2009-04-23 17:06:52 UTC
Yes, too. Request filed.
Comment 13 Sean Amoss (RETIRED) gentoo-dev Security 2014-05-31 19:34:05 UTC
This issue has been fixed since Feb 04, 2009. No GLSA will be issued.