Bug 967026 (CVE-2016-0787) - VUL-0: CVE-2016-0787: libssh2_org: Weakness in diffie-hellman secret key generation
Summary: VUL-0: CVE-2016-0787: libssh2_org: Weakness in diffie-hellman secret key gene...
Status: RESOLVED FIXED
: 968174 (view as bug list)
Alias: CVE-2016-0787
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL:
Whiteboard: CVSSv2:SUSE:CVE-2016-0787:7.3:(AV:N/A...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-17 09:51 UTC by Marcus Meissner
Modified: 2019-05-22 01:04 UTC (History)
9 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 3 Swamp Workflow Management 2016-02-17 23:01:11 UTC
bugbot adjusting priority
Comment 11 Bernhard Wiedemann 2016-02-23 15:00:11 UTC
This is an autogenerated message for OBS integration:
This bug (967026) was mentioned in
https://build.opensuse.org/request/show/361124 13.2 / libssh2_org
Comment 12 Marcus Meissner 2016-02-23 15:35:33 UTC
https://www.libssh2.org/adv_20160223.html


Truncated Difffie-Hellman secret length

Project libssh2 Security Advisory, February 23rd 2016 - Permalink
VULNERABILITY

During the SSHv2 handshake when libssh2 is to get a suitable value for 'group order' in the Diffle Hellman negotiation, it would pass in number of bytes to a function that expected number of bits. This would result in the library generating numbers using only an 8th the number of random bits than what were intended: 128 or 256 bits instead of 1023 or 2047

Using such drastically reduced amount of random bits for Diffie Hellman weakended the handshake security significantly.

There are no known exploits of this flaw at this time.
INFO

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2016-0787 to this issue.
AFFECTED VERSIONS

    Affected versions: all versions to and including 1.6.0
    Not affected versions: libssh2 >= 1.7.0

libssh2 is used by many applications, but not always advertised as such!
THE SOLUTION

libssh2 1.7.0 makes sure that there's a convertion done from number of bytes to number of bits when the internal _libssh2_bn_rand function is called.

A patch for this problem is available at:

https://www.libssh2.org/CVE-2016-0787.patch

RECOMMENDATIONS

We suggest you take one of the following actions immediately, in order of preference:

A - Upgrade to libssh2 1.7.0

B - Apply the patch and rebuild libssh2
TIME LINE

It was first reported to the libssh2 project on February 7 2016 by Andreas Schneider.

libssh2 1.7.0 was released on February 23rd 2016, coordinated with the publication of this advisory.
CREDITS

Reported by Andreas Schneider.

Thanks a lot!
Comment 15 Josef Cejka 2016-03-01 09:55:14 UTC
*** Bug 968174 has been marked as a duplicate of this bug. ***
Comment 16 Swamp Workflow Management 2016-03-03 13:11:36 UTC
openSUSE-SU-2016:0639-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 967026
CVE References: CVE-2016-0787
Sources used:
openSUSE 13.2 (src):    libssh2_org-1.5.0-9.7.1
Comment 18 Swamp Workflow Management 2016-03-11 13:13:54 UTC
SUSE-SU-2016:0718-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (moderate)
Bug References: 933336,961964,967026
CVE References: CVE-2016-0787
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP1 (src):    libssh2_org-1.4.3-16.1
SUSE Linux Enterprise Software Development Kit 12 (src):    libssh2_org-1.4.3-16.1
SUSE Linux Enterprise Server 12-SP1 (src):    libssh2_org-1.4.3-16.1
SUSE Linux Enterprise Server 12 (src):    libssh2_org-1.4.3-16.1
SUSE Linux Enterprise Desktop 12-SP1 (src):    libssh2_org-1.4.3-16.1
SUSE Linux Enterprise Desktop 12 (src):    libssh2_org-1.4.3-16.1
Comment 19 Swamp Workflow Management 2016-03-11 14:12:58 UTC
SUSE-SU-2016:0723-1: An update that solves one vulnerability and has one errata is now available.

Category: security (moderate)
Bug References: 961964,967026
CVE References: CVE-2016-0787
Sources used:
SUSE Linux Enterprise Software Development Kit 11-SP4 (src):    libssh2_org-1.2.9-4.2.6.1
SUSE Linux Enterprise Server 11-SP4 (src):    libssh2_org-1.2.9-4.2.6.1
SUSE Linux Enterprise Desktop 11-SP4 (src):    libssh2_org-1.2.9-4.2.6.1
Comment 20 Marcus Meissner 2016-03-18 14:17:54 UTC
released