Skip to content
Emerging threatsHigh

CVE-2017-13704Dnsmasq Integer Overflow

In dnsmasq before 2.78, if the DNS packet size does not match the expected size, the size parameter in a memset call gets a negative value.

Published Oct 3, 2017 · Updated Oct 24, 2026 · Also known as ALPINE-CVE-2017-13704, CLEANSTART-2026-KY78316, CLEANSTART-2026-PF23839, DEBIAN-CVE-2017-13704, MGASA-2017-0364, MGASA-2017-0367, UBUNTU-CVE-2017-13704

Key Facts

Patch immediately
  • CVE-2017-13704 is a high-severity vulnerability (CVSS 7.5 v3.1) affecting Dnsmasq (Thekelleys), Ubuntu Linux (Canonical), Debian Linux and 5 more products.
  • It is not listed in any known-exploited vulnerabilities catalog. No public exploit code is known.
  • EPSS estimates a 65% probability of exploitation in the next 30 days.
  • Fixed versions are available, including Dnsmasq 2.76-3.ph1, Dnsmasq 2.76-3.ph2, Dnsmasq 2.77-1.1.mga5.
  • Brandefense priority: patch immediately, because it is very likely to be exploited soon.

Scores

CVSS v3.1

7.5

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS (30-day exploit likelihood)

65%

Higher than 99.2% of all scored CVEs

Exploit maturity

None known

ATLAS score

32/100

Publication score, see How it works

Exploitation Verdict

KEV listed

Not listed

Federal due date

None

No federal due date

Ransomware use

Not reported

Attributed actors

None named

Exploit & Defence Guidance

Exploit maturity

None known

Public exploit code

0

Proof-of-concept links

In-the-wild evidence

0

Reports of active use

Description

In dnsmasq before 2.78, if the DNS packet size does not match the expected size, the size parameter in a memset call gets a negative value. As it is an unsigned value, memset ends up writing up to 0xffffffff zero's (0xffffffffffffffff in 64 bit platforms), making dnsmasq crash.

Affected Products

49 affected entries in total
ProductAffected versionsFixed in
DnsmasqThekelleysSee advisory2.77
Ubuntu LinuxCanonical14.04, 16.04, 17.04n/a
Debian LinuxDebian7.0, 7.1, 9.0n/a
FedoraFedoraproject27n/a
LeapNovell42.2, 42.3n/a
3 more affected products in the full CVE brief

Patched Releases

Dnsmasq

2.76-3.ph1, 2.76-3.ph2, 2.77-1.1.mga5, 2.77-1.2.mga6, 2.78-1, 2.78-r0, 2.77

Timeline

  1. Publicly disclosed

    Oct 3, 2017

  2. Last updated

    Oct 24, 2026

Weakness Type

  • CWE-20 Improper Input Validation
  • CWE-190 Integer Overflow or Wraparound

FAQ

Common Questions.

Is CVE-2017-13704 On Your Attack Surface?

Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.

Request A Demo

Figures as of Dec 5, 2026. Compiled by Brandefense technologies from public vulnerability catalogs; scoring as described in How it works.

To report an error, contact Brandefense.