Overview of CVE-2024-6387

On 1 July 2024, CVE-2024-6387 was announced for a Remote Code Execution (RCE) vulnerability in specific releases of OpenSSH Server. This vulnerability was discovered and reported by Qualys and has been named regreSSHion. Red Hat has assigned a CVSS v3 score of 8.1 (High) to this CVE.

What is this vulnerability?

A race condition exists in vulnerable versions of OpenSSH that can be triggered if a client does not authenticate to a server within the time specified in the LoginGraceTime setting. Successful exploitation could result in remote code execution and root-level shell access to the target.

In the original tests performed by researchers at Qualys, winning the race condition required a large volume of authentication attempts (around 10,000) in all tests. Specifically, these exploits were successful at times when syslog() was calling an async-signal-unsafe function such as malloc().

This vulnerability is a regression of a previously patched vulnerability from 2006, CVE-2006-5051, and was reintroduced in 2020.

While it is important to update this critical component to the latest secure version, exploitability has only been demonstrated against 32-bit (i386) glibc-based Linux systems that leverage vulnerable versions of OpenSSH Server. It is possible that 64-bit Linux systems could be compromised as well, but additional research and development would be required by an attacker to do so. Thankfully, modern security implementations like address space layout randomization (ASLR) make it significantly more challenging, though not impossible, to replicate this quickly or reliably on 64-bit systems.

What is impacted by this vulnerability?

Linux systems running OpenSSH Server versions:

  • Greater than or equal to 8.5p1 and less than 9.8p1

  • Less than 4.4p1*

Note:

Specifically, versions less than 4.4p1 are vulnerable unless they have been patched for CVE-2006-5051 and CVE-2008-4109. Tanium Guardian’s content and associated guidance looks only at the specific version numbers for versions prior to 4.4p1 and does not perform additional checks for mitigations or patches against the 18- and 20-year-old original CVEs.

What endpoints are potentially exploitable?

A system is vulnerable to exploitation if:

  • LoginGraceTime settings are at their default value (120 seconds/2 minutes) for the OpenSSH Server service

  • OpenSSH Server service is enabled and listening

  • A vulnerable version of OpenSSH Server is installed

  • The endpoint running the OpenSSH Server service is accessible to the attacker