diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2017-10-16 15:41:41 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2018-02-19 11:33:36 +0900 |
commit | f38ca76efdc420665b7c75a7e674e978764daab7 (patch) | |
tree | b6b24748bdf211064714c2f5345d0ef1f88f69d8 | |
parent | 7a8e76aa62fdf064689c63bc7b1b4ebf7e76cd3f (diff) | |
download | dnsmasq-f38ca76efdc420665b7c75a7e674e978764daab7.tar.gz dnsmasq-f38ca76efdc420665b7c75a7e674e978764daab7.tar.bz2 dnsmasq-f38ca76efdc420665b7c75a7e674e978764daab7.zip |
Security fix, CVE-2017-14492, DHCPv6 RA heap overflow.
Fix heap overflow in IPv6 router advertisement code.
This is a potentially serious security hole, as a
crafted RA request can overflow a buffer and crash or
control dnsmasq. Attacker must be on the local network.
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=24036ea507862c7b7898b68289c8130f85599c10
Change-Id: I3218bd52bda0c540a1c52d378b8d1b6e9ed50455
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
-rw-r--r-- | src/radv.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -197,6 +197,9 @@ void icmp6_packet(time_t now) /* look for link-layer address option for logging */ if (sz >= 16 && packet[8] == ICMP6_OPT_SOURCE_MAC && (packet[9] * 8) + 8 <= sz) { + if ((packet[9] * 8 - 2) * 3 - 1 >= MAXDNAME) { + return; + } print_mac(daemon->namebuff, &packet[10], (packet[9] * 8) - 2); mac = daemon->namebuff; } |