853 : OpenSSL PRNG Information Disclosure
Printer | http://osvdb.org/853 | Email This | Edit Vulnerability

Views This Week Views All Time Added to OSVDB Last Modified Modified (since 2008) Percent Complete
9 597 over 9 years ago over 4 years ago 0 times 90%

Timeline

Disclosure Date
2001-07-10

Description

The pseudo-random number generator (PRNG) in OpenSSL contains a cryptographic design error, such that retrieving the output of a few hundred consecutive short PRNG requests enables attacker prediction of PRNG internal state. In turn, this allows the attacker to predict the subsequent PRNG output, significantly weakening the strength of the encryption. This problem originated in SSLeay and its derivative toolkits, of which OpenSSL is one.

Classification

Location: Local Access Required, Remote / Network Access
Attack Type: Cryptographic, Information Disclosure
Impact: Loss of Confidentiality
Exploit: Exploit Public
Disclosure: OSVDB Verified

Technical

OpenSSL's PRNG (located in crypto/md_rand.c in the source) uses a hash function to update its internal secret state and to generate output. The default hash selected is SHA-1. The PRNG's internal secret state contains two variables, a chaining variable called "md", sized according to the output of the selected hash function, and a large buffer called "state". The contents of "md" are replaced by a hash function output. "state" is accessed in a circular fashion, and is used for storing additional bits of entropy.

The vulnerable versions of OpenSSL set "md" to the hash of one half of its previous value and other data, including bytes from "state". Unfortunately, in vulnerable versions, the half of "md" input passed to the hash function is the same half that's used as PRNG output. Also, the number of bytes used from "state" can be as small as one if the requested amount of PRNG output is small. This makes brute-force analysis of all possible cases easy. The combination of these effects made it possible to reconstruct the complete internal PRNG state from the output of one PRNG request appropriately sized to your hash function (to gain knowledge of "md") followed by enough consecutive 1-byte PRNG requests to traverse all of "state".

Solution

Upgrade to version 0.9.6b or higher, as it has been reported to fix this vulnerability. It is also possible to correct the flaw by applying the vendor-supplied patch for versions of OpenSSL from 0.9.5 to 0.9.6a. Versions prior to 0.9.5 must upgrade.

Products

Eric Young
Watch-list
SSLeay
Watch-list
All Versions
OpenSSL Project
Watch-list
OpenSSL
Watch-list
0.9.1x
0.9.2x
0.9.3x
0.9.4x
0.9.5x
0.9.6
0.9.6a

References

Tools & Filters

11060

Credit

  • Markku-Juhani O. Saarinen - markku-juhani.saarinennokia.com -

CVSSv2 Score

CVSSv2 Base Score = 5.0
Source: nvd.nist.gov | Generated: 2003-12-31 | Disagree?

Access_vector_2 Access_complexity_2 Authentication_2 Confidentiality_impact_1 Integrity_impact_0 Availability_impact_0

Blogs

This section lists the latest news and blogs found via the daylife API (and for older items, the technorati API), which mention or otherwise discuss this vulnerability.

None found at this time

Comments

No Comments.

The database information may change without any notice. Use of the information constitutes acceptance for use in an AS IS condition, and there are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the copyright holder or distributor (OSVDB or OSF) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

© Copyright 2012 Open Source Vulnerability Database (OSVDB), All Rights Reserved.
Privacy Statement - Terms of Use