Skip to content
Race condition Write-up Advanced

regreSSHion: Remote Unauthenticated Code Execution Vulnerability in OpenSSH server

A signal handler race condition in OpenSSH's server (sshd) on glibc-based Linux systems allows unauthenticated remote code execution as root. An attacker could exploit this to fully compromise the system, install malware, and create backdoors.

Qualys Threat Research Unit (TRU) Follow

Published on blog.qualys.com

The Qualys Threat Research Unit (TRU) has discovered a Remote Unauthenticated Code Execution (RCE) vulnerability in OpenSSH’s server (sshd) in glibc-based Linux systems. CVE assigned to this vulnerability is CVE-2024-6387.

Qualys Threat Research Unit (TRU), on blog.qualys.com

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

Likely a signal handler race condition in sshd that was previously fixed but reintroduced by an accidental code change.

Impact

Could lead to full system compromise with root privileges, allowing malware installation, data theft, and use as a foothold for further attacks; exploitation is difficult and requires many attempts.

What the attacker needed

Glibc-based Linux system; OpenSSH 8.5p1 to 9.8p1 (or <4.4p1 unpatched); network access to sshd

The fix

Apply patches for OpenSSH (upgrade to 9.8p1 or later, or apply vendor backports); if patching is not possible, set LoginGraceTime to 0 as a mitigation, though this exposes the server to denial of service.

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.

OpenSSH is software that lets you log in to other computers securely over a network. A race condition is a bug where two things happen at the same time in an unexpected order, causing a crash or worse. Here, an attacker can send many login attempts to trigger this bug and run their own commands as the most powerful user (root) without needing a password.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by Qualys Threat Research Unit (TRU)

View all

2 more disclosed reports, best first.

More from OpenSSH

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.