Heap-based buffer overflow in Dnsmasq - CVE-2009-2957
Published: June 8, 2025
Vulnerability identifier: #VU110633
CSH Severity: High
CVSS v4: 8.7 [CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2009-2957
CWE-ID: CWE-122
Exploitation vector: Adjecent network
Exploit availability:
No public exploit available
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The vulnerability exists due to a boundary error within the tftp_request() function in tftp.c. A remote attacker can send a long filename in a TFTP packet, trigger a heap-based buffer overflow and execute arbitrary code on the system.
Affected software
Dnsmasq
Gentoo Linux
net-dns/dnsmasq
Gentoo Linux
net-dns/dnsmasq
How to mitigate CVE-2009-2957
Install update from vendor's website.
Dnsmasq - update to 2.50
net-dns/dnsmasq - update to 2.5.0
net-dns/dnsmasq - update to 2.5.0
External References
- http://www.coresecurity.com/content/dnsmasq-vulnerabilities
- http://www.redhat.com/support/errata/RHSA-2009-1238.html
- http://www.securityfocus.com/bid/36121
- http://www.thekelleys.org.uk/dnsmasq/CHANGELOG
- http://www.ubuntu.com/usn/USN-827-1
- https://bugzilla.redhat.com/show_bug.cgi?id=519020
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10538
- https://rhn.redhat.com/errata/RHSA-2010-0095.html