Bug 1072180 (CVE-2014-0016) - CVE-2014-0016 stunnel: Improper initialization of PRNG after fork()
Summary: CVE-2014-0016 stunnel: Improper initialization of PRNG after fork()
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2014-0016
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1052780
TreeView+ depends on / blocked
 
Reported: 2014-03-04 05:24 UTC by Huzaifa S. Sidhpurwala
Modified: 2021-02-17 06:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-06 04:55:06 UTC
Embargoed:


Attachments (Terms of Use)
proposed patch (478 bytes, patch)
2014-03-05 06:52 UTC, Huzaifa S. Sidhpurwala
no flags Details | Diff

Description Huzaifa S. Sidhpurwala 2014-03-04 05:24:51 UTC
A flaw was found in the way stunnel, a socket wrapper which can provide SSL support to ordinary applications, performed (re)initialization of PRNG after fork.  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 seeds the PRNG with the output of time(NULL). 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 06:52:47 UTC
Created attachment 870826 [details]
proposed patch

Comment 3 Avesh Agarwal 2014-03-05 15:34:38 UTC
stunnel and rhel7 have the same stunnel version 4.56 so would require fixing in rhel7 atleast if stunnel in fedora is fixed. Still looking into other rhel6/5 branches.

Comment 4 Avesh Agarwal 2014-03-05 16:35:43 UTC
Was going through the code in stunnel 4.56 version and the code uses pthread model and USE_FORK is not used when pthread is detected in rhel and fedora.

Comment 5 Avesh Agarwal 2014-03-05 16:40:30 UTC
(In reply to Avesh Agarwal from comment #4)
> Was going through the code in stunnel 4.56 version and the code uses pthread
> model and USE_FORK is not used when pthread is detected in rhel and fedora.

The same seems true for stunnel versions in rhel6 and rhel5.

Comment 6 Huzaifa S. Sidhpurwala 2014-03-06 04:54:20 UTC
As mentioned in the previous comments, this flaw does not affect the version of stunnel shipped with Red Hat Enterprise Linux 5 and 6, since these versions use POSIX threads (pthreads) and no not use fork().

For the same reason this version does not affect the version of stunnel as shipped with Fedora 19 and Fedora 20.

Comment 7 Huzaifa S. Sidhpurwala 2014-03-06 04:55:06 UTC
Statement:

Not vulnerable. This issue does not affect the version of stunnel package as shipped with Red Hat Enterprise Linux 5 and 6.


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