cbcvebase.
CVE-2017-13704
published 2017-10-03

CVE-2017-13704: 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…

PriorityP354high7.5CVSS 3.0
AVNACLPRNUINSUCNINAH
EPSS
65.41%
99.2th percentile
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

18 ranges
VendorProductVersion rangeFixed in
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debiandebian_linux
debiandebian_linux
debiandebian_linux
debiandnsmasq< dnsmasq 2.78-1 (bookworm)dnsmasq 2.78-1 (bookworm)
fedoraprojectfedora
novellleap
novellleap
redhatenterprise_linux_desktop
redhatenterprise_linux_server
redhatenterprise_linux_workstation
thekelleysdnsmasq<= 2.77
thekelleysdnsmasq>= 0 < 2.78-12.78-1
thekelleysdnsmasq>= 0 < 2.78-12.78-1
thekelleysdnsmasq>= 0 < 2.78-12.78-1
thekelleysdnsmasq>= 0 < 2.78-12.78-1

Detection & IOCsextracted from sources · hover to see the quote

urlhttp://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=63437ffbb58837b214b4b92cb1c54bc5f3279928
  • Detect oversized DNS query packets: trigger condition is a DNS query where the request length (qlen) is larger than 512 bytes, or includes an EDNS0 packet size field, AND the request is larger than what the EDNS0 size field specifies — this causes a negative memset size parameter and crashes dnsmasq.
  • Monitor for unexpected dnsmasq process crashes (denial-of-service), especially following receipt of crafted DNS request messages on UDP port 53, as a sign of exploitation attempts.
  • Flag DNS packets where the declared EDNS0 payload size is smaller than the actual received packet length — this mismatch is the precise trigger for the integer underflow in vulnerable dnsmasq versions (< 2.78).
  • ·Vulnerability is a regression introduced in dnsmasq 2.77 only; versions prior to 2.77 are NOT affected. Only dnsmasq 2.77 is vulnerable; fixed in 2.78.
  • ·Red Hat Enterprise Linux 5, 6, and 7 ship a dnsmasq version that is NOT affected by this CVE — do not prioritize patching on those platforms.

CVSS provenance

nvdv3.07.5HIGHCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:N/I:N/A:P
osv7.5HIGH
vendor_debian7.5HIGH
vendor_redhat7.5HIGH
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.