Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-support / dnsmasq / dnsmasq / stx / dnsmasq-2.76-CVE-2017-14492.patch
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
5  overflow.
6
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.
11 ---
12  src/radv.c | 3 +++
13  1 file changed, 3 insertions(+)
14
15 diff --git a/src/radv.c b/src/radv.c
16 index 749b666..d09fe0e 100644
17 --- a/src/radv.c
18 +++ b/src/radv.c
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)
22         {
23 +         if ((packet[9] * 8 - 2) * 3 - 1 >= MAXDNAME) {
24 +           return;
25 +         }
26           print_mac(daemon->namebuff, &packet[10], (packet[9] * 8) - 2);
27           mac = daemon->namebuff;
28         }
29 -- 
30 2.9.5
31