← Vulnerability feed

Vulnerability record · CVE-2017-13704 · published 3 October 2017

CVE-2017-13704: dnsmasq DNS packet size mismatch causes memset crash

Canonical · Ubuntu Linux

In dnsmasq before 2.78, a DNS packet whose size does not match the expected size causes the size parameter in a memset call to become negative. Because the value is unsigned, memset writes up to 0xffffffff zero bytes (0xffffffffffffffff on 64-bit platforms), crashing dnsmasq. The flaw is an input validation failure in a widely deployed DNS/DHCP forwarder, so a crash takes down name resolution for everything relying on it.

7.5 CVSS 3.0 High EPSS 65% · top 0.8% CWE-20 · Improper input validation
7.5CVSS 3.0 base score, v2 5.0
65%EPSS exploitation probability, 30 days
NoNot in CISA KEV
8Affected product versions listed by NVD
24References
17 Jun 2026Last modified by NVD

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.

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

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: high.

high priorityUnauthenticated remote crash of a core DNS/DHCP service with a high EPSS score, though no KEV listing or confirmed in-the-wild exploitation is recorded.

What it is

In dnsmasq before 2.78, a DNS packet whose size does not match the expected size causes the size parameter in a memset call to become negative. Because the value is unsigned, memset writes up to 0xffffffff zero bytes (0xffffffffffffffff on 64-bit platforms), crashing dnsmasq. The flaw is an input validation failure in a widely deployed DNS/DHCP forwarder, so a crash takes down name resolution for everything relying on it.

Impact

An attacker can crash the dnsmasq process, causing a denial of service for DNS and DHCP services it provides. No data confidentiality or integrity impact is described; the effect is availability loss.

Attack surface

Reachable over the network by sending a crafted DNS packet with a mismatched size, per the CVSS vector AV:N/AC:L/PR:N/UI:N. No authentication or user interaction is required.

Exploitation

Not listed in CISA KEV and no ransomware usage is documented, but EPSS is high at 0.6541 (99.2nd percentile), indicating elevated likelihood of exploitation activity. References are vendor advisories, release notes and third-party analyses rather than public exploit code.

What to do

  • Upgrade dnsmasq to 2.78 or later, or apply the vendor patch for your distribution (Ubuntu, Debian, Fedora, Red Hat, Novell/SUSE, Synology).
  • If immediate patching is not possible, restrict DNS access to trusted networks and block untrusted UDP/TCP port 53 traffic at the perimeter.
  • Monitor dnsmasq process health and configure automatic restart of the service to limit outage duration.
  • Inventory all dnsmasq instances, including embedded and appliance deployments, since the affected products list spans multiple vendors.

Detection

  • Alert on dnsmasq process crashes or unexpected restarts in system and service logs.
  • Monitor for repeated or malformed DNS queries with anomalous packet sizes targeting port 53.
  • Track availability gaps in DNS resolution from monitoring probes to catch crash-induced outages.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

8 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://thekelleys.org.uk/dnsmasq/CHANGELOG Release NotesVendor Advisory
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git%3Ba=commit%3Bh=63437ffbb58837b214b4b92cb1c54bc5f3279928
http://www.securityfocus.com/bid/101085 Third Party AdvisoryVDB Entry
http://www.securityfocus.com/bid/101977
http://www.securitytracker.com/id/1039474 Third Party AdvisoryVDB Entry
https://access.redhat.com/security/vulnerabilities/3199382 Issue TrackingThird Party Advisory
https://cert-portal.siemens.com/productcert/pdf/ssa-689071.pdf
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4TK6DWC53WSU6633EVZL7H4
https://security.googleblog.com/2017/10/behind-masq-yet-more-dns-and-dhcp.html Third Party Advisory
https://www.mail-archive.com/dnsmasq-discuss%40lists.thekelleys.org.uk/msg11664.html
https://www.mail-archive.com/dnsmasq-discuss%40lists.thekelleys.org.uk/msg11665.html
https://www.synology.com/support/security/Synology_SA_17_59_Dnsmasq
http://thekelleys.org.uk/dnsmasq/CHANGELOG Release NotesVendor Advisory
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git%3Ba=commit%3Bh=63437ffbb58837b214b4b92cb1c54bc5f3279928
http://www.securityfocus.com/bid/101085 Third Party AdvisoryVDB Entry
http://www.securityfocus.com/bid/101977
http://www.securitytracker.com/id/1039474 Third Party AdvisoryVDB Entry
https://access.redhat.com/security/vulnerabilities/3199382 Issue TrackingThird Party Advisory
https://cert-portal.siemens.com/productcert/pdf/ssa-689071.pdf
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4TK6DWC53WSU6633EVZL7H4
https://security.googleblog.com/2017/10/behind-masq-yet-more-dns-and-dhcp.html Third Party Advisory
https://www.mail-archive.com/dnsmasq-discuss%40lists.thekelleys.org.uk/msg11664.html
https://www.mail-archive.com/dnsmasq-discuss%40lists.thekelleys.org.uk/msg11665.html
https://www.synology.com/support/security/Synology_SA_17_59_Dnsmasq

Track CVE-2017-13704 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed9.8CVE-2025-24813Apache Tomcat Default Servlet path equivalence enables RCE and file disclosureApache Tomcat mishandles path equivalence for names containing an internal dot, letting a remote unauthenticated attacker write files through the Def…KEVEPSS 100%analysed9.8CVE-2024-9680Mozilla Firefox and Thunderbird use-after-free in Animation timelinesA use-after-free flaw in Animation timelines allows an attacker to execute code in the content process of Firefox and Thunderbird. Mozilla reports ex…KEVEPSS 23%analysed9.8CVE-2024-4577PHP-CGI on Windows argument injection leads to remote code executionPHP-CGI on Windows can misinterpret characters in the command line passed to Win32 API functions when certain code pages are configured, due to Windo…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2017-13704), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.