Heap-based buffer overflow in Dnsmasq - CVE-2009-2957

 

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

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

External References

Related Security Bulletins