svn rev #25295: trunk/src/lib/crypto/krb/
ghudson@MIT.EDU
ghudson at MIT.EDU
Mon Oct 3 15:32:28 EDT 2011
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 at 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. */
More information about the cvs-krb5
mailing list