Every CVE Search/ Get API key

CVE-2017-13704

In dnsmasq before 2.78, if the DNS packet size does not match the expected size, the size...

7.5 HighFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

65.4%Up 62.7 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 7.5

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.

Record
CVE-2017-13704
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-20
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2017-13704
Updated
2026-11-02
EUVDEUVD-2017-5221 No score

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.

Record
EUVD-2017-5221
Updated
2026-11-03
GitHub AdvisoriesGHSA-mprq-hpvv-8wcc 7.5

In dnsmasq before 2.78, if the DNS packet size does not match the expected size, the size...

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.

Record
GHSA-mprq-hpvv-8wcc
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-20
Updated
2026-11-02
OSVALPINE-CVE-2017-13704 7.5

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.

Record
ALPINE-CVE-2017-13704
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVBELL-CVE-2017-13704 7.5

CVE-2017-13704 does not affect BellSoft software

Record
BELL-CVE-2017-13704
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 5 moreShow less
OSV 7.5

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.

Record
CVE-2017-13704
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2017-13704 7.5

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.

Record
DEBIAN-CVE-2017-13704
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2017-13704 7.5

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.

Record
UBUNTU-CVE-2017-13704
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVMGASA-2017-0364 No score

Updated dnsmasq packages fix security vulnerabilities

CVE-2017-13704: Dnsmasq could be made to crash on a large DNS query. A DNS query received by UDP which exceeds 512 bytes (or the EDNS0 packet size, if different.) is enough to cause SIGSEGV.

CVE-2017-14491: A heap buffer overflow was found in dnsmasq in the code responsible for building DNS replies. An attacker could send crafted DNS packets to dnsmasq which would cause it to crash or, potentially, execute arbitrary code.

CVE-2017-14492: A heap buffer overflow was discovered in dnsmasq in the IPv6 router advertisement (RA) handling code. An attacker on the local network segment could send crafted RAs to dnsmasq which would cause it to crash or, potentially, execute arbitrary code. This issue only affected configurations using one of these options: enable-ra, ra-only, slaac, ra-names, ra-advrouter, or ra-stateless.

CVE-2017-14493: A stack buffer overflow was found in dnsmasq in the DHCPv6 code. An attacker on the local network could send a crafted DHCPv6 request to dnsmasq which would cause it to a crash or, potentially, execute arbitrary code.

CVE-2017-14494: An information leak was found in dnsmasq in the DHCPv6 relay code. An attacker on the local network could send crafted DHCPv6 packets to dnsmasq causing it to forward the contents of process memory, potentially leaking sensitive data.

CVE-2017-14495: A memory exhaustion flaw was found in dnsmasq in the EDNS0 code. An attacker could send crafted DNS packets which would trigger memory allocations which would never be freed, leading to unbounded memory consumption and eventually a crash. This issue only affected configurations using one of the options: add-mac, add-cpe-id, or add-subnet.

CVE-2017-14496: An integer underflow flaw leading to a buffer over-read was found in dnsmasq in the EDNS0 code. An attacker could send crafted DNS packets to dnsmasq which would cause it to crash. This issue only affected configurations using one of the options: add-mac, add-cpe-id, or add-subnet.

Record
MGASA-2017-0364
Updated
2026-11-02
OSVMGASA-2017-0367 No score

Updated dnsmasq packages fix security vulnerabilities

An audit by mozilla security found several vulnerability and potential vulnerability in dnsmasq:

  • Uninitialized buffer leads to memory leakage
  • Allocated memory is not cleared
  • Unchecked return value can lead to NULL pointer dereference
  • Hardcoded values in fscanf() format strings with aliased buffers

CVE-2017-13704: Dnsmasq could be made to crash on a large DNS query: A DNS query received by UDP which exceeds 512 bytes (or the EDNS0 packet size, if different.) is enough to cause SIGSEGV. (bug 21793)

CVE-2017-14491: A heap buffer overflow was found in dnsmasq in the code responsible for building DNS replies. An attacker could send crafted DNS packets to dnsmasq which would cause it to crash or, potentially, execute arbitrary code.

CVE-2017-14492: A heap buffer overflow was discovered in dnsmasq in the IPv6 router advertisement (RA) handling code. An attacker on the local network segment could send crafted RAs to dnsmasq which would cause it to crash or, potentially, execute arbitrary code. This issue only affected configurations using one of these options: enable-ra, ra-only, slaac, ra-names, ra-advrouter, or ra-stateless.

CVE-2017-14493: A stack buffer overflow was found in dnsmasq in the DHCPv6 code. An attacker on the local network could send a crafted DHCPv6 request to dnsmasq which would cause it to a crash or, potentially, execute arbitrary code.

CVE-2017-14494: An information leak was found in dnsmasq in the DHCPv6 relay code. An attacker on the local network could send crafted DHCPv6 packets to dnsmasq causing it to forward the contents of process memory, potentially leaking sensitive data.

CVE-2017-14495: A memory exhaustion flaw was found in dnsmasq in the EDNS0 code. An attacker could send crafted DNS packets which would trigger memory allocations which would never be freed, leading to unbounded memory consumption and eventually a crash. This issue only affected configurations using one of the options: add-mac, add-cpe-id, or add-subnet.

CVE-2017-14496: An integer underflow flaw leading to a buffer over-read was found in dnsmasq in the EDNS0 code. An attacker could send crafted DNS packets to dnsmasq which would cause it to crash. This issue only affected configurations using one of the options: add-mac, add-cpe-id, or add-subnet.

Record
MGASA-2017-0367
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
dnsmasq
Alpine:v3.10
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.11
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.12
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.13
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.14
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.15
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.16
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.17
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.18
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.19
before 2.78-r0
2.78-r0
Show 13 moreShow less
Affected packages
PackageAffectedFixed
dnsmasq
Alpine:v3.20
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.21
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.22
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.23
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.24
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.7
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.8
before 2.78-r0
2.78-r0
dnsmasq
Alpine:v3.9
before 2.78-r0
2.78-r0
dnsmasq
Debian:12
before 2.78-1
2.78-1
dnsmasq
Debian:13
before 2.78-1
2.78-1
dnsmasq
Debian:14
before 2.78-1
2.78-1
dnsmasq
Mageia:6
From an advisory covering 7 CVEs
before 2.77-1.2.mga6
2.77-1.2.mga6
dnsmasq
Mageia:5
From an advisory covering 7 CVEs
before 2.77-1.1.mga5
2.77-1.1.mga5

History

History
RecordedChangedSources
affected, facts
affected
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2017-13704 is a high vulnerability (CVSS 7.5) in Thekelleys Dnsmasq, published October 2, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 65.4%, the 99th percentile. Fixed in dnsmasq 2.78-r0.

References

Show 27 moreShow less
MoveEnter Open