OpenSSH async-signal-safe race in sshd: RCE as root
CVE-2024-7589 Published on August 12, 2024
OpenSSH pre-authentication async signal safety issue
A signal handler in sshd(8) may call a logging function that is not async-signal-safe. The signal handler is invoked when a client does not authenticate within the LoginGraceTime seconds (120 by default). This signal handler executes in the context of the sshd(8)'s privileged code, which is not sandboxed and runs with full root privileges.
This issue is another instance of the problem in CVE-2024-6387 addressed by FreeBSD-SA-24:04.openssh. The faulty code in this case is from the integration of blacklistd in OpenSSH in FreeBSD.
As a result of calling functions that are not async-signal-safe in the privileged sshd(8) context, a race condition exists that a determined attacker may be able to exploit to allow an unauthenticated remote code execution as root.
Vulnerability Analysis
CVE-2024-7589 can be exploited with network access, and does not require authorization privileges or user interaction. This vulnerability is consided to have a high level of attack complexity. The potential impact of an exploit of this vulnerability is considered to be very high.
Weakness Type
Signal Handler Race Condition
The software uses a signal handler that introduces a race condition.
Products Associated with CVE-2024-7589
Want to know whenever a new CVE is published for FreeBSD? stack.watch will email you.
Affected Versions
FreeBSD:- Version 14.1-RELEASE and below p3 is affected.
- Version 14.0-RELEASE and below p9 is affected.
- Version 13.3-RELEASE and below p5 is affected.
- Version 13.3 and below 13.3_release_p5 is affected.
- Version 14.0 and below 14.0_release_p9 is affected.
- Version 14.1 and below 14.1_release_p3 is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.