CVE-2024-6387

Public on

Last Modified: UTC

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 0
3) 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.

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
Unless explicitly stated as not affected, all previous versions of packages in any minor update stream of a product listed here should be assumed vulnerable, although may not have been subject to full analysis.

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 open source software shipped by multiple vendors, the CVSS base scores may vary for each vendor's version depending on the version they ship, how they ship it, the platform, and even how the software is compiled. This makes scoring of vulnerabilities difficult for third-party vulnerability databases such as NVD that only provide a single CVSS base score for each vulnerability. Red Hat scores reflect how a vulnerability affects our products specifically.

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"?

A "will not fix" status means that a fix for an affected product version is not planned or not possible due to complexity, which may create additional risk.

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"?

A deferred status means that a fix for an affected product version is not guaranteed due to higher-priority development work.

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?

A mitigation is an action that can be taken to reduce the impact of a security vulnerability, without deploying any fixes.

I have a Red Hat product but it is not in the above list, is it affected?

The listed products were found to include one or more of the components that this vulnerability affects. These products underwent a thorough evaluation to determine their affectedness by this vulnerability. Note that layered products (such as container-based offerings) that consume affected components from any of the products listed in this table may be affected and are not represented.

Why is my security scanner reporting my product as vulnerable to this vulnerability even though my product version is fixed or not affected?

In order to maintain code stability and compatibility, Red Hat usually does not rebase packages to entirely new versions. Instead, we backport fixes and new features to an older version of the package we distribute. This can result in some security scanners that only consider the package version to report the package as vulnerable. To avoid this, we suggest that you use an approved vulnerability scanner from our This content is not included.Red Hat Vulnerability Scanner Certification program.