CVE-2009-2957

dnsmasq < 2.50 - Heap-Based Buffer Overflow via Long TFTP Filename

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2009-2957.

AI-analyzed exploit summary This advisory details two vulnerabilities in Dnsmasq's TFTP server: a heap overflow (CVE-2009-2957) due to improper handling of long filenames with a configured prefix, and a null-pointer dereference (CVE-2009-2958) in TFTP option parsing. The document includes technical analysis, affected versions, and proof-of-concept details for crashing the service.

Description

Heap-based buffer overflow in the tftp_request function in tftp.c in dnsmasq before 2.50, when --enable-tftp is used, might allow remote attackers to execute arbitrary code via a long filename in a TFTP packet, as demonstrated by a read (aka RRQ) request.

Exploits (1)

exploitdb WRITEUP
doswindows
https://www.exploit-db.com/exploits/9617

This advisory details two vulnerabilities in Dnsmasq's TFTP server: a heap overflow (CVE-2009-2957) due to improper handling of long filenames with a configured prefix, and a null-pointer dereference (CVE-2009-2958) in TFTP option parsing. The document includes technical analysis, affected versions, and proof-of-concept details for crashing the service.

Classification
Writeup 100%
Attack Type
Rce | Dos
Complexity
Moderate
Reliability
Reliable
Target: Dnsmasq 2.40-2.49
No auth needed
Prerequisites: TFTP service enabled in Dnsmasq · Long directory prefix configured for CVE-2009-2957
devstral-2 · analyzed Feb 19, 2026 Full analysis →

References (9)

Core 9
Core References
Patch vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/36121
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/36563
Vendor Advisory vendor-advisory x_refsource_ubuntu
http://www.ubuntu.com/usn/USN-827-1
Issue Tracking x_refsource_confirm
https://bugzilla.redhat.com/show_bug.cgi?id=519020
Third Party Advisory, VDB Entry vdb-entry signature x_refsource_oval
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10538
Vendor Advisory x_refsource_confirm
http://www.thekelleys.org.uk/dnsmasq/CHANGELOG
Vendor Advisory vendor-advisory x_refsource_redhat
https://rhn.redhat.com/errata/RHSA-2010-0095.html
Vendor Advisory vendor-advisory x_refsource_redhat
http://www.redhat.com/support/errata/RHSA-2009-1238.html

Scores

EPSS 0.1268
EPSS Percentile 95.7%

Details

CWE
CWE-119
Status published
Products (50)
thekelleys/dnsmasq 0.4
thekelleys/dnsmasq 0.5
thekelleys/dnsmasq 0.6
thekelleys/dnsmasq 0.7
thekelleys/dnsmasq 0.95
thekelleys/dnsmasq 0.96
thekelleys/dnsmasq 0.98
thekelleys/dnsmasq 0.992
thekelleys/dnsmasq 0.996
thekelleys/dnsmasq 1.0
... and 40 more
Published Sep 02, 2009
Tracked Since Feb 18, 2026