CVE-2024-6387
Public on
Last Modified:
Description
A security regression (CVE-2006-5051) was discovered in OpenSSH's server (sshd). There is a race condition which can lead sshd to handle some signals in an unsafe manner. An unauthenticated, remote attacker may be able to trigger it by failing to authenticate within a set time period.
Statement
Red Hat rates the severity of this flaw as Important for both Red Hat Enterprise Linux (RHEL) and OpenShift Container Platform (OCP). The most significant risk is Remote Code Execution, however this outcome requires significant resources to exploit. If mitigations are put in place, the consequences of exploitation are reduced. An attacker would then only be able to impact availability of the OpenSSH service.
The main factor preventing a higher impact rating is an unpredictable race condition. All actively supported versions of RHEL (and by extension OCP) have ExecShield (aka ASLR) enabled by default and utilize NX technology, reducing reliability of the attack. Attackers are forced to retry the attack thousands of times. This generates significant noise providing defenders with an opportunity to detect and disrupt potential attacks.
RHEL 9 is the only affected version. RHEL 6, 7, and 8 all utilize an older version of OpenSSH which was never affected by this vulnerability.
The affected versions of OCP are 4.13, 4.14, 4.15, and 4.16 as they include the affected version of OpenSSH in the underlying operating system Red Hat CoreOS (RHCOS). 4.12 and earlier versions of OCP are not affected.
Mitigation
The below process can protect against a Remote Code Execution attack by disabling the LoginGraceTime parameter on Red Hat Enterprise Linux 9. However, the sshd server is still vulnerable to a Denial of Service if an attacker exhausts all the connections.
1) As root user, open the /etc/ssh/sshd_config
2) Add or edit the parameter configuration:
LoginGraceTime 03) Save and close the file
4) Restart the sshd daemon:
systemctl restart sshd.service
Setting LoginGraceTime to 0 disables the SSHD server's ability to drop connections if authentication is not completed within the specified timeout. If this mitigation is implemented, it is highly recommended to use a tool like 'fail2ban' alongside a firewall to monitor log files and manage connections appropriately.
If any of the mitigations mentioned above is used, please note that the removal of LoginGraceTime parameter from sshd_config is not automatic when the updated package is installed.
Additional Information
- This content is not included.Bugzilla 2294604: openssh: regreSSHion - race condition in SSH allows RCE/DoS
- Content from cwe.mitre.org is not included.CWE-364: Signal Handler Race Condition
- FAQ: Frequently asked questions about CVE-2024-6387
- Offline Security Data data is available for integration with other systems. See Offline Security Data API to get started.
External References
Content from www.cve.org is not included.https://www.cve.org/CVERecord?id=CVE-2024-6387
Content from nvd.nist.gov is not included.https://nvd.nist.gov/vuln/detail/CVE-2024-6387
Content from www.openssh.com is not included.https://www.openssh.com/txt/release-9.8
Affected Packages and Issued Red Hat Security Errata
| Products / Services | Components | State | Errata |
|---|---|---|---|
| Red Hat Ceph Storage 5 | openssh | Not affected | |
| Red Hat Ceph Storage 6 | openssh | Not affected | |
| Red Hat Ceph Storage 7 | openssh | Not affected | |
| Red Hat Enterprise Linux 10 | openssh | Not affected | |
| Red Hat Enterprise Linux 6 | openssh | Not affected | |
| Red Hat Enterprise Linux 7 | openssh | Not affected | |
| Red Hat Enterprise Linux 8 | openssh | Not affected | |
| Red Hat Enterprise Linux 9 | openssh | Fixed | RHSA-2024:4312 |
| Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions | openssh | Fixed | RHSA-2024:4389 |
| Red Hat Enterprise Linux 9.2 Extended Update Support | openssh | Fixed | RHSA-2024:4340 |
| Red Hat OpenShift Container Platform 4.13 | rhcos | Fixed | RHSA-2024:4484 |
| Red Hat OpenShift Container Platform 4.14 | rhcos | Fixed | RHSA-2024:4479 |
| Red Hat OpenShift Container Platform 4.15 | rhcos | Fixed | RHSA-2024:4474 |
| Red Hat OpenShift Container Platform 4.16 | rhcos | Fixed | RHSA-2024:4469 |
Common Vulnerability Scoring System (CVSS) Score Details
Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authorities (CNA) source for its products and services (see Red Hat classifications ).
| CVSS v3 Score Breakdown | Red Hat | NVD |
|---|---|---|
| CVSS v3 Base Score | 8.1 | 8.1 |
| Attack Vector | Network | Network |
| Attack Complexity | High | High |
| Privileges Required | None | None |
| User Interaction | None | None |
| Scope | Unchanged | Unchanged |
| Confidentiality Impact | High | High |
| Integrity Impact | High | High |
| Availability Impact | High | High |
CVSS v3 Vector
Red Hat CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Acknowledgements
Red Hat would like to thank Qualys Threat Research Unit (TRU) (Qualys) for reporting this issue.
Frequently Asked Questions
Why is Red Hat's CVSS v3 score or Impact different from other vendors?
For more information, see https://access.redhat.com/solutions/762393.
My product is listed as "Under investigation" or "Affected", when will Red Hat release a fix for this vulnerability?
- "Under investigation" doesn't necessarily mean that the product is affected by this vulnerability. It only means that our Analysis Team is still working on determining whether the product is affected and how it is affected.
- "Affected" means that our Analysis Team has determined that this product is affected by this vulnerability and might release a fix to address this in the near future.
What can I do if my product is listed as "Will not fix"?
Available options depend mostly on the Impact of the vulnerability and the current Life Cycle phase of your product. Overall, you have the following options:
- Upgrade to a supported product version that includes a fix for this vulnerability (recommended).
- Apply a mitigation (if one exists).
- Open a This content is not included.support case to request a prioritization of releasing a fix for this vulnerability.
What can I do if my product is listed as "Fix deferred"?
Available options depend mostly on the Impact of the vulnerability and the current Life Cycle phase of your product. Overall, you have the following options:
- Apply a mitigation (if one exists).
- Open a This content is not included.support case to request a prioritization of releasing a fix for this vulnerability.
- Red Hat Engineering focuses on addressing high-priority issues based on their complexity or limited lifecycle support. Therefore, lower-priority issues will not receive immediate fixes.
What is a mitigation?
I have a Red Hat product but it is not in the above list, is it affected?
Why is my security scanner reporting my product as vulnerable to this vulnerability even though my product version is fixed or not affected?
Not sure what something means? Check out our Security Glossary.