Bug 1364935 (CVE-2016-6515) - CVE-2016-6515 openssh: Denial of service via very long passwords
Summary: CVE-2016-6515 openssh: Denial of service via very long passwords
Alias: CVE-2016-6515
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1364936 1446514 1794510
Blocks: 1364938 1415638
TreeView+ depends on / blocked
Reported: 2016-08-08 09:08 UTC by Andrej Nemec
Modified: 2021-02-17 03:27 UTC (History)
7 users (show)

Fixed In Version: openssh 7.3
Doc Type: If docs needed, set a value
Doc Text:
It was found that OpenSSH did not limit password lengths for password authentication. A remote unauthenticated attacker could use this flaw to temporarily trigger high CPU consumption in sshd by sending long passwords.
Clone Of:
Last Closed: 2019-06-08 02:57:21 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2029 0 normal SHIPPED_LIVE Moderate: openssh security, bug fix, and enhancement update 2017-08-01 18:11:55 UTC

Description Andrej Nemec 2016-08-08 09:08:10 UTC
A denial of service vulnerability was found in openssh. The auth_password function in auth-passwd.c in sshd in OpenSSH before 7.3 does not limit password lengths for password authentication, which allows remote attackers to cause a denial of service (crypt CPU consumption) via a long string.



Upstream fix:


Comment 1 Andrej Nemec 2016-08-08 09:08:35 UTC
Created openssh tracking bugs for this issue:

Affects: fedora-all [bug 1364936]

Comment 7 errata-xmlrpc 2017-08-01 18:45:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:2029 https://access.redhat.com/errata/RHSA-2017:2029

Comment 8 Adrian Brzezinski 2019-04-26 09:58:32 UTC
(In reply to Dhiru Kholia from comment #5)
> Statement:
> This issue in OpenSSH is mitigated by the usage of SELinux in Red Hat
> Enterprise Linux 6 and Red Hat Enterprise Linux 7.

Can you elaborate on this? My tests dosen't seem to support that claim for RHEL6 with default policies.

Comment 9 Tomas Mraz 2019-04-26 11:06:32 UTC
What do your tests show? The CVE was based on the fact that the password hashing is done on the non-truncated password if PAM is not used. However when PAM is used (which is the default and only supported configuration in RHEL) the password is truncated when unix_chkpwd is invoked during the PAM authentication.

Comment 13 Huzaifa S. Sidhpurwala 2020-03-26 07:57:13 UTC
Explanation of Mitigation:

OpenSSH in RHEL 6, 7 and 8 uses a helper binary "unix_chkpwd" (via the pam_unix module) to verify the passwords. Even when long passwords are passed to OpenSSH, they are truncated to 512 bytes when passed to the helper binary. Hence, RHEL 6 and 7 are not affected by this denial of service attack which utilizes very long passwords.

Red Hat Enterprise Linux 6, 7 and 8 ship with SELinux enabled by default. However, the helper binary "unix_chkpwd" (the usage of which mitigates this flaw) is not used when SELinux is disabled. Disabling SELinux exposes the OpenSSH software to this flaw.

Comment 14 Huzaifa S. Sidhpurwala 2020-03-26 07:57:20 UTC

This issue in OpenSSH is mitigated by the usage of SELinux in Red Hat Enterprise Linux 6, 7 and 8. More details available at: https://bugzilla.redhat.com/show_bug.cgi?id=1364935#c13

Note You need to log in before you can comment on or make changes to this bug.