1 From c14b8b511ac55f6933aebefbd6cc27c1ec74ad58 Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Mon, 25 Sep 2017 18:47:15 +0100
4 Subject: [PATCH 2/9] Security fix, CVE-2017-14492, DHCPv6 RA heap
7 Fix heap overflow in IPv6 router advertisement code.
8 This is a potentially serious security hole, as a
9 crafted RA request can overflow a buffer and crash or
10 control dnsmasq. Attacker must be on the local network.
13 1 file changed, 3 insertions(+)
15 diff --git a/src/radv.c b/src/radv.c
16 index 749b666..d09fe0e 100644
19 @@ -198,6 +198,9 @@ void icmp6_packet(time_t now)
20 /* look for link-layer address option for logging */
21 if (sz >= 16 && packet[8] == ICMP6_OPT_SOURCE_MAC && (packet[9] * 8) + 8 <= sz)
23 + if ((packet[9] * 8 - 2) * 3 - 1 >= MAXDNAME) {
26 print_mac(daemon->namebuff, &packet[10], (packet[9] * 8) - 2);
27 mac = daemon->namebuff;