Skip to content
Race condition Write-up Advanced

What is CVE-2024-6387? Understand RegreSSHion, the OpenSSH vulnerability

A regression in OpenSSH reintroduced a signal handler race condition that allows remote, unauthenticated attackers to execute code with root privileges on glibc-based Linux systems. The flaw is a race condition in the SIGALRM handler that calls non-async-signal-safe functions, leading to heap corruption and potential code execution.

pentest-tools.com

Published on pentest-tools.com

There’s a good reason why CVE-2024-6387, a new critical vulnerability affecting OpenSSH, is keeping the security community on edge - and we’re about to unpack and explain them.

The author, on pentest-tools.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 regression that removed a safety guard from a signal handler, causing it to call functions that are not safe to use inside a signal handler and leading to a race condition.

Impact

An attacker could execute arbitrary code with root privileges on vulnerable glibc-based Linux systems, though exploitation is difficult and requires many attempts.

What the attacker needed

Glibc-based Linux system; OpenSSH 8.5p1 through 9.8p1; network access to SSH service

The fix

The vulnerability was fixed by updating OpenSSH to version 9.8p1, or by manually disabling the unsafe code in the signal handler.

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.

This is a bug in OpenSSH, the software that lets you log into servers remotely. A timing mistake in how it handles a connection that never logs in can let an attacker run their own commands as the most powerful user on the machine. It only affects certain Linux systems and is hard to exploit reliably.

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.

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.