Bug 88988 - "openssl genrsa" hangs when -rand option used
"openssl genrsa" hangs when -rand option used
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: openssl (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-15 21:55 EDT by James Ralston
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-05-28 16:28:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Ralston 2003-04-15 21:55:35 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
The "openssl genrsa" command consistently hangs if the -rand option is used. 
Specifically, it goes into a (seemingly) never-ending malloc/read loop.

(Using the -rand option is desirable, because by default, openssl gathers
entropy from /dev/urandom instead of /dev/random.)

Version-Release number of selected component (if applicable):
openssl-0.9.7a-5
(My test system is fully up-to-date w/respect to errata updates.)

How reproducible:
Always

Steps to Reproduce:
openssl genrsa -rand /dev/urandom 1024

Actual Results:  The openssl command goes into a malloc/read loop.

Expected Results:  The openssl command should have generated a certificate to
stdout.  (Removing the "-rand /dev/urandom" yields the expected results.)

Additional info:

This occurs on both 9 and 8.0; I haven't tested earlier releases yet.
Comment 1 Joe Orton 2003-05-28 16:28:33 EDT
Yes, that would be the expected behaviour.  OpenSSL will try to seed the PRNG
with the entire contents of the file specified with the -rand option.  Since
/dev/random never returns EOF, this will never terminate.

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