CVE-2017-13704
HighIn 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 Aug 4, 2026 · Also known as ALPINE-CVE-2017-13704, DEBIAN-CVE-2017-13704, 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.78-1.
- Brandefense priority: patch immediately, because it is very likely to be exploited soon.
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
Exploited in the wild
No known
Not in a known-exploited catalog
Public exploit code
None known
Get the full CVE-2017-13704 brief as a PDF
Every affected product and fixed release, exploitation status and a first 24 hours response checklist, emailed within minutes.
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
46 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| DnsmasqThekelleys | See advisory | 2.77 |
| Ubuntu LinuxCanonical | 14.04, 16.04, 17.04 | n/a |
| Debian LinuxDebian | 7.0, 7.1, 9.0 | n/a |
| FedoraFedoraproject | 27 | n/a |
| LeapNovell | 42.2, 42.3 | n/a |
Patched Releases
Dnsmasq
2.76-3.ph1, 2.76-3.ph2, 2.78-1, 2.78-r0, 2.77
Timeline
Publicly disclosed
Oct 3, 2017
Last updated
Aug 4, 2026
Weakness Type
- CWE-20 Improper Input Validation
- CWE-190 Integer Overflow or Wraparound
References
- advisoryhttp://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2017q3/011729.html
- advisoryhttps://access.redhat.com/security/vulnerabilities/3199382
- advisoryhttps://security.alpinelinux.org/vuln/CVE-2017-13704
- advisoryhttps://security.googleblog.com/2017/10/behind-masq-yet-more-dns-and-dhcp.html
- advisoryhttps://security-tracker.debian.org/tracker/CVE-2017-13704
FAQ
Common Questions.
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.
Affected: Dnsmasq (Thekelleys); Ubuntu Linux (Canonical) versions 14.04, 16.04, 17.04; Debian Linux versions 7.0, 7.1, 9.0, among others. The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
No public exploit code is known.
Fixed versions are available, including Dnsmasq 2.76-3.ph1, Dnsmasq 2.76-3.ph2, Dnsmasq 2.78-1.
Brandefense priority: patch immediately, because it is very likely to be exploited soon.
Is CVE-2017-13704 Running On Your Attack Surface?
Brandefense maps vulnerabilities like this one to your internet-facing assets and tells you exactly where to patch.
Request A Demo