Security Advisory

CVE-2017-14495: dnsmasq EDNS0 Memory Leak DoS

Last updated:
  • CVE-2017-14495

CVE-2017-14495 is a memory leak in dnsmasq before 2.78: crafted DNS queries make it allocate memory it never frees, until the service runs out. It only applies when --add-mac, --add-cpe-id or --add-subnet is set. NVD scores it 7.5, and Siemens lists RUGGEDCOM RM1224 and SCALANCE M-800, S615 and W1750D devices as affected.

Vulnerability summary

CVSS base score

7.5

High severity

EPSS score (FIRST)

85.4%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2017-14495 · Source: NVD

Affected components

ComponentCPEVersion range
dnsmasq (EDNS0 add_pseudoheader, with --add-mac, --add-cpe-id or --add-subnet)cpe:2.3:a:thekelleys:dnsmasq:*:*:*:*:*:*:*:*up to and including 2.77; fixed in 2.78 (NVD, dnsmasq CHANGELOG)
Siemens RUGGEDCOM RM1224 and SCALANCE M-800 / S615—all versions before V5.0; fixed in V5.0 (Siemens ProductCERT SSA-689071)
Siemens SCALANCE W1750Dcpe:2.3:o:siemens:scalance_w1750d_firmware:*:*:*:*:*:*:*:*all versions before V6.5.1.5; fixed in V6.5.1.5 (Siemens ProductCERT SSA-689071)
Synology Router Manager (SRM) 1.1—fixed in SRM 1.1.5-6542-2 (Synology-SA-17:59)

What does this mean for affected devices?

CVE-2017-14495 is a memory leak (CWE-772) in dnsmasq's EDNS0 code. NVD describes it as a leak in dnsmasq before 2.78 "when the --add-mac, --add-cpe-id or --add-subnet option is specified", which "allows remote attackers to cause a denial of service (memory consumption) via vectors involving DNS response creation". NVD scores it 7.5 (high) with the CVSS 3.0 vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H for dnsmasq up to and including 2.77 (NVD). CERT/CC VU#973527 files it under CWE-400, uncontrolled resource consumption.

The dnsmasq CHANGELOG entry for 2.78 explains the mechanism. An attacker who can send malicious DNS queries "can trigger memory allocations in the add_pseudoheader function", and "the allocated memory is never freed which leads to a DoS through memory exhaustion." It also limits the scope: "dnsmasq is vulnerable only if one of the following option is specified: --add-mac, --add-cpe-id or --add-subnet." The Google Security Team, which found it, lists it in its disclosure of 2017-10-02 as an out-of-memory DoS over DNS caused by a missing free().

Those three options are features of routers that hand client details to an upstream resolver. The dnsmasq man page says --add-mac adds "the MAC address of the requestor to DNS queries which are forwarded upstream" and that this "may be used to DNS filtering by the upstream server". --add-cpe-id adds "an arbitrary identifying string" and --add-subnet adds the client's subnet. A plain home router without upstream filtering usually has none of them set, and then this CVE does not apply.

Siemens ProductCERT SSA-689071, first published 2017-11-17 and at V1.3 since 2020-10-13, lists CVE-2017-14495 for its industrial routers and access points:

  • RUGGEDCOM RM1224 LTE router: all versions before V5.0, fixed in V5.0.
  • SCALANCE M-800 / S615 industrial routers: all versions before V5.0, fixed in V5.0.
  • SCALANCE W1750D access point: all versions before V6.5.1.5, fixed in V6.5.1.5.

Siemens describes the effect on these devices as a crash of the dnsmasq process caused by "specially crafted request messages to the service on port 53/udp" and scores it 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L), lower than NVD. Its workarounds are to disable the DNS proxy on M-800, S615 and RM1224 and point internal devices at a different DNS server. On the W1750D, if OpenDNS, Captive Portal or URL redirection are unused, block incoming access to port 53/UDP. Synology-SA-17:59 also lists CVE-2017-14495, rated Important at 7.5, for Synology Router Manager 1.1, fixed in 1.1.5-6542-2.

