summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2017-10-04 12:34:26 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2017-10-04 15:28:01 +0200
commitd5422e563facc33881763a587b37dd29012e160b (patch)
tree2493b5cfe03abea7acc2aab1249135351ee79a7f
parent4a1d1cdf2bf53dedfdb25ae1a045dfbcfda77c85 (diff)
downloadmeta-el-common-d5422e563facc33881763a587b37dd29012e160b.tar.gz
dnsmasq: CVE-2017-14492
Heap based overflow. References: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2017-14492 https://security.googleblog.com/2017/10/behind-masq-yet-more-dns-and-dhcp.html Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--recipes-networking/dnsmasq/dnsmasq/CVE-2017-14492.patch57
-rw-r--r--recipes-networking/dnsmasq/dnsmasq_%.bbappend1
2 files changed, 58 insertions, 0 deletions
diff --git a/recipes-networking/dnsmasq/dnsmasq/CVE-2017-14492.patch b/recipes-networking/dnsmasq/dnsmasq/CVE-2017-14492.patch
new file mode 100644
index 0000000..5b66944
--- /dev/null
+++ b/recipes-networking/dnsmasq/dnsmasq/CVE-2017-14492.patch
@@ -0,0 +1,57 @@
1From 24036ea507862c7b7898b68289c8130f85599c10 Mon Sep 17 00:00:00 2001
2From: Simon Kelley <simon@thekelleys.org.uk>
3Date: Mon, 25 Sep 2017 18:47:15 +0100
4Subject: [PATCH] Security fix, CVE-2017-14492, DHCPv6 RA heap overflow.
5
6Fix heap overflow in IPv6 router advertisement code.
7This is a potentially serious security hole, as a
8crafted RA request can overflow a buffer and crash or
9control dnsmasq. Attacker must be on the local network.
10
11CVE: CVE-2017-14492
12Upstream-Status: Backport
13
14Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
15---
16 CHANGELOG | 10 +++++++++-
17 src/radv.c | 3 +++
18 2 files changed, 12 insertions(+), 1 deletion(-)
19
20diff --git a/CHANGELOG b/CHANGELOG
21index a7c2f35..df6c157 100644
22--- a/CHANGELOG
23+++ b/CHANGELOG
24@@ -35,7 +35,15 @@ version 2.78
25 and Kevin Hamacher of the Google Security Team for
26 finding this.
27
28-
29+ Fix heap overflow in IPv6 router advertisement code.
30+ This is a potentially serious security hole, as a
31+ crafted RA request can overflow a buffer and crash or
32+ control dnsmasq. Attacker must be on the local network.
33+ CVE-2017-14492 applies.
34+ Credit to Felix Wilhelm, Fermin J. Serna, Gabriel Campana
35+ and Kevin Hamacher of the Google Security Team for
36+ finding this.
37+
38
39 version 2.77
40 Generate an error when configured with a CNAME loop,
41diff --git a/src/radv.c b/src/radv.c
42index 1032189..9b7e52c 100644
43--- a/src/radv.c
44+++ b/src/radv.c
45@@ -198,6 +198,9 @@ void icmp6_packet(time_t now)
46 /* look for link-layer address option for logging */
47 if (sz >= 16 && packet[8] == ICMP6_OPT_SOURCE_MAC && (packet[9] * 8) + 8 <= sz)
48 {
49+ if ((packet[9] * 8 - 2) * 3 - 1 >= MAXDNAME) {
50+ return;
51+ }
52 print_mac(daemon->namebuff, &packet[10], (packet[9] * 8) - 2);
53 mac = daemon->namebuff;
54 }
55--
561.7.10.4
57
diff --git a/recipes-networking/dnsmasq/dnsmasq_%.bbappend b/recipes-networking/dnsmasq/dnsmasq_%.bbappend
index e228035..1fc8819 100644
--- a/recipes-networking/dnsmasq/dnsmasq_%.bbappend
+++ b/recipes-networking/dnsmasq/dnsmasq_%.bbappend
@@ -3,4 +3,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
3 3
4SRC_URI += "file://0001-CVE-2017-14491.patch \ 4SRC_URI += "file://0001-CVE-2017-14491.patch \
5 file://0002-CVE-2017-14491.patch \ 5 file://0002-CVE-2017-14491.patch \
6 file://CVE-2017-14492.patch \
6" 7"