The cursor froze, the build pipeline hung, and the terminal bled error logs like a wound.
A rare but dangerous Linux terminal bug is hitting self-hosted environments, killing processes mid-run and corrupting session states. It often triggers when a forked process sends malformed control sequences over STDOUT or STDERR. In long-lived shells, like those run inside containerized CI/CD nodes, the bug can cascade—leaving orphaned processes, broken file locks, and stuck TTYs.
For self-hosted infrastructure, this is more than an annoyance. Compromised terminals break deploys, leave ports bound, and force manual intervention. In one case we observed, the bug appeared only when running bash inside a detached tmux session while streaming logs to a remote syslog backend. The terminal emulator misparsed escape sequences, injected raw bytes into subsequent commands, and triggered unintended operations.
The root cause is tied to incomplete UTF-8 decoding in certain pseudo-terminal (PTY) drivers under specific kernel and glibc combinations. When a program sends an invalid byte sequence, the PTY may behave unpredictably. On some Linux distributions, the issue hides inside older LTS kernels patched only in niche branches. That makes it easy for self-hosted systems to miss the fix entirely.