To triage it in your own firmware, check the dnsmasq version and then the configuration for add-mac, add-cpe-id and add-subnet. Our dnsmasq vulnerabilities in embedded firmware guide shows where those settings live in an image. The same Siemens advisory covers the DNS heap overflow CVE-2017-14491, which needs none of these options, and the same Google disclosure includes the DHCPv6 stack overflow CVE-2017-14493.

CVE-2017-14495 is not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13). FIRST EPSS gives it 0.854, the 99.7th percentile, in the 2026-11-16 dataset (CISA KEV, FIRST EPSS). EPSS cannot see whether the --add-* options are set on a given device.

To fix it, move to dnsmasq 2.78 or later, or install the vendor firmware above. The Debian Security Tracker shows the stretch backport 2.76-5+deb9u1 and marks jessie and wheezy not affected because the vulnerable code was introduced later. Where the options are not needed, leave them unset. Our input handling fix guide covers resource exhaustion as a class.

How to fix this class of issueThis advisory's weakness class is Resource exhaustion. Our practical guide covers how to detect, fix, verify and disclose it: How to fix SQL injection, XSS, resource exhaustion and deserialization flaws in embedded firmware.

Evidence

  • Memory leak in dnsmasq before 2.78 with --add-mac, --add-cpe-id or --add-subnet; remote DoS via memory consumption; CWE-772; CVSS 3.0 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). — NVD
  • 2.78: allocations in add_pseudoheader never freed, DoS through memory exhaustion; vulnerable only with --add-mac, --add-cpe-id or --add-subnet. — dnsmasq CHANGELOG
  • CVE-2017-14495: OOM/DoS via DNS, lack of free(). — Google Security Blog
  • --add-mac adds requestor MAC to forwarded queries, may be used for upstream DNS filtering; --add-cpe-id adds an identifying string; --add-subnet adds a subnet address. — dnsmasq man page
  • RM1224 and M-800/S615 < V5.0 (fix V5.0), W1750D < V6.5.1.5 (fix V6.5.1.5); CVE-2017-14495 scored 5.3 A:L, crash via crafted requests on 53/udp; DNS proxy / port 53 workarounds; V1.3 2020-10-13. — Siemens ProductCERT SSA-689071
  • CVE-2017-14495 rated Important, 7.5; SRM 1.1 fixed in 1.1.5-6542-2. — Synology-SA-17:59
  • CWE-400 for CVE-2017-14495; fixed in 2.78. — CERT/CC VU#973527
  • Stretch fixed in 2.76-5+deb9u1; jessie and wheezy not affected. — Debian Security Tracker
  • Not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13). — CISA KEV
  • EPSS 0.854 (99.7th percentile), dataset 2026-11-16, read 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. Siemens ProductCERT SSA-689071: DNSMasq vulnerabilities in SCALANCE W1750D, SCALANCE M-800 / S615 and RUGGEDCOM RM1224
  3. Synology-SA-17:59: Dnsmasq
  4. CERT/CC VU#973527: Dnsmasq contains multiple vulnerabilities
  5. Google Security Blog: Behind the Masq, yet more DNS and DHCP vulnerabilities
  6. dnsmasq CHANGELOG
  7. dnsmasq man page
  8. Debian Security Tracker
  9. CISA KEV
  10. FIRST EPSS

Frequently asked questions

Does CVE-2017-14495 affect every dnsmasq before 2.78?

No. The dnsmasq CHANGELOG says it is vulnerable only if --add-mac, --add-cpe-id or --add-subnet is specified. Without those options the leaking code path is not used (per the dnsmasq CHANGELOG and NVD).

Which Siemens devices are affected by CVE-2017-14495?

RUGGEDCOM RM1224 and SCALANCE M-800 / S615 before V5.0, and SCALANCE W1750D before V6.5.1.5. Siemens rates it 5.3 for these devices (per Siemens ProductCERT SSA-689071).

What can an attacker do with CVE-2017-14495?

Send DNS queries that make dnsmasq allocate memory it never frees, until memory is exhausted and DNS and DHCP from the device stop. NVD lists no confidentiality or integrity impact (per NVD and the dnsmasq CHANGELOG).

Is CVE-2017-14495 in the CISA KEV catalog?

No, not as of 2026-11-17 (catalog version 2026.11.13). FIRST EPSS gives it 0.854, the 99.7th percentile, in the 2026-11-16 dataset (per CISA KEV and FIRST EPSS).