Advisories · Linux & SSH
CVE-2024-6387
High
CVSS 8.1
OpenSSH regreSSHion unauthenticated remote code execution
Disclosed 2024 · Last reviewed 2 Dec 2026
A signal handler race in sshd can allow unauthenticated remote code execution on affected glibc builds. Exploitation is timing-sensitive and not reliable on every host.
What happened
sshd calls async-signal-unsafe functions from the SIGALRM handler used by LoginGraceTime. A regression in 8.5p1 reintroduced the race.
Affected and patched versions
- Affected
- OpenSSH portable before 4.4p1, and 8.5p1 before 9.8p1, on glibc systems where LoginGraceTime is not zero.
- Patched
- OpenSSH 9.8p1 and later distribution packages.
How to check your server
Check
sshd -V
How to fix and harden
- Read the version from sshd -V. Affected portable builds include 8.5p1 through 9.7p1.
- Upgrade OpenSSH from the distribution security repository to 9.8p1 or later.
- Keep the current SSH session open until a second session connects successfully.
- Restart sshd only after the new package is installed.
Fix
sudo apt-get update && sudo apt-get install --only-upgrade openssh-server sshd -V
Sources
Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON