Bug 866278 (CVE-2014-0017) - VUL-0: CVE-2014-0017: libssh: PRNG reseed vulnerability
Summary: VUL-0: CVE-2014-0017: libssh: PRNG reseed vulnerability
Status: VERIFIED FIXED
Alias: CVE-2014-0017
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Deadline: 2014-03-20
Assignee: Security Team bot
QA Contact: Security Team bot
URL:
Whiteboard: maint:released:sle11-sp3:56552
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-28 12:51 UTC by Marcus Meissner
Modified: 2015-02-19 10:32 UTC (History)
6 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 2014-02-28 23:00:12 UTC
bugbot adjusting priority
Comment 9 Marcus Meissner 2014-03-05 06:43:52 UTC
is public now.

Date: Wed, 05 Mar 2014 11:11:07 +0530
From: Huzaifa Sidhpurwala <huzaifas@redhat.com>
Subject: [oss-security] libssh and stunnel PRNG flaws

Hi All,

Aris Adamantiadis reported the following to us:

I have found a vulnerability in stunnel (fork mode) and libssh server
(if implemented with fork) that is similar to problems found in
postgresql [1]. 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.

stunnel uses libssl, which also seeds the PRNG with the output of
time(NULL), which means that vulnerability has to be exploited under a
second. I have exploit code that can reproduce the issue on OpenBSD 5.4
(thanks to random PIDs) but I think it may be exploitable on other unix
systems as well.

The following CVEs have been assigned:

CVE-2014-0016 stunnel PRNG vulnerability
CVE-2014-0017 libssh PRNG vulnerability

Mitigations implemented into openssl-0.9.8j (2009) makes the
vulnerability not exploitable in stock openssl. The signing code for
ECDSA and DSA explicitly seeds the pool with the digest to sign.


References:

libssh:
https://bugzilla.redhat.com/show_bug.cgi?id=1072191
http://www.libssh.org/2014/03/04/libssh-0-6-3-security-release/
http://git.libssh.org/projects/libssh.git/commit/?id=e99246246b4061f7e71463f8806b9dcad65affa0
stunnel:
https://bugzilla.redhat.com/show_bug.cgi?id=1072180
There is no upstream patch yet
Comment 11 Marcus Meissner 2014-03-05 07:19:20 UTC
libssh 0.2 in SLE11 does seem to have server code? libssh-0.2/libssh/server.c



libssh2_org does not seem to implement server code, neither in SLE11 nor in Factory.
Comment 12 Bernhard Wiedemann 2014-03-05 12:00:27 UTC
This is an autogenerated message for OBS integration:
This bug (866278) was mentioned in
https://build.opensuse.org/request/show/224706 13.1 / libssh
Comment 13 Vítězslav Čížek 2014-03-05 12:16:56 UTC
(In reply to comment #11)
> libssh 0.2 in SLE11 does seem to have server code? libssh-0.2/libssh/server.c
> 
> libssh2_org does not seem to implement server code, neither in SLE11 nor in
> Factory.

libssh and libssh2(_org) are completely separate projects by different people.
libssh2_org doesn't contain any server code.
Comment 20 Bernhard Wiedemann 2014-03-05 18:00:28 UTC
This is an autogenerated message for OBS integration:
This bug (866278) was mentioned in
https://build.opensuse.org/request/show/224741 12.3 / libssh
Comment 21 Swamp Workflow Management 2014-03-06 12:15:56 UTC
The SWAMPID for this issue is 56551.
This issue was rated as moderate.
Please submit fixed packages until 2014-03-20.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 22 SMASH SMASH 2014-03-06 12:20:14 UTC
Affected packages:

SLE-11-SP3: libssh
SLE-11-SP2: libssh
Comment 23 Marcus Meissner 2014-03-07 08:31:00 UTC
i think needinfo is provided and everything submitted
Comment 25 Swamp Workflow Management 2014-03-13 16:05:16 UTC
openSUSE-SU-2014:0366-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 866278
CVE References: CVE-2014-0017
Sources used:
openSUSE 13.1 (src):    libssh-0.5.5-2.4.1
openSUSE 12.3 (src):    libssh-0.5.3-2.4.1
Comment 26 Swamp Workflow Management 2014-03-13 18:06:15 UTC
openSUSE-SU-2014:0370-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 866278
CVE References: CVE-2014-0017
Sources used:
openSUSE 11.4 (src):    libssh-0.4.8-14.1
Comment 27 Swamp Workflow Management 2014-03-21 01:49:39 UTC
Update released for: libssh2
Products:
SLE-DESKTOP 11-SP3 (i386, x86_64)
SLE-SDK 11-SP3 (i386, ia64, ppc64, s390x, x86_64)
Comment 28 Swamp Workflow Management 2014-03-21 05:04:19 UTC
SUSE-SU-2014:0413-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 866278
CVE References: CVE-2014-0017
Sources used:
SUSE Linux Enterprise Software Development Kit 11 SP3 (src):    libssh-0.2-5.20.1
SUSE Linux Enterprise Desktop 11 SP3 (src):    libssh-0.2-5.20.1