[25805] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

svn rev #25295: trunk/src/lib/crypto/krb/

daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Mon Oct 3 15:32:43 2011

Date: Mon, 3 Oct 2011 15:32:28 -0400
From: ghudson@mit.edu
Message-Id: <201110031932.p93JWS0q002924@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

http://src.mit.edu/fisheye/changelog/krb5/?cs=25295
Commit By: ghudson
Log Message:
Fix a Fortuna PRNG failure case.

If we don't have entropy when krb5_c_random_make_octets is called,
unlock the mutex before returning an error.  From
kevin.wasserman@painless-security.com.


Changed Files:
U   trunk/src/lib/crypto/krb/prng_fortuna.c
Modified: trunk/src/lib/crypto/krb/prng_fortuna.c
===================================================================
--- trunk/src/lib/crypto/krb/prng_fortuna.c	2011-10-03 19:14:05 UTC (rev 25294)
+++ trunk/src/lib/crypto/krb/prng_fortuna.c	2011-10-03 19:32:28 UTC (rev 25295)
@@ -417,8 +417,10 @@
     if (ret)
         return ret;
 
-    if (!have_entropy)
+    if (!have_entropy) {
+        k5_mutex_unlock(&fortuna_lock);
         return KRB5_CRYPTO_INTERNAL;
+    }
 
     if (pid != last_pid) {
         /* We forked; make sure child's PRNG stream differs from parent's. */

_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post