Exploiting a 32-year-old buffer overflow in GNU telnetd (CVE-2026-32746)
A missing bounds check in GNU inetutils telnetd's add_slc function allows a pre-authentication buffer overflow during SLC option negotiation. On 32-bit systems with a suitable memory layout, an attacker can overwrite a GOT entry and redirect execution, though the article's demonstration only confirms the overwrite rather than full command execution.
striga.ai
Published on striga.ai
A buffer overflow bug in GNU inetutils telnetd was sitting undetected since 1994. It requires no authentication to trigger, just a TCP connection.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The add_slc function writes SLC triplets into a fixed-size global buffer without checking the number of entries, allowing a buffer overflow.
Impact
On 32-bit targets with a favourable memory layout, the overflow could redirect a GOT entry and potentially lead to code execution, but the demonstrated 32-bit exploit only confirmed the overwrite by causing the process to terminate; the 64-bit RCE required local access via /proc/PID/mem.
What the attacker needed
Network access to telnetd port; 32-bit target with suitable memory layout; no authentication required
The fix
A single bounds check was added to add_slc, but no release has been cut at the time of writing, so users should compile patched code themselves, disable Telnet, or block port 23.
How it was found
- Connect via TCP and send WILL LINEMODE before TTYPE so the server defers SLC processing.
- Send a crafted SLC payload that uses amplification, padding, alignment, and a GOT write.
- Send TTYPE to trigger terminit() and deferslc(), causing the overflow in add_slc.
- Send one more SLC suboption so the server calls the overwritten sprintf() GOT entry.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Telnet is an old protocol for remote command-line access. Before login, the client and server negotiate special characters using small three-byte entries called triplets. The server code that stores these triplets does not check how many it receives, so a malicious client can send too many and overwrite nearby memory. On some 32-bit systems this can redirect the program to run different code.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.