Vulnerability details
Advisory: SB2011122301 - Remote code execution in FreeBSD
Vulnerable component: FreeBSD
CVE-ID: CVE-2011-4862
CVSSv3 score: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:F/RL:O/RC:C
CWE-ID: CWE-119 - Memory corruption
Description:
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The weakness exists due to buffer overflow in the encrypt_keyid() function of telnetd. A remote attacker can send a very large encryption key to telnetd daemon, trigger buffer overflow and execute arbitrary code with root privileges.
Successful exploitation of the vulnerability results in arbitrary code execution on the vulnerable system.
Note: the vulnerability was being actively exploited.
Public Exploits:
- Linux BSD-derived Telnet Service Encryption Key ID - Buffer Overflow (Metasploit) [Exploit-DB]
- FreeBSD Telnet Service - Encryption Key ID Buffer Overflow (Metasploit) [Exploit-DB]
- TelnetD encrypt_keyid - Function Pointer Overwrite [Exploit-DB]
External links:
https://lists.freebsd.org/pipermail/freebsd-security/2011-December/006117.html
https://lists.freebsd.org/pipermail/freebsd-security/2011-December/006119.html
https://www.freebsd.org/security/advisories/FreeBSD-SA-11:08.telnetd.asc
http://web.mit.edu/kerberos/www/advisories/MITKRB5-SA-2011-008.txt
http://eromang.zataz.com/2012/01/16/cve-2011-4862-freebsd-telnet-buffer-overflow-metasploit-demo/
https://vulners.com/metasploit/MSF:AUXILIARY/SCANNER/TELNET/TELNET_ENCRYPT_OVERFLOW