2024-07-01
OpenSSH Server Critical RCE Vulnerability
Researchers at Qualys have published details about a critical unauthenticated remote code execution vulnerability in OpenSSH server. The flaw could be exploited to execute code as root on Linux systems. The problem is due to a signal handler race condition. There are two associated CVEs because the issue Qualys identified (CVE-2024-6387) is a regression of a vulnerability (CVE-2026-5051) that was patched nearly 18 years ago.
Editor's Note
This is a signal handler race condition. When a user doesn't login in the LoginGraceTime interval (600 seconds default) and sshd is sent a SIGALRM asynchronously, attackers can take advantage of functions, such as syslog(), which are not async-signal safe. The tricky part is identifying the vulnerable versions of OpenSSH. OpenSSH versions before 4.4p1 are vulnerable, 4.4p1 up to, but not including 8.5p1 are not vulnerable due to a patch for CVE-2006-5051), while versions 8.5p1 up to, but not including 9.8p1 are vulnerable due to removal a critical component which blocks the exploit. OpenBSD systems are unaffected due to security mechanisms included in that OS since 2001. The optimal fix is to apply the patches when released for your distribution. In the meantime, limit access to SSH services, using network-based controls, not through controls in your OpenSSH service as well as monitor SSH connections for abuse, particularly Internet facing ones.
Lee Neely
Race condition vulnerabilities can be finicky to exploit and require a different skill set to master. That said, given upwards of 700K potential victims, evil doers are paying attention. Prudence dictates downloading and patching as updates become available.
Curtis Dukes
Read more in
Qualys: regreSSHion: Remote Unauthenticated Code Execution Vulnerability in OpenSSH server
ISC: SSH "regreSSHion" Remote Code Execution Vulnerability in OpenSSH.
The Hacker News: New OpenSSH Vulnerability Could Lead to RCE as Root on Linux Systems
The Register: Nasty regreSSHion bug in OpenSSH puts around 700K Linux boxes at risk
Security Week: Millions of OpenSSH Servers Potentially Vulnerable to Remote regreSSHion Attack
Bleeping Computer: New regreSSHion OpenSSH RCE bug gives root on Linux servers
NVD: CVE-2024-6387 Detail
NVD: CVE-2006-5051 Detail