Blame SOURCES/dnsmasq-2.76-CVE-2017-14493.patch
|
|
a03026 |
From 5086b12a4b1269d1576b5bab01f72c6fa19c55bc Mon Sep 17 00:00:00 2001
|
|
|
a03026 |
From: Simon Kelley <simon@thekelleys.org.uk>
|
|
|
a03026 |
Date: Mon, 25 Sep 2017 18:52:50 +0100
|
|
|
a03026 |
Subject: [PATCH 3/9] Security fix, CVE-2017-14493, DHCPv6 - Stack buffer
|
|
|
a03026 |
overflow.
|
|
|
a03026 |
|
|
|
a03026 |
Fix stack overflow in DHCPv6 code. An attacker who can send
|
|
|
a03026 |
a DHCPv6 request to dnsmasq can overflow the stack frame and
|
|
|
a03026 |
crash or control dnsmasq.
|
|
|
a03026 |
---
|
|
|
a03026 |
src/rfc3315.c | 3 +++
|
|
|
a03026 |
1 file changed, 3 insertions(+)
|
|
|
a03026 |
|
|
|
a03026 |
diff --git a/src/rfc3315.c b/src/rfc3315.c
|
|
|
a03026 |
index 73bdee4..8d18a28 100644
|
|
|
a03026 |
--- a/src/rfc3315.c
|
|
|
a03026 |
+++ b/src/rfc3315.c
|
|
|
a03026 |
@@ -206,6 +206,9 @@ static int dhcp6_maybe_relay(struct state *state, void *inbuff, size_t sz,
|
|
|
a03026 |
/* RFC-6939 */
|
|
|
a03026 |
if ((opt = opt6_find(opts, end, OPTION6_CLIENT_MAC, 3)))
|
|
|
a03026 |
{
|
|
|
a03026 |
+ if (opt6_len(opt) - 2 > DHCP_CHADDR_MAX) {
|
|
|
a03026 |
+ return 0;
|
|
|
a03026 |
+ }
|
|
|
a03026 |
state->mac_type = opt6_uint(opt, 0, 2);
|
|
|
a03026 |
state->mac_len = opt6_len(opt) - 2;
|
|
|
a03026 |
memcpy(&state->mac[0], opt6_ptr(opt, 2), state->mac_len);
|
|
|
a03026 |
--
|
|
|
a03026 |
2.9.5
|
|
|
a03026 |
|