Skip to content

Commit 5e6fd0a

Browse files
committed
1 parent bbc409d commit 5e6fd0a

File tree

4 files changed

+95
-1
lines changed

4 files changed

+95
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ all: index.html license.html ares_init.html ares_init_options.html \
2424
ares_library_cleanup.html ares_parse_srv_reply.html \
2525
ares_parse_txt_reply.html ares_parse_soa_reply.html \
2626
ares_inet_ntop.html ares_inet_pton.html ares_create_query.html \
27-
security.html changelog.html vulns.html ares_dup.html
27+
security.html changelog.html vulns.html ares_dup.html \
28+
adv_20160929.html
2829
make -C download
2930

3031
index.html: index.t $(MAINPARTS)
@@ -42,6 +43,11 @@ security.html: security.t $(MAINPARTS) security.gen
4243
security.gen: $(SRCDIR)/SECURITY.md
4344
$(MARKDOWN) < $< > $@
4445

46+
adv_20160929.html: adv_20160929.t $(MAINPARTS) adv_20160929.gen
47+
$(ACTION)
48+
adv_20160929.gen: adv_20160929.md
49+
$(MARKDOWN) < $< > $@
50+
4551
old.html: old.t $(MAINPARTS)
4652
$(ACTION)
4753

adv_20160929.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
`ares_create_query` single byte out of buffer write
2+
=================================================
3+
4+
Project c-ares Security Advisory, September 29, 2016 -
5+
[Permalink](https://c-ares.haxx.se/adv_20160929.html)
6+
7+
VULNERABILITY
8+
-------------
9+
10+
When a string is passed in to `ares_create_query` or `ares_mkquery` and uses
11+
an escaped trailing dot, like "hello\.", c-ares calculates the string length
12+
wrong and subsequently writes outside of the the allocated buffer with one
13+
byte. The wrongly written byte is the least significant byte of the 'dnsclass'
14+
argument; most commonly 1.
15+
16+
We have been seen proof of concept code showing how this can be exploited in a
17+
real-world system, but we are not aware of any such instances having actually
18+
happened in the wild.
19+
20+
INFO
21+
----
22+
23+
The Common Vulnerabilities and Exposures (CVE) project has assigned the name
24+
CVE-2016-5180 to this issue.
25+
26+
AFFECTED VERSIONS
27+
-----------------
28+
29+
This flaw exists in the following c-ares versions.
30+
31+
- Affected versions: libcurl 1.0.0 to and including 1.11.0
32+
- Not affected versions: c-ares >= 1.12.0
33+
34+
THE SOLUTION
35+
------------
36+
37+
In version 1.12.0, the function has been corrected and a test case have been
38+
added to verify.
39+
40+
A [patch for CVE-2016-5180](https://c-ares.haxx.se/CVE-2016-5180.patch) is
41+
available.
42+
43+
RECOMMENDATIONS
44+
---------------
45+
46+
We suggest you take one of the following actions immediately, in order of
47+
preference:
48+
49+
A - Upgrade c-ares to version 1.12.0
50+
51+
B - Apply the patch to your version and rebuild
52+
53+
C - Make *really* sure you don't pass in strings to either of these functions
54+
that use escaped trailing dots.
55+
56+
TIME LINE
57+
---------
58+
59+
It was reported to the c-ares project on September 22 by Gzob Qq.
60+
61+
c-ares 1.12.0 was released on September 29 2016, coordinated with the
62+
publication of this advisory.
63+
64+
CREDITS
65+
-------
66+
67+
Thanks to Gzob Qq for the report and to Mattias Nissler for code reviews of
68+
the patch.

adv_20160929.t

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "doctype.t"
2+
<head>
3+
<title>ares_create_query single byte out of buffer write</title>
4+
#include "css.t"
5+
</head>
6+
#include "body.t"
7+
#include "setup.t"
8+
#include "menu.t"
9+
10+
TITLE(CVE-2016-5180)
11+
BOXTOP
12+
#include "adv_20160929.gen"
13+
BOXBOT
14+
15+
#include "footer.t"

vulns.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ BOXTOP
1313
This is all known and public c-ares vulnerabilities to date. See also our <a
1414
href="security.html">security incident process</a>.
1515

16+
<p>
17+
SUBTITLE(CVE-2016-5180 - Sep 29 2016)
18+
<p>
19+
<a href="adv_20160929.html">ares_create_query single byte out of buffer write</a>
20+
1621
<p>
1722
SUBTITLE(CVE-2007-3153 - Jun 8 2007)
1823
<p>

0 commit comments

Comments
 (0)