Bug 1072191 (CVE-2014-0017)

Summary: CVE-2014-0017 libssh: Improper initialization of PRNG after fork()
Product: [Other] Security Response Reporter: Huzaifa S. Sidhpurwala <huzaifas>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jkurik, kdudka, pfrields, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20140304,reported=20140113,source=researcher,cvss2=4.3/AV:N/AC:M/Au:N/C:P/I:N/A:N,rhel-6/libssh2=notaffected,rhel-7/libssh2=notaffected,fedora-all/libssh=affected,fedora-all/libssh2=notaffected,epel-5/libssh=affected,epel-5/libssh2=notaffected,epel-6/libssh=affected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-05 23:56:16 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1072739, 1072740, 1072741    
Bug Blocks: 1052780    

Description Huzaifa S. Sidhpurwala 2014-03-04 00:48:39 EST
A flaw was found in libssh server.  When accepting a new connection, the server forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not guaranteed to be unique. The most important consequence is that servers using EC (ECDSA) or DSA certificates may under certain conditions leak their private key.
Comment 2 Huzaifa S. Sidhpurwala 2014-03-05 00:22:52 EST
Acknowledgements:

Red Hat would like to thank Aris Adamantiadis for reporting this issue.
Comment 3 Huzaifa S. Sidhpurwala 2014-03-05 00:24:39 EST
Public via:

http://git.libssh.org/projects/libssh.git/commit/?id=e99246246b4061f7e71463f8806b9dcad65affa0

This issue is addressed in upstream release of libssh-0.6.3:

http://www.libssh.org/2014/03/04/libssh-0-6-3-security-release/
Comment 4 Huzaifa S. Sidhpurwala 2014-03-05 01:00:40 EST
This issue only affects the server component of libssh library. libssh2 is not affected, since it is a client-side C library implementing the SSH2 protocol. (no server component).

Statement:

Not Vulnerable. This issue does not affect the version of libssh2 package as shipped with Red Hat Enterprise Linux 5 and 6.
Comment 5 Huzaifa S. Sidhpurwala 2014-03-05 01:02:12 EST
Created libssh tracking bugs for this issue:

Affects: fedora-all [bug 1072739]
Affects: epel-5 [bug 1072740]
Affects: epel-6 [bug 1072741]
Comment 7 Fedora Update System 2014-03-07 01:38:52 EST
libssh-0.6.3-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2014-03-15 11:21:47 EDT
libssh-0.6.3-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2014-03-21 18:32:54 EDT
libssh-0.5.5-2.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2014-03-21 18:34:29 EDT
libssh-0.5.5-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